Remove: node on details/misskeyparse.js #86

This commit is contained in:
Cutls 2019-06-15 01:20:12 +09:00
parent 3c276b329b
commit 772a5438aa
3 changed files with 13 additions and 25 deletions

View File

@ -15,6 +15,8 @@ onmessage = function (e) {
ipc.send('bmp-image', e.data[1]);
} else if (e.data[0] == "dialogCW") {
ipc.send("dialogCW", e.data[1])
} else if (e.data[0] == "nativeNotf") {
ipc.send('native-notf', e.data[1]);
}
}
//version.js

View File

@ -519,11 +519,7 @@ function trans(tar, to) {
//ブラウザで開く
function brws() {
var url = $("#tootmodal").attr("data-url");
const {
shell
} = require('electron');
shell.openExternal(url);
postMessage(["openUrl", url], "*")
}
//外部からトゥート開く
function detEx(url, acct_id) {
@ -546,11 +542,7 @@ function detEx(url, acct_id) {
console.error(error);
}).then(function (json) {
if (!json.statuses) {
const {
shell
} = require('electron');
shell.openExternal(url);
postMessage(["openUrl", url], "*")
} else {
var id = json.statuses[0].id;
$(".loadp").text($(".loadp").attr("href"));

View File

@ -257,9 +257,7 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
M.toast({ html: "[" + domain + "]" + escapeHTMLtemp(toot.user.name) + what, displayLength: popup * 1000 })
}
if (native == "yes") {
var electron = require("electron");
var ipc = electron.ipcRenderer;
var os = electron.remote.process.platform;
var os = localStorage.getItem("platform");
var options = {
body: toot.user.name + "(" + toot.user.username + ")" + what + "\n\n" + $.strip_tagstemp(toot.note.text),
icon: toot.user.avatarUrl
@ -267,14 +265,15 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
if (os == "darwin") {
var n = new Notification('TheDesk:' + domain, options);
} else {
ipc.send('native-notf', [
var nativeNotfOpt=[
'TheDesk:' + domain,
toot.user.name + "(" + toot.user.username + ")" + what + "\n\n" + $.strip_tagstemp(toot.note.text),
toot.user.avatarUrl,
"toot",
acct_id,
toot.note.id
]);
]
postMessage(["nativeNotf", nativeNotfOpt], "*")
}
}
if (localStorage.getItem("hasNotfC_" + acct_id) != "true") {
@ -902,9 +901,7 @@ function misskeyUserparse(obj, auth, acct_id, tlid, popup) {
native = "yes";
}
if (native == "yes") {
var electron = require("electron");
var ipc = electron.ipcRenderer;
var os = electron.remote.process.platform;
var os = localStorage.getItem("platform");
var options = {
body: toot.display_name + "(" + toot.acct + ")" + ftxt,
icon: toot.avatar
@ -913,14 +910,15 @@ function misskeyUserparse(obj, auth, acct_id, tlid, popup) {
if (os == "darwin") {
var n = new Notification('TheDesk:' + domain, options);
} else {
ipc.send('native-notf', [
var nativeNotfOpt=[
'TheDesk:' + domain,
toot.display_name + "(" + toot.acct + ")" + ftxt,
toot.avatar,
"userdata",
acct_id,
toot.id
]);
]
postMessage(["nativeNotf", nativeNotfOpt], "*")
}
}
}
@ -967,11 +965,7 @@ function misskeyUserparse(obj, auth, acct_id, tlid, popup) {
function goGoogle(id) {
var val = $("#srcbox_" + id).val();
var url = "https://google.com/search?q=" + val;
const {
shell
} = require('electron');
shell.openExternal(url);
postMessage(["openUrl", url], "*")
}
var misskeyws = []
var misskeywsstate = []