Revert "formatting"

This reverts commit b8b7f5cdc1.
This commit is contained in:
Mirco Wittrien 2023-11-18 18:13:38 +01:00
parent 793da53393
commit 6b79d4f0af
31 changed files with 177 additions and 175 deletions

View File

@ -65,6 +65,8 @@ module.exports = (_ => {
var cachedImages;
var eventTypes = {};
const imgUrlReplaceString = "DEVILBRO_BD_REVERSEIMAGESEARCH_REPLACE_IMAGEURL";
const rescaleOptions = {
NONE: "No Resize",
ORIGINAL: "Resize to Original Size",
@ -235,18 +237,18 @@ module.exports = (_ => {
},
engines: {
_all: {value: true, name: BDFDB.LanguageUtils.LanguageStrings.FORM_LABEL_ALL, url: null},
Baidu: {value: true, name: "Baidu", url: "http://image.baidu.com/pcdutu?queryImageUrl="},
Bing: {value: true, name: "Bing", url: "https://www.bing.com/images/search?view=detailv2&iss=sbi&FORM=IRSBIQ&q=imgurl:"},
Google: {value: true, name: "Google", url: "https://www.google.com/searchbyimage?sbisrc=cr_1&image_url="},
GoogleLens: {value: true, name: "Google Lens", url: "https://lens.google.com/uploadbyurl?url="},
ImgOps: {value: true, name: "ImgOps", raw: true, url: "https://imgops.com/specialized+reverse/"},
IQDB: {value: true, name: "IQDB", url: "https://iqdb.org/?url="},
Reddit: {value: true, name: "Reddit", url: "http://karmadecay.com/search?q="},
SauceNAO: {value: true, name: "SauceNAO", url: "https://saucenao.com/search.php?db=999&url="},
Sogou: {value: true, name: "Sogou", url: "http://pic.sogou.com/ris?flag=1&drag=0&flag=1&query="},
TinEye: {value: true, name: "TinEye", url: "https://tineye.com/search?url="},
WhatAnime: {value: true, name: "WhatAnime", url: "https://trace.moe/?url="},
Yandex: {value: true, name: "Yandex", url: "https://yandex.com/images/search?rpt=imageview&url="}
Baidu: {value: true, name: "Baidu", url: "http://image.baidu.com/pcdutu?queryImageUrl=" + imgUrlReplaceString},
Bing: {value: true, name: "Bing", url: "https://www.bing.com/images/search?q=imgurl:" + imgUrlReplaceString + "&view=detailv2&iss=sbi&FORM=IRSBIQ"},
Google: {value: true, name: "Google", url: "https://www.google.com/searchbyimage?sbisrc=cr_1&image_url=" + imgUrlReplaceString},
GoogleLens: {value: true, name: "Google Lens", url: "https://lens.google.com/uploadbyurl?url=" + imgUrlReplaceString},
ImgOps: {value: true, name: "ImgOps", raw: true, url: "https://imgops.com/specialized+reverse/" + imgUrlReplaceString},
IQDB: {value: true, name: "IQDB", url: "https://iqdb.org/?url=" + imgUrlReplaceString},
Reddit: {value: true, name: "Reddit", url: "http://karmadecay.com/search?q=" + imgUrlReplaceString},
SauceNAO: {value: true, name: "SauceNAO", url: "https://saucenao.com/search.php?db=999&url=" + imgUrlReplaceString},
Sogou: {value: true, name: "Sogou", url: "http://pic.sogou.com/ris?flag=1&drag=0&query=" + imgUrlReplaceString + "&flag=1"},
TinEye: {value: true, name: "TinEye", url: "https://tineye.com/search?url=" + imgUrlReplaceString},
WhatAnime: {value: true, name: "WhatAnime", url: "https://trace.moe/?url=" + imgUrlReplaceString},
Yandex: {value: true, name: "Yandex", url: "https://yandex.com/images/search?url=" + imgUrlReplaceString + "&rpt=imageview"}
}
};
@ -920,7 +922,7 @@ module.exports = (_ => {
persisting: true,
action: event => {
if (!event.shiftKey) BDFDB.ContextMenuUtils.close(instance);
BDFDB.DiscordUtils.openLink(this.defaults.engines[engineKeys[0]].url + encodeURIComponent(urlData.original), {
BDFDB.DiscordUtils.openLink(this.defaults.engines[engineKeys[0]].url.replace(imgUrlReplaceString, encodeURIComponent(urlData.original)), {
minimized: event.shiftKey
});
}

View File

@ -82,9 +82,9 @@ module.exports = (_ => {
"React_to_Message": {name: "Open React Menu", func: this.doOpenReact, value: {click: 0, keycombo: [17,83]} },
"Copy_Raw": {name: "Copy raw Message", func: this.doCopyRaw, value: {click: 0, keycombo: [17,68]} },
"Copy_Link": {name: "Copy Message Link", func: this.doCopyLink, value: {click: 0, keycombo: [17,81]} },
"__Quote_Message": {name: "Quote Message", func: this.doQuote, plugin: "CustomQuoter", value: {click: 0, keycombo: [17,87]}},
"__Note_Message": {name: "Note Message", func: this.doNote, plugin: "PersonalPins", value: {click: 0, keycombo: [16]}},
"__Translate_Message": {name: "Translate Message", func: this.doTranslate, plugin: "Translator", value: {click: 0, keycombo: [20]}}
"__Quote_Message": {name: "Quote Message", func: this.doQuote, value: {click: 0, keycombo: [17,87]}, plugin: "CustomQuoter"},
"__Note_Message": {name: "Note Message", func: this.doNote, value: {click: 0, keycombo: [16]}, plugin: "PersonalPins"},
"__Translate_Message": {name: "Translate Message", func: this.doTranslate, value: {click: 0, keycombo: [20]}, plugin: "Translator"}
}
};