stuff
This commit is contained in:
parent
150247b5ad
commit
3fd656c968
|
@ -2,11 +2,11 @@
|
||||||
* @name BDFDB
|
* @name BDFDB
|
||||||
* @authorId 278543574059057154
|
* @authorId 278543574059057154
|
||||||
* @invite Jx3TjNS
|
* @invite Jx3TjNS
|
||||||
* @donate https://www.paypal.me/MircoWittrien
|
* @donate https: //www.paypal.me/MircoWittrien
|
||||||
* @patreon https://www.patreon.com/MircoWittrien
|
* @patreon https: //www.patreon.com/MircoWittrien
|
||||||
* @website https://github.com/mwittrien/BetterDiscordAddons/tree/master/Library
|
* @website https: //github.com/mwittrien/BetterDiscordAddons/tree/master/Library
|
||||||
* @source https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Library/0BDFDB.plugin.js
|
* @source https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Library/0BDFDB.plugin.js
|
||||||
* @updateUrl https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Library/0BDFDB.plugin.js
|
* @updateUrl https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Library/0BDFDB.plugin.js
|
||||||
*/
|
*/
|
||||||
|
|
||||||
module.exports = (_ => {
|
module.exports = (_ => {
|
||||||
|
@ -19,7 +19,7 @@ module.exports = (_ => {
|
||||||
"version": "1.1.4",
|
"version": "1.1.4",
|
||||||
"description": "Give other plugins utility functions"
|
"description": "Give other plugins utility functions"
|
||||||
},
|
},
|
||||||
"rawUrl": "https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js",
|
"rawUrl": "https: //mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js",
|
||||||
"changeLog": {
|
"changeLog": {
|
||||||
"fixed": {
|
"fixed": {
|
||||||
"Works ": "Can discord stop messing with the server list, jeez"
|
"Works ": "Can discord stop messing with the server list, jeez"
|
||||||
|
@ -49,8 +49,8 @@ module.exports = (_ => {
|
||||||
patchPriority: 0,
|
patchPriority: 0,
|
||||||
defaults: {
|
defaults: {
|
||||||
settings: {
|
settings: {
|
||||||
showToasts: {value:true, description:"Show Plugin start and stop Toasts"},
|
showToasts: {value: true, description: "Show Plugin start and stop Toasts"},
|
||||||
showSupportBadges: {value:true, description:"Show little Badges for Users who support my Patreon"}
|
showSupportBadges: {value: true, description: "Show little Badges for Users who support my Patreon"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -455,7 +455,7 @@ module.exports = (_ => {
|
||||||
BDFDB.BDUtils.getSettings = function (key) {
|
BDFDB.BDUtils.getSettings = function (key) {
|
||||||
if (!window.BdApi) return {};
|
if (!window.BdApi) return {};
|
||||||
if (typeof key == "string") return BdApi.isSettingEnabled(...key.split("."));
|
if (typeof key == "string") return BdApi.isSettingEnabled(...key.split("."));
|
||||||
else return oldSettings ? BDFDB.ReactUtils.getValue(BdApi.getBDData("settings"), `${BDFDB.DiscordUtils.getBuilt()}.settings`) : BdApi.settings.map(n => n.settings.map(m => m.settings.map(l => ({id: [n.id, m.id, l.id].join("."), value:l.value})))).flat(10).reduce((newObj, setting) => (newObj[setting.id] = setting.value, newObj), {});
|
else return oldSettings ? BDFDB.ReactUtils.getValue(BdApi.getBDData("settings"), `${BDFDB.DiscordUtils.getBuilt()}.settings`) : BdApi.settings.map(n => n.settings.map(m => m.settings.map(l => ({id: [n.id, m.id, l.id].join("."), value: l.value})))).flat(10).reduce((newObj, setting) => (newObj[setting.id] = setting.value, newObj), {});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -466,7 +466,7 @@ module.exports = (_ => {
|
||||||
BDFDB.PluginUtils.load = function (plugin) {
|
BDFDB.PluginUtils.load = function (plugin) {
|
||||||
if (!PluginStores.updateTimeout.includes(plugin.name)) {
|
if (!PluginStores.updateTimeout.includes(plugin.name)) {
|
||||||
PluginStores.updateTimeout.push(plugin.name);
|
PluginStores.updateTimeout.push(plugin.name);
|
||||||
let url = plugin.rawUrl ||`https://mwittrien.github.io/BetterDiscordAddons/Plugins/${plugin.name}/${plugin.name}.plugin.js`;
|
let url = plugin.rawUrl ||`https: //mwittrien.github.io/BetterDiscordAddons/Plugins/${plugin.name}/${plugin.name}.plugin.js`;
|
||||||
|
|
||||||
if (!BDFDB.ObjectUtils.is(window.PluginUpdates) || !BDFDB.ObjectUtils.is(window.PluginUpdates.plugins)) window.PluginUpdates = {plugins: {}};
|
if (!BDFDB.ObjectUtils.is(window.PluginUpdates) || !BDFDB.ObjectUtils.is(window.PluginUpdates.plugins)) window.PluginUpdates = {plugins: {}};
|
||||||
window.PluginUpdates.plugins[url] = {name: plugin.name, raw: url, version: plugin.version};
|
window.PluginUpdates.plugins[url] = {name: plugin.name, raw: url, version: plugin.version};
|
||||||
|
@ -501,7 +501,7 @@ module.exports = (_ => {
|
||||||
BDFDB.LogUtils.log(stopMsg, plugin.name);
|
BDFDB.LogUtils.log(stopMsg, plugin.name);
|
||||||
if (settings.showToasts && !BDFDB.BDUtils.getSettings(BDFDB.BDUtils.settingsIds.showToasts)) BDFDB.NotificationUtils.toast(`${plugin.name} ${stopMsg}`, {nopointer: true});
|
if (settings.showToasts && !BDFDB.BDUtils.getSettings(BDFDB.BDUtils.settingsIds.showToasts)) BDFDB.NotificationUtils.toast(`${plugin.name} ${stopMsg}`, {nopointer: true});
|
||||||
|
|
||||||
let url = plugin.rawUrl ||`https://mwittrien.github.io/BetterDiscordAddons/Plugins/${plugin.name}/${plugin.name}.plugin.js`;
|
let url = plugin.rawUrl ||`https: //mwittrien.github.io/BetterDiscordAddons/Plugins/${plugin.name}/${plugin.name}.plugin.js`;
|
||||||
|
|
||||||
BDFDB.PluginUtils.cleanUp(plugin);
|
BDFDB.PluginUtils.cleanUp(plugin);
|
||||||
|
|
||||||
|
@ -611,13 +611,13 @@ module.exports = (_ => {
|
||||||
}
|
}
|
||||||
else if (document.contains(updateNotice) && !updateNotice.querySelector("#outdatedPlugins span," + BDFDB.dotCN.noticebutton)) vanishObserver.disconnect();
|
else if (document.contains(updateNotice) && !updateNotice.querySelector("#outdatedPlugins span," + BDFDB.dotCN.noticebutton)) vanishObserver.disconnect();
|
||||||
});
|
});
|
||||||
vanishObserver.observe(document.body, {childList:true, subtree:true});
|
vanishObserver.observe(document.body, {childList: true, subtree: true});
|
||||||
updateNotice = BDFDB.NotificationUtils.notice(`${BDFDB.LanguageUtils.LibraryStrings.update_notice_update} <strong id="outdatedPlugins"></strong>`, {
|
updateNotice = BDFDB.NotificationUtils.notice(`${BDFDB.LanguageUtils.LibraryStrings.update_notice_update} <strong id="outdatedPlugins"></strong>`, {
|
||||||
id:"pluginNotice",
|
id: "pluginNotice",
|
||||||
type:"info",
|
type: "info",
|
||||||
html:true,
|
html: true,
|
||||||
btn:!BDFDB.BDUtils.getSettings(BDFDB.BDUtils.settingsIds.automaticLoading) ? BDFDB.LanguageUtils.LanguageStrings.ERRORS_RELOAD : "",
|
btn: !BDFDB.BDUtils.getSettings(BDFDB.BDUtils.settingsIds.automaticLoading) ? BDFDB.LanguageUtils.LanguageStrings.ERRORS_RELOAD : "",
|
||||||
customicon:`<svg height="100%" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="100%" version="1.1" viewBox="0 0 2000 2000"><metadata /><defs><filter id="shadow1"><feDropShadow dx="20" dy="0" stdDeviation="20" flood-color="rgba(0,0,0,0.35)"/></filter><filter id="shadow2"><feDropShadow dx="15" dy="0" stdDeviation="20" flood-color="rgba(255,255,255,0.15)"/></filter><filter id="shadow3"><feDropShadow dx="10" dy="0" stdDeviation="20" flood-color="rgba(0,0,0,0.35)"/></filter></defs><g><path style="filter: url(#shadow3)" d="M1195.44+135.442L1195.44+135.442L997.6+136.442C1024.2+149.742+1170.34+163.542+1193.64+179.742C1264.34+228.842+1319.74+291.242+1358.24+365.042C1398.14+441.642+1419.74+530.642+1422.54+629.642L1422.54+630.842L1422.54+632.042C1422.54+773.142+1422.54+1228.14+1422.54+1369.14L1422.54+1370.34L1422.54+1371.54C1419.84+1470.54+1398.24+1559.54+1358.24+1636.14C1319.74+1709.94+1264.44+1772.34+1193.64+1821.44C1171.04+1837.14+1025.7+1850.54+1000+1863.54L1193.54+1864.54C1539.74+1866.44+1864.54+1693.34+1864.54+1296.64L1864.54+716.942C1866.44+312.442+1541.64+135.442+1195.44+135.442Z" fill="#171717" opacity="1"/><path style="filter: url(#shadow2)" d="M1695.54+631.442C1685.84+278.042+1409.34+135.442+1052.94+135.442L361.74+136.442L803.74+490.442L1060.74+490.442C1335.24+490.442+1335.24+835.342+1060.74+835.342L1060.74+1164.84C1150.22+1164.84+1210.53+1201.48+1241.68+1250.87C1306.07+1353+1245.76+1509.64+1060.74+1509.64L361.74+1863.54L1052.94+1864.54C1409.24+1864.54+1685.74+1721.94+1695.54+1368.54C1695.54+1205.94+1651.04+1084.44+1572.64+999.942C1651.04+915.542+1695.54+794.042+1695.54+631.442Z" fill="#3E82E5" opacity="1"/><path style="filter: url(#shadow1)" d="M1469.25+631.442C1459.55+278.042+1183.05+135.442+826.65+135.442L135.45+135.442L135.45+1004C135.45+1004+135.427+1255.21+355.626+1255.21C575.825+1255.21+575.848+1004+575.848+1004L577.45+490.442L834.45+490.442C1108.95+490.442+1108.95+835.342+834.45+835.342L664.65+835.342L664.65+1164.84L834.45+1164.84C923.932+1164.84+984.244+1201.48+1015.39+1250.87C1079.78+1353+1019.47+1509.64+834.45+1509.64L135.45+1509.64L135.45+1864.54L826.65+1864.54C1182.95+1864.54+1459.45+1721.94+1469.25+1368.54C1469.25+1205.94+1424.75+1084.44+1346.35+999.942C1424.75+915.542+1469.25+794.042+1469.25+631.442Z" fill="#FFFFFF" opacity="1"/></g></svg>`,
|
customicon: `<svg height="100%" style="fill-rule: evenodd;clip-rule: evenodd;stroke-linecap: round;stroke-linejoin: round;" xmlns: xlink="http: //www.w3.org/1999/xlink" xmlns="http: //www.w3.org/2000/svg" xml: space="preserve" width="100%" version="1.1" viewBox="0 0 2000 2000"><metadata /><defs><filter id="shadow1"><feDropShadow dx="20" dy="0" stdDeviation="20" flood-color="rgba(0,0,0,0.35)"/></filter><filter id="shadow2"><feDropShadow dx="15" dy="0" stdDeviation="20" flood-color="rgba(255,255,255,0.15)"/></filter><filter id="shadow3"><feDropShadow dx="10" dy="0" stdDeviation="20" flood-color="rgba(0,0,0,0.35)"/></filter></defs><g><path style="filter: url(#shadow3)" d="M1195.44+135.442L1195.44+135.442L997.6+136.442C1024.2+149.742+1170.34+163.542+1193.64+179.742C1264.34+228.842+1319.74+291.242+1358.24+365.042C1398.14+441.642+1419.74+530.642+1422.54+629.642L1422.54+630.842L1422.54+632.042C1422.54+773.142+1422.54+1228.14+1422.54+1369.14L1422.54+1370.34L1422.54+1371.54C1419.84+1470.54+1398.24+1559.54+1358.24+1636.14C1319.74+1709.94+1264.44+1772.34+1193.64+1821.44C1171.04+1837.14+1025.7+1850.54+1000+1863.54L1193.54+1864.54C1539.74+1866.44+1864.54+1693.34+1864.54+1296.64L1864.54+716.942C1866.44+312.442+1541.64+135.442+1195.44+135.442Z" fill="#171717" opacity="1"/><path style="filter: url(#shadow2)" d="M1695.54+631.442C1685.84+278.042+1409.34+135.442+1052.94+135.442L361.74+136.442L803.74+490.442L1060.74+490.442C1335.24+490.442+1335.24+835.342+1060.74+835.342L1060.74+1164.84C1150.22+1164.84+1210.53+1201.48+1241.68+1250.87C1306.07+1353+1245.76+1509.64+1060.74+1509.64L361.74+1863.54L1052.94+1864.54C1409.24+1864.54+1685.74+1721.94+1695.54+1368.54C1695.54+1205.94+1651.04+1084.44+1572.64+999.942C1651.04+915.542+1695.54+794.042+1695.54+631.442Z" fill="#3E82E5" opacity="1"/><path style="filter: url(#shadow1)" d="M1469.25+631.442C1459.55+278.042+1183.05+135.442+826.65+135.442L135.45+135.442L135.45+1004C135.45+1004+135.427+1255.21+355.626+1255.21C575.825+1255.21+575.848+1004+575.848+1004L577.45+490.442L834.45+490.442C1108.95+490.442+1108.95+835.342+834.45+835.342L664.65+835.342L664.65+1164.84L834.45+1164.84C923.932+1164.84+984.244+1201.48+1015.39+1250.87C1079.78+1353+1019.47+1509.64+834.45+1509.64L135.45+1509.64L135.45+1864.54L826.65+1864.54C1182.95+1864.54+1459.45+1721.94+1469.25+1368.54C1469.25+1205.94+1424.75+1084.44+1346.35+999.942C1424.75+915.542+1469.25+794.042+1469.25+631.442Z" fill="#FFFFFF" opacity="1"/></g></svg>`,
|
||||||
onClose: _ => {vanishObserver.disconnect();}
|
onClose: _ => {vanishObserver.disconnect();}
|
||||||
});
|
});
|
||||||
updateNotice.style.setProperty("z-index", "100000", "important");
|
updateNotice.style.setProperty("z-index", "100000", "important");
|
||||||
|
@ -631,7 +631,7 @@ module.exports = (_ => {
|
||||||
LibraryRequires.electron.remote.getCurrentWindow().reload();
|
LibraryRequires.electron.remote.getCurrentWindow().reload();
|
||||||
});
|
});
|
||||||
reloadButton.addEventListener("mouseenter", _ => {
|
reloadButton.addEventListener("mouseenter", _ => {
|
||||||
if (window.PluginUpdates.downloaded) BDFDB.TooltipUtils.create(reloadButton, window.PluginUpdates.downloaded.join(", "), {type:"bottom", selector:"update-notice-tooltip", style: "max-width: 420px"});
|
if (window.PluginUpdates.downloaded) BDFDB.TooltipUtils.create(reloadButton, window.PluginUpdates.downloaded.join(", "), {type: "bottom", selector: "update-notice-tooltip", style: "max-width: 420px"});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -705,7 +705,7 @@ module.exports = (_ => {
|
||||||
});
|
});
|
||||||
BDFDB.TimeUtils.timeout(_ => {if (wasEnabled && !BDFDB.BDUtils.isPluginEnabled(newName)) BDFDB.BDUtils.enablePlugin(newName);}, 3000);
|
BDFDB.TimeUtils.timeout(_ => {if (wasEnabled && !BDFDB.BDUtils.isPluginEnabled(newName)) BDFDB.BDUtils.enablePlugin(newName);}, 3000);
|
||||||
}
|
}
|
||||||
BDFDB.NotificationUtils.toast(BDFDB.LanguageUtils.LibraryStringsFormat("toast_plugin_updated", pluginName, "v" + oldVersion, newName, "v" + newVersion), {nopointer:true, selector:"plugin-updated-toast"});
|
BDFDB.NotificationUtils.toast(BDFDB.LanguageUtils.LibraryStringsFormat("toast_plugin_updated", pluginName, "v" + oldVersion, newName, "v" + newVersion), {nopointer: true, selector: "plugin-updated-toast"});
|
||||||
let updateNotice = document.querySelector("#pluginNotice");
|
let updateNotice = document.querySelector("#pluginNotice");
|
||||||
if (updateNotice) {
|
if (updateNotice) {
|
||||||
if (updateNotice.querySelector(BDFDB.dotCN.noticebutton)) {
|
if (updateNotice.querySelector(BDFDB.dotCN.noticebutton)) {
|
||||||
|
@ -761,8 +761,8 @@ module.exports = (_ => {
|
||||||
footerChildren: (plugin == BDFDB || plugin == libraryInstance || PluginStores.loaded[plugin.name] && PluginStores.loaded[plugin.name] == plugin && plugin.author == "DevilBro") && BDFDB.ReactUtils.createElement("div", {
|
footerChildren: (plugin == BDFDB || plugin == libraryInstance || PluginStores.loaded[plugin.name] && PluginStores.loaded[plugin.name] == plugin && plugin.author == "DevilBro") && BDFDB.ReactUtils.createElement("div", {
|
||||||
className: BDFDB.disCN.changelogfooter,
|
className: BDFDB.disCN.changelogfooter,
|
||||||
children: [
|
children: [
|
||||||
{href: "https://www.paypal.me/MircoWittrien", name: "PayPal", icon: "PAYPAL"},
|
{href: "https: //www.paypal.me/MircoWittrien", name: "PayPal", icon: "PAYPAL"},
|
||||||
{href: "https://www.patreon.com/MircoWittrien", name: "Patreon", icon: "PATREON"}
|
{href: "https: //www.patreon.com/MircoWittrien", name: "Patreon", icon: "PATREON"}
|
||||||
].map(data => BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.Anchor, {
|
].map(data => BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.Anchor, {
|
||||||
className: BDFDB.disCN.changelogsociallink,
|
className: BDFDB.disCN.changelogsociallink,
|
||||||
href: data.href,
|
href: data.href,
|
||||||
|
@ -791,7 +791,7 @@ module.exports = (_ => {
|
||||||
loadingIconWrapper = BDFDB.DOMUtils.create(`<div class="${BDFDB.disCN.loadingiconwrapper}"></div>`);
|
loadingIconWrapper = BDFDB.DOMUtils.create(`<div class="${BDFDB.disCN.loadingiconwrapper}"></div>`);
|
||||||
app.appendChild(loadingIconWrapper);
|
app.appendChild(loadingIconWrapper);
|
||||||
let killObserver = new MutationObserver(changes => {if (!loadingIconWrapper.firstElementChild) BDFDB.DOMUtils.remove(loadingIconWrapper);});
|
let killObserver = new MutationObserver(changes => {if (!loadingIconWrapper.firstElementChild) BDFDB.DOMUtils.remove(loadingIconWrapper);});
|
||||||
killObserver.observe(loadingIconWrapper, {childList:true});
|
killObserver.observe(loadingIconWrapper, {childList: true});
|
||||||
}
|
}
|
||||||
loadingIconWrapper.appendChild(icon);
|
loadingIconWrapper.appendChild(icon);
|
||||||
};
|
};
|
||||||
|
@ -821,13 +821,13 @@ module.exports = (_ => {
|
||||||
let noChannelObserver = new MutationObserver(changes => {changes.forEach(change => {
|
let noChannelObserver = new MutationObserver(changes => {changes.forEach(change => {
|
||||||
if (change.target && BDFDB.DOMUtils.containsClass(change.target, BDFDB.disCN.nochannel)) plugin.onSwitch();
|
if (change.target && BDFDB.DOMUtils.containsClass(change.target, BDFDB.disCN.nochannel)) plugin.onSwitch();
|
||||||
});});
|
});});
|
||||||
BDFDB.ObserverUtils.connect(plugin, spacer.querySelector(BDFDB.dotCNC.chat + BDFDB.dotCN.nochannel), {name:"switchFixNoChannelObserver", instance:noChannelObserver}, {attributes: true});
|
BDFDB.ObserverUtils.connect(plugin, spacer.querySelector(BDFDB.dotCNC.chat + BDFDB.dotCN.nochannel), {name: "switchFixNoChannelObserver", instance: noChannelObserver}, {attributes: true});
|
||||||
let spacerObserver = new MutationObserver(changes => {changes.forEach(change => {if (change.addedNodes) {change.addedNodes.forEach(node => {
|
let spacerObserver = new MutationObserver(changes => {changes.forEach(change => {if (change.addedNodes) {change.addedNodes.forEach(node => {
|
||||||
if (BDFDB.DOMUtils.containsClass(node, BDFDB.disCN.chat, BDFDB.disCN.nochannel, false)) {
|
if (BDFDB.DOMUtils.containsClass(node, BDFDB.disCN.chat, BDFDB.disCN.nochannel, false)) {
|
||||||
BDFDB.ObserverUtils.connect(plugin, node, {name:"switchFixNoChannelObserver", instance:noChannelObserver}, {attributes: true});
|
BDFDB.ObserverUtils.connect(plugin, node, {name: "switchFixNoChannelObserver", instance: noChannelObserver}, {attributes: true});
|
||||||
}
|
}
|
||||||
});}});});
|
});}});});
|
||||||
BDFDB.ObserverUtils.connect(plugin, spacer, {name:"switchFixSpacerObserver", instance:spacerObserver}, {childList: true});
|
BDFDB.ObserverUtils.connect(plugin, spacer, {name: "switchFixSpacerObserver", instance: spacerObserver}, {childList: true});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
InternalBDFDB.addContextListeners(plugin);
|
InternalBDFDB.addContextListeners(plugin);
|
||||||
|
@ -845,10 +845,10 @@ module.exports = (_ => {
|
||||||
|
|
||||||
|
|
||||||
const loadLibrary = tryAgain => {
|
const loadLibrary = tryAgain => {
|
||||||
require("request").get("https://mwittrien.github.io/BetterDiscordAddons/Library/_res/BDFDB.raw.css", (error, response, body) => {
|
require("request").get("https: //mwittrien.github.io/BetterDiscordAddons/Library/_res/BDFDB.raw.css", (error, response, body) => {
|
||||||
if ((error || !body) && tryAgain) return BDFDB.TimeUtils.timeout(_ => {loadLibrary();}, 10000);
|
if ((error || !body) && tryAgain) return BDFDB.TimeUtils.timeout(_ => {loadLibrary();}, 10000);
|
||||||
const css = body;
|
const css = body;
|
||||||
require("request").get("https://mwittrien.github.io/BetterDiscordAddons/Library/_res/BDFDB.data.json", BDFDB.TimeUtils.suppress((error2, response2, body2) => {
|
require("request").get("https: //mwittrien.github.io/BetterDiscordAddons/Library/_res/BDFDB.data.json", BDFDB.TimeUtils.suppress((error2, response2, body2) => {
|
||||||
if ((error2 || !body2) && tryAgain) return BDFDB.TimeUtils.timeout(_ => {loadLibrary();}, 10000);
|
if ((error2 || !body2) && tryAgain) return BDFDB.TimeUtils.timeout(_ => {loadLibrary();}, 10000);
|
||||||
const InternalData = JSON.parse(body2);
|
const InternalData = JSON.parse(body2);
|
||||||
|
|
||||||
|
@ -1043,7 +1043,7 @@ module.exports = (_ => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var NotificationBars = [], DesktopNotificationQueue = {queue:[], running:false};
|
var NotificationBars = [], DesktopNotificationQueue = {queue: [], running: false};
|
||||||
BDFDB.NotificationUtils = {};
|
BDFDB.NotificationUtils = {};
|
||||||
BDFDB.NotificationUtils.toast = function (text, options = {}) {
|
BDFDB.NotificationUtils.toast = function (text, options = {}) {
|
||||||
let toasts = document.querySelector(".toasts, .bd-toasts");
|
let toasts = document.querySelector(".toasts, .bd-toasts");
|
||||||
|
@ -1055,7 +1055,7 @@ module.exports = (_ => {
|
||||||
let width = channelRects ? (members ? channelRects.width - BDFDB.DOMUtils.getRects(members).width : channelRects.width) : window.outerWidth - 0;
|
let width = channelRects ? (members ? channelRects.width - BDFDB.DOMUtils.getRects(members).width : channelRects.width) : window.outerWidth - 0;
|
||||||
let form = channels ? channels.querySelector("form") : null;
|
let form = channels ? channels.querySelector("form") : null;
|
||||||
let bottom = form ? BDFDB.DOMUtils.getRects(form).height : 80;
|
let bottom = form ? BDFDB.DOMUtils.getRects(form).height : 80;
|
||||||
toasts = BDFDB.DOMUtils.create(`<div class="toasts bd-toasts" style="width:${width}px; left:${left}px; bottom:${bottom}px;"></div>`);
|
toasts = BDFDB.DOMUtils.create(`<div class="toasts bd-toasts" style="width: ${width}px; left: ${left}px; bottom: ${bottom}px;"></div>`);
|
||||||
(document.querySelector(BDFDB.dotCN.app) || document.body).appendChild(toasts);
|
(document.querySelector(BDFDB.dotCN.app) || document.body).appendChild(toasts);
|
||||||
}
|
}
|
||||||
const {type = "", icon = true, timeout = 3000, html = false, selector = "", nopointer = false, color = ""} = options;
|
const {type = "", icon = true, timeout = 3000, html = false, selector = "", nopointer = false, color = ""} = options;
|
||||||
|
@ -1181,7 +1181,7 @@ module.exports = (_ => {
|
||||||
let fontColor = comp[0] > 180 && comp[1] > 180 && comp[2] > 180 ? "#000" : "#FFF";
|
let fontColor = comp[0] > 180 && comp[1] > 180 && comp[2] > 180 ? "#000" : "#FFF";
|
||||||
let backgroundcolor = BDFDB.ColorUtils.convert(comp, "HEX");
|
let backgroundcolor = BDFDB.ColorUtils.convert(comp, "HEX");
|
||||||
let filter = comp[0] > 180 && comp[1] > 180 && comp[2] > 180 ? "brightness(0%)" : "brightness(100%)";
|
let filter = comp[0] > 180 && comp[1] > 180 && comp[2] > 180 ? "brightness(0%)" : "brightness(100%)";
|
||||||
BDFDB.DOMUtils.appendLocalStyle("BDFDBcustomNotificationBarColorCorrection" + id, `${BDFDB.dotCN.noticewrapper}[notice-id="${id}"]{background-color:${backgroundcolor} !important;}${BDFDB.dotCN.noticewrapper}[notice-id="${id}"] .notice-message {color:${fontColor} !important;}${BDFDB.dotCN.noticewrapper}[notice-id="${id}"] ${BDFDB.dotCN.noticebutton} {color:${fontColor} !important;border-color:${BDFDB.ColorUtils.setAlpha(fontColor, 0.25, "RGBA")} !important;}${BDFDB.dotCN.noticewrapper}[notice-id="${id}"] ${BDFDB.dotCN.noticebutton}:hover {color:${backgroundcolor} !important;background-color:${fontColor} !important;}${BDFDB.dotCN.noticewrapper}[notice-id="${id}"] ${BDFDB.dotCN.noticedismiss} {filter:${filter} !important;}`);
|
BDFDB.DOMUtils.appendLocalStyle("BDFDBcustomNotificationBarColorCorrection" + id, `${BDFDB.dotCN.noticewrapper}[notice-id="${id}"]{background-color: ${backgroundcolor} !important;}${BDFDB.dotCN.noticewrapper}[notice-id="${id}"] .notice-message {color: ${fontColor} !important;}${BDFDB.dotCN.noticewrapper}[notice-id="${id}"] ${BDFDB.dotCN.noticebutton} {color: ${fontColor} !important;border-color: ${BDFDB.ColorUtils.setAlpha(fontColor, 0.25, "RGBA")} !important;}${BDFDB.dotCN.noticewrapper}[notice-id="${id}"] ${BDFDB.dotCN.noticebutton}:hover {color: ${backgroundcolor} !important;background-color: ${fontColor} !important;}${BDFDB.dotCN.noticewrapper}[notice-id="${id}"] ${BDFDB.dotCN.noticedismiss} {filter: ${filter} !important;}`);
|
||||||
}
|
}
|
||||||
else BDFDB.DOMUtils.addClass(notice, BDFDB.disCN.noticedefault);
|
else BDFDB.DOMUtils.addClass(notice, BDFDB.disCN.noticedefault);
|
||||||
}
|
}
|
||||||
|
@ -1286,7 +1286,7 @@ module.exports = (_ => {
|
||||||
let nodes = Array.from(change.removedNodes);
|
let nodes = Array.from(change.removedNodes);
|
||||||
if (nodes.indexOf(itemLayer) > -1 || nodes.indexOf(anker) > -1 || nodes.some(n => n.contains(anker))) itemLayer.removeTooltip();
|
if (nodes.indexOf(itemLayer) > -1 || nodes.indexOf(anker) > -1 || nodes.some(n => n.contains(anker))) itemLayer.removeTooltip();
|
||||||
}));
|
}));
|
||||||
observer.observe(document.body, {subtree:true, childList:true});
|
observer.observe(document.body, {subtree: true, childList: true});
|
||||||
|
|
||||||
(tooltip.setText = itemLayer.setText = newText => {
|
(tooltip.setText = itemLayer.setText = newText => {
|
||||||
if (BDFDB.ObjectUtils.is(options.guild)) {
|
if (BDFDB.ObjectUtils.is(options.guild)) {
|
||||||
|
@ -1435,7 +1435,7 @@ module.exports = (_ => {
|
||||||
};
|
};
|
||||||
|
|
||||||
InternalBDFDB.findModule = function (type, cachestring, filter, getExport) {
|
InternalBDFDB.findModule = function (type, cachestring, filter, getExport) {
|
||||||
if (!BDFDB.ObjectUtils.is(Cache.modules[type])) Cache.modules[type] = {module:{}, export:{}};
|
if (!BDFDB.ObjectUtils.is(Cache.modules[type])) Cache.modules[type] = {module: {}, export: {}};
|
||||||
if (getExport && Cache.modules[type].export[cachestring]) return Cache.modules[type].export[cachestring];
|
if (getExport && Cache.modules[type].export[cachestring]) return Cache.modules[type].export[cachestring];
|
||||||
else if (!getExport && Cache.modules[type].module[cachestring]) return Cache.modules[type].module[cachestring];
|
else if (!getExport && Cache.modules[type].module[cachestring]) return Cache.modules[type].module[cachestring];
|
||||||
else {
|
else {
|
||||||
|
@ -1555,7 +1555,7 @@ module.exports = (_ => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
InternalBDFDB.patchObserverData = {observer:null, data:{}};
|
InternalBDFDB.patchObserverData = {observer: null, data: {}};
|
||||||
InternalBDFDB.patchPlugin = function (plugin) {
|
InternalBDFDB.patchPlugin = function (plugin) {
|
||||||
plugin = plugin == BDFDB && InternalBDFDB || plugin;
|
plugin = plugin == BDFDB && InternalBDFDB || plugin;
|
||||||
if (!BDFDB.ObjectUtils.is(plugin) || !BDFDB.ObjectUtils.is(plugin.patchedModules)) return;
|
if (!BDFDB.ObjectUtils.is(plugin) || !BDFDB.ObjectUtils.is(plugin.patchedModules)) return;
|
||||||
|
@ -1616,7 +1616,7 @@ module.exports = (_ => {
|
||||||
if (pluginDataObjs.length && instance) {
|
if (pluginDataObjs.length && instance) {
|
||||||
let name = type.split(" _ _ ")[0];
|
let name = type.split(" _ _ ")[0];
|
||||||
instance = instance._reactInternalFiber && instance._reactInternalFiber.type ? instance._reactInternalFiber.type : instance;
|
instance = instance._reactInternalFiber && instance._reactInternalFiber.type ? instance._reactInternalFiber.type : instance;
|
||||||
instance = config.ignoreCheck || BDFDB.ReactUtils.isCorrectInstance(instance, name) || InternalData.ModuleUtilsConfig.LoadedInComponents[type] ? instance : (BDFDB.ReactUtils.findConstructor(instance, name) || BDFDB.ReactUtils.findConstructor(instance, name, {up:true}));
|
instance = config.ignoreCheck || BDFDB.ReactUtils.isCorrectInstance(instance, name) || InternalData.ModuleUtilsConfig.LoadedInComponents[type] ? instance : (BDFDB.ReactUtils.findConstructor(instance, name) || BDFDB.ReactUtils.findConstructor(instance, name, {up: true}));
|
||||||
if (instance) {
|
if (instance) {
|
||||||
instance = instance._reactInternalFiber && instance._reactInternalFiber.type ? instance._reactInternalFiber.type : instance;
|
instance = instance._reactInternalFiber && instance._reactInternalFiber.type ? instance._reactInternalFiber.type : instance;
|
||||||
let toBePatched = config.nonPrototype ? instance : instance.prototype;
|
let toBePatched = config.nonPrototype ? instance : instance.prototype;
|
||||||
|
@ -1625,7 +1625,7 @@ module.exports = (_ => {
|
||||||
let patchMethods = {};
|
let patchMethods = {};
|
||||||
patchMethods[patchType] = e => {
|
patchMethods[patchType] = e => {
|
||||||
return InternalBDFDB.initiateProcess(pluginData.plugin, type, {
|
return InternalBDFDB.initiateProcess(pluginData.plugin, type, {
|
||||||
instance: e.thisObject && window != e.thisObject ? e.thisObject : {props:e.methodArguments[0]},
|
instance: e.thisObject && window != e.thisObject ? e.thisObject : {props: e.methodArguments[0]},
|
||||||
returnvalue: e.returnValue,
|
returnvalue: e.returnValue,
|
||||||
methodname: e.originalMethodName,
|
methodname: e.originalMethodName,
|
||||||
patchtypes: [patchType]
|
patchtypes: [patchType]
|
||||||
|
@ -1670,11 +1670,11 @@ module.exports = (_ => {
|
||||||
let instanceFound = false;
|
let instanceFound = false;
|
||||||
if (!config.forceObserve) {
|
if (!config.forceObserve) {
|
||||||
if (app) {
|
if (app) {
|
||||||
let appIns = BDFDB.ReactUtils.findConstructor(app, type, {unlimited:true}) || BDFDB.ReactUtils.findConstructor(app, type, {unlimited:true, up:true});
|
let appIns = BDFDB.ReactUtils.findConstructor(app, type, {unlimited: true}) || BDFDB.ReactUtils.findConstructor(app, type, {unlimited: true, up: true});
|
||||||
if (appIns && (instanceFound = true)) InternalBDFDB.patchInstance(pluginData, appIns, type, config);
|
if (appIns && (instanceFound = true)) InternalBDFDB.patchInstance(pluginData, appIns, type, config);
|
||||||
}
|
}
|
||||||
if (!instanceFound && bdSettings) {
|
if (!instanceFound && bdSettings) {
|
||||||
let bdSettingsIns = BDFDB.ReactUtils.findConstructor(bdSettings, type, {unlimited:true});
|
let bdSettingsIns = BDFDB.ReactUtils.findConstructor(bdSettings, type, {unlimited: true});
|
||||||
if (bdSettingsIns && (instanceFound = true)) InternalBDFDB.patchInstance(pluginData, bdSettingsIns, type, config);
|
if (bdSettingsIns && (instanceFound = true)) InternalBDFDB.patchInstance(pluginData, bdSettingsIns, type, config);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1704,10 +1704,10 @@ module.exports = (_ => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});});});
|
});});});
|
||||||
InternalBDFDB.patchObserverData.observer.observe(appMount, {childList:true, subtree:true});
|
InternalBDFDB.patchObserverData.observer.observe(appMount, {childList: true, subtree: true});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!InternalBDFDB.patchObserverData.data[type]) InternalBDFDB.patchObserverData.data[type] = {selector, classes, found:false, config, plugins:[]};
|
if (!InternalBDFDB.patchObserverData.data[type]) InternalBDFDB.patchObserverData.data[type] = {selector, classes, found: false, config, plugins: []};
|
||||||
InternalBDFDB.patchObserverData.data[type].plugins.push(pluginData);
|
InternalBDFDB.patchObserverData.data[type].plugins.push(pluginData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1716,7 +1716,7 @@ module.exports = (_ => {
|
||||||
InternalBDFDB.isCorrectPatchInstance = function (instance, name) {
|
InternalBDFDB.isCorrectPatchInstance = function (instance, name) {
|
||||||
if (!instance) return false;
|
if (!instance) return false;
|
||||||
instance = instance._reactInternalFiber && instance._reactInternalFiber.type ? instance._reactInternalFiber.type : instance;
|
instance = instance._reactInternalFiber && instance._reactInternalFiber.type ? instance._reactInternalFiber.type : instance;
|
||||||
instance = BDFDB.ReactUtils.isCorrectInstance(instance, name) ? instance : (BDFDB.ReactUtils.findConstructor(instance, name) || BDFDB.ReactUtils.findConstructor(instance, name, {up:true}));
|
instance = BDFDB.ReactUtils.isCorrectInstance(instance, name) ? instance : (BDFDB.ReactUtils.findConstructor(instance, name) || BDFDB.ReactUtils.findConstructor(instance, name, {up: true}));
|
||||||
return !!instance;
|
return !!instance;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1877,20 +1877,20 @@ module.exports = (_ => {
|
||||||
try {
|
try {
|
||||||
let filteredModules = BDFDB.ArrayUtils.removeCopies(updateDataArray.map(n => n.filteredModules).flat(10));
|
let filteredModules = BDFDB.ArrayUtils.removeCopies(updateDataArray.map(n => n.filteredModules).flat(10));
|
||||||
let specialModules = BDFDB.ArrayUtils.removeCopies(updateDataArray.map(n => n.specialModules).flat(10));
|
let specialModules = BDFDB.ArrayUtils.removeCopies(updateDataArray.map(n => n.specialModules).flat(10));
|
||||||
const appInsDown = BDFDB.ReactUtils.findOwner(app, {name:filteredModules, type:specialModules, all:true, group:true, unlimited:true});
|
const appInsDown = BDFDB.ReactUtils.findOwner(app, {name: filteredModules, type: specialModules, all: true, group: true, unlimited: true});
|
||||||
const appInsUp = BDFDB.ReactUtils.findOwner(app, {name:filteredModules, type:specialModules, all:true, group:true, unlimited:true, up:true});
|
const appInsUp = BDFDB.ReactUtils.findOwner(app, {name: filteredModules, type: specialModules, all: true, group: true, unlimited: true, up: true});
|
||||||
for (let type in appInsDown) {
|
for (let type in appInsDown) {
|
||||||
let filteredPlugins = plugins.filter(n => updateData[n.name].filteredModules.includes(type) || updateData[n.name].specialModuleTypes.includes(type)).map(n => ({plugin:n, patchTypes:updateData[n.name].patchTypes}));
|
let filteredPlugins = plugins.filter(n => updateData[n.name].filteredModules.includes(type) || updateData[n.name].specialModuleTypes.includes(type)).map(n => ({plugin: n, patchTypes: updateData[n.name].patchTypes}));
|
||||||
for (let ins of appInsDown[type]) InternalBDFDB.forceInitiateProcess(filteredPlugins, ins, type);
|
for (let ins of appInsDown[type]) InternalBDFDB.forceInitiateProcess(filteredPlugins, ins, type);
|
||||||
}
|
}
|
||||||
for (let type in appInsUp) {
|
for (let type in appInsUp) {
|
||||||
let filteredPlugins = plugins.filter(n => updateData[n.name].filteredModules.includes(type) || updateData[n.name].specialModuleTypes.includes(type)).map(n => ({plugin:n, patchTypes:updateData[n.name].patchTypes}));
|
let filteredPlugins = plugins.filter(n => updateData[n.name].filteredModules.includes(type) || updateData[n.name].specialModuleTypes.includes(type)).map(n => ({plugin: n, patchTypes: updateData[n.name].patchTypes}));
|
||||||
for (let ins of appInsUp[type]) InternalBDFDB.forceInitiateProcess(filteredPlugins, ins, type);
|
for (let ins of appInsUp[type]) InternalBDFDB.forceInitiateProcess(filteredPlugins, ins, type);
|
||||||
}
|
}
|
||||||
if (bdSettings) {
|
if (bdSettings) {
|
||||||
const bdSettingsIns = BDFDB.ReactUtils.findOwner(bdSettings, {name:filteredModules, type:specialModules, all:true, unlimited:true});
|
const bdSettingsIns = BDFDB.ReactUtils.findOwner(bdSettings, {name: filteredModules, type: specialModules, all: true, unlimited: true});
|
||||||
if (bdSettingsIns.length) {
|
if (bdSettingsIns.length) {
|
||||||
const bdSettingsWrap = BDFDB.ReactUtils.findOwner(BDFDB.ReactUtils.getInstance(document.querySelector("#bd-settingspane-container > *")), {props:"onChange", up:true});
|
const bdSettingsWrap = BDFDB.ReactUtils.findOwner(BDFDB.ReactUtils.getInstance(document.querySelector("#bd-settingspane-container > *")), {props: "onChange", up: true});
|
||||||
if (bdSettingsWrap && bdSettingsWrap.props && typeof bdSettingsWrap.props.onChange == "function") bdSettingsWrap.props.onChange(bdSettingsWrap.props.type);
|
if (bdSettingsWrap && bdSettingsWrap.props && typeof bdSettingsWrap.props.onChange == "function") bdSettingsWrap.props.onChange(bdSettingsWrap.props.type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2104,7 +2104,7 @@ module.exports = (_ => {
|
||||||
let start = performance.now();
|
let start = performance.now();
|
||||||
let maxDepth = config.unlimited ? 999999999 : (config.depth === undefined ? 30 : config.depth);
|
let maxDepth = config.unlimited ? 999999999 : (config.depth === undefined ? 30 : config.depth);
|
||||||
let maxTime = config.unlimited ? 999999999 : (config.time === undefined ? 150 : config.time);
|
let maxTime = config.unlimited ? 999999999 : (config.time === undefined ? 150 : config.time);
|
||||||
let whitelist = config.up ? {return:true, sibling:true, default:true, _reactInternalFiber:true} : {child:true, sibling:true, default:true, _reactInternalFiber:true};
|
let whitelist = config.up ? {return: true, sibling: true, default: true, _reactInternalFiber: true} : {child: true, sibling: true, default: true, _reactInternalFiber: true};
|
||||||
|
|
||||||
let foundConstructors = config.group ? {} : [];
|
let foundConstructors = config.group ? {} : [];
|
||||||
let singleConstructor = getConstructor(instance);
|
let singleConstructor = getConstructor(instance);
|
||||||
|
@ -2169,7 +2169,7 @@ module.exports = (_ => {
|
||||||
let start = performance.now();
|
let start = performance.now();
|
||||||
let maxDepth = config.unlimited ? 999999999 : (config.depth === undefined ? 30 : config.depth);
|
let maxDepth = config.unlimited ? 999999999 : (config.depth === undefined ? 30 : config.depth);
|
||||||
let maxTime = config.unlimited ? 999999999 : (config.time === undefined ? 150 : config.time);
|
let maxTime = config.unlimited ? 999999999 : (config.time === undefined ? 150 : config.time);
|
||||||
let whitelist = config.up ? {return:true, sibling:true, _reactInternalFiber:true} : {child:true, sibling:true, _reactInternalFiber:true};
|
let whitelist = config.up ? {return: true, sibling: true, _reactInternalFiber: true} : {child: true, sibling: true, _reactInternalFiber: true};
|
||||||
|
|
||||||
let foundInstances = config.group ? {} : [];
|
let foundInstances = config.group ? {} : [];
|
||||||
let singleInstance = getOwner(instance);
|
let singleInstance = getOwner(instance);
|
||||||
|
@ -2294,7 +2294,7 @@ module.exports = (_ => {
|
||||||
let start = performance.now();
|
let start = performance.now();
|
||||||
let maxDepth = config.unlimited ? 999999999 : (config.depth === undefined ? 30 : config.depth);
|
let maxDepth = config.unlimited ? 999999999 : (config.depth === undefined ? 30 : config.depth);
|
||||||
let maxTime = config.unlimited ? 999999999 : (config.time === undefined ? 150 : config.time);
|
let maxTime = config.unlimited ? 999999999 : (config.time === undefined ? 150 : config.time);
|
||||||
let whitelist = config.up ? {return:true, sibling:true, _reactInternalFiber:true} : {child:true, sibling:true, _reactInternalFiber:true};
|
let whitelist = config.up ? {return: true, sibling: true, _reactInternalFiber: true} : {child: true, sibling: true, _reactInternalFiber: true};
|
||||||
return findProps(instance);
|
return findProps(instance);
|
||||||
|
|
||||||
function findProps (instance) {
|
function findProps (instance) {
|
||||||
|
@ -2399,7 +2399,7 @@ module.exports = (_ => {
|
||||||
BDFDB.ReactUtils.unmountComponentAtNode(node);
|
BDFDB.ReactUtils.unmountComponentAtNode(node);
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
observer.observe(document.body, {subtree:true, childList:true});
|
observer.observe(document.body, {subtree: true, childList: true});
|
||||||
}
|
}
|
||||||
catch (err) {BDFDB.LogUtils.error("Could not render react element! " + err);}
|
catch (err) {BDFDB.LogUtils.error("Could not render react element! " + err);}
|
||||||
};
|
};
|
||||||
|
@ -2414,7 +2414,7 @@ module.exports = (_ => {
|
||||||
if (BDFDB.DMUtils.isDMChannel(channel)) BDFDB.DMUtils.markAsRead(channel);
|
if (BDFDB.DMUtils.isDMChannel(channel)) BDFDB.DMUtils.markAsRead(channel);
|
||||||
else BDFDB.ChannelUtils.markAsRead(channel);
|
else BDFDB.ChannelUtils.markAsRead(channel);
|
||||||
}
|
}
|
||||||
let LayerProviderIns = BDFDB.ReactUtils.findOwner(document.querySelector(BDFDB.dotCN.messageswrapper), {name:"LayerProvider", unlimited:true, up:true});
|
let LayerProviderIns = BDFDB.ReactUtils.findOwner(document.querySelector(BDFDB.dotCN.messageswrapper), {name: "LayerProvider", unlimited: true, up: true});
|
||||||
let LayerProviderPrototype = BDFDB.ObjectUtils.get(LayerProviderIns, "_reactInternalFiber.type.prototype");
|
let LayerProviderPrototype = BDFDB.ObjectUtils.get(LayerProviderIns, "_reactInternalFiber.type.prototype");
|
||||||
if (LayerProviderIns && LayerProviderPrototype) {
|
if (LayerProviderIns && LayerProviderPrototype) {
|
||||||
BDFDB.PatchUtils.patch(BDFDB, LayerProviderPrototype, "render", {after: e => {
|
BDFDB.PatchUtils.patch(BDFDB, LayerProviderPrototype, "render", {after: e => {
|
||||||
|
@ -2428,7 +2428,7 @@ module.exports = (_ => {
|
||||||
if (!message) return;
|
if (!message) return;
|
||||||
let channel = LibraryModules.ChannelStore.getChannel(message.channel_id);
|
let channel = LibraryModules.ChannelStore.getChannel(message.channel_id);
|
||||||
if (channel) LibraryModules.ContextMenuUtils.openContextMenu(e, function (e) {
|
if (channel) LibraryModules.ContextMenuUtils.openContextMenu(e, function (e) {
|
||||||
return BDFDB.ReactUtils.createElement((BDFDB.ModuleUtils.findByName(slim ? "MessageSearchResultContextMenu" : "MessageContextMenu", false) || {exports:{}}).exports.default, Object.assign({}, e, {
|
return BDFDB.ReactUtils.createElement((BDFDB.ModuleUtils.findByName(slim ? "MessageSearchResultContextMenu" : "MessageContextMenu", false) || {exports: {}}).exports.default, Object.assign({}, e, {
|
||||||
message: message,
|
message: message,
|
||||||
channel: channel
|
channel: channel
|
||||||
}));
|
}));
|
||||||
|
@ -2484,7 +2484,7 @@ module.exports = (_ => {
|
||||||
if (!id || !guildId) return;
|
if (!id || !guildId) return;
|
||||||
let user = LibraryModules.UserStore.getUser(id);
|
let user = LibraryModules.UserStore.getUser(id);
|
||||||
if (user) LibraryModules.ContextMenuUtils.openContextMenu(e, function (e) {
|
if (user) LibraryModules.ContextMenuUtils.openContextMenu(e, function (e) {
|
||||||
return BDFDB.ReactUtils.createElement((BDFDB.ModuleUtils.findByName("GuildChannelUserContextMenu", false) || {exports:{}}).exports.default, Object.assign({}, e, {
|
return BDFDB.ReactUtils.createElement((BDFDB.ModuleUtils.findByName("GuildChannelUserContextMenu", false) || {exports: {}}).exports.default, Object.assign({}, e, {
|
||||||
user: user,
|
user: user,
|
||||||
guildId: guildId
|
guildId: guildId
|
||||||
}));
|
}));
|
||||||
|
@ -2528,8 +2528,8 @@ module.exports = (_ => {
|
||||||
};
|
};
|
||||||
BDFDB.GuildUtils.getAll = function () {
|
BDFDB.GuildUtils.getAll = function () {
|
||||||
let found = [], objs = [];
|
let found = [], objs = [];
|
||||||
for (let ins of BDFDB.ReactUtils.findOwner(document.querySelector(BDFDB.dotCN.guilds), {name:["Guild","GuildIcon"], all:true, unlimited:true})) {
|
for (let ins of BDFDB.ReactUtils.findOwner(document.querySelector(BDFDB.dotCN.guilds), {name: ["Guild","GuildIcon"], all: true, unlimited: true})) {
|
||||||
if (ins.props && ins.props.guild) objs.push(Object.assign(new ins.props.guild.constructor(ins.props.guild), {div:ins.handleContextMenu && BDFDB.ReactUtils.findDOMNode(ins), instance:ins}));
|
if (ins.props && ins.props.guild) objs.push(Object.assign(new ins.props.guild.constructor(ins.props.guild), {div: ins.handleContextMenu && BDFDB.ReactUtils.findDOMNode(ins), instance: ins}));
|
||||||
}
|
}
|
||||||
for (let id of BDFDB.LibraryModules.FolderStore.getFlattenedGuildIds()) {
|
for (let id of BDFDB.LibraryModules.FolderStore.getFlattenedGuildIds()) {
|
||||||
let foundobj = null;
|
let foundobj = null;
|
||||||
|
@ -2540,7 +2540,7 @@ module.exports = (_ => {
|
||||||
if (foundobj) found.push(foundobj);
|
if (foundobj) found.push(foundobj);
|
||||||
else {
|
else {
|
||||||
let guild = BDFDB.LibraryModules.GuildStore.getGuild(id);
|
let guild = BDFDB.LibraryModules.GuildStore.getGuild(id);
|
||||||
if (guild) found.push(Object.assign(new guild.constructor(guild), {div:null, instance:null}))
|
if (guild) found.push(Object.assign(new guild.constructor(guild), {div: null, instance: null}))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return found;
|
return found;
|
||||||
|
@ -2577,7 +2577,7 @@ module.exports = (_ => {
|
||||||
};
|
};
|
||||||
BDFDB.GuildUtils.getSelected = function () {
|
BDFDB.GuildUtils.getSelected = function () {
|
||||||
let info = LibraryModules.GuildStore.getGuild(LibraryModules.LastGuildStore.getGuildId());
|
let info = LibraryModules.GuildStore.getGuild(LibraryModules.LastGuildStore.getGuildId());
|
||||||
if (info) return BDFDB.GuildUtils.getData(info.id) || Object.assign(new info.constructor(info), {div:null, instance:null});
|
if (info) return BDFDB.GuildUtils.getData(info.id) || Object.assign(new info.constructor(info), {div: null, instance: null});
|
||||||
else return null;
|
else return null;
|
||||||
};
|
};
|
||||||
BDFDB.GuildUtils.openMenu = function (eleOrInfoOrId, e = mousePosition) {
|
BDFDB.GuildUtils.openMenu = function (eleOrInfoOrId, e = mousePosition) {
|
||||||
|
@ -2585,7 +2585,7 @@ module.exports = (_ => {
|
||||||
let id = Node.prototype.isPrototypeOf(eleOrInfoOrId) ? BDFDB.GuildUtils.getId(eleOrInfoOrId) : (typeof eleOrInfoOrId == "object" ? eleOrInfoOrId.id : eleOrInfoOrId);
|
let id = Node.prototype.isPrototypeOf(eleOrInfoOrId) ? BDFDB.GuildUtils.getId(eleOrInfoOrId) : (typeof eleOrInfoOrId == "object" ? eleOrInfoOrId.id : eleOrInfoOrId);
|
||||||
let guild = LibraryModules.GuildStore.getGuild(id);
|
let guild = LibraryModules.GuildStore.getGuild(id);
|
||||||
if (guild) LibraryModules.ContextMenuUtils.openContextMenu(e, function (e) {
|
if (guild) LibraryModules.ContextMenuUtils.openContextMenu(e, function (e) {
|
||||||
return BDFDB.ReactUtils.createElement((BDFDB.ModuleUtils.findByName("GuildContextMenu", false) || {exports:{}}).exports.default, Object.assign({}, e, {
|
return BDFDB.ReactUtils.createElement((BDFDB.ModuleUtils.findByName("GuildContextMenu", false) || {exports: {}}).exports.default, Object.assign({}, e, {
|
||||||
guild: guild
|
guild: guild
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
@ -2603,7 +2603,7 @@ module.exports = (_ => {
|
||||||
BDFDB.GuildUtils.rerenderAll = function (instant) {
|
BDFDB.GuildUtils.rerenderAll = function (instant) {
|
||||||
BDFDB.TimeUtils.clear(GuildsRerenderTimeout);
|
BDFDB.TimeUtils.clear(GuildsRerenderTimeout);
|
||||||
GuildsRerenderTimeout = BDFDB.TimeUtils.timeout(_ => {
|
GuildsRerenderTimeout = BDFDB.TimeUtils.timeout(_ => {
|
||||||
let GuildsIns = BDFDB.ReactUtils.findOwner(document.querySelector(BDFDB.dotCN.app), {name:"Guilds", unlimited:true});
|
let GuildsIns = BDFDB.ReactUtils.findOwner(document.querySelector(BDFDB.dotCN.app), {name: "Guilds", unlimited: true});
|
||||||
let GuildsPrototype = BDFDB.ObjectUtils.get(GuildsIns, "_reactInternalFiber.type.prototype");
|
let GuildsPrototype = BDFDB.ObjectUtils.get(GuildsIns, "_reactInternalFiber.type.prototype");
|
||||||
if (GuildsIns && GuildsPrototype) {
|
if (GuildsIns && GuildsPrototype) {
|
||||||
let injectPlaceholder = returnValue => {
|
let injectPlaceholder = returnValue => {
|
||||||
|
@ -2632,7 +2632,7 @@ module.exports = (_ => {
|
||||||
if (!Node.prototype.isPrototypeOf(div) || !BDFDB.ReactUtils.getInstance(div)) return;
|
if (!Node.prototype.isPrototypeOf(div) || !BDFDB.ReactUtils.getInstance(div)) return;
|
||||||
div = BDFDB.DOMUtils.getParent(BDFDB.dotCN.guildfolderwrapper, div);
|
div = BDFDB.DOMUtils.getParent(BDFDB.dotCN.guildfolderwrapper, div);
|
||||||
if (!div) return;
|
if (!div) return;
|
||||||
return BDFDB.ReactUtils.findValue(div, "folderId", {up:true});
|
return BDFDB.ReactUtils.findValue(div, "folderId", {up: true});
|
||||||
};
|
};
|
||||||
BDFDB.FolderUtils.getDefaultName = function (folderId) {
|
BDFDB.FolderUtils.getDefaultName = function (folderId) {
|
||||||
let folder = BDFDB.LibraryModules.FolderStore.getGuildFolderById(folderId);
|
let folder = BDFDB.LibraryModules.FolderStore.getGuildFolderById(folderId);
|
||||||
|
@ -2659,8 +2659,8 @@ module.exports = (_ => {
|
||||||
};
|
};
|
||||||
BDFDB.FolderUtils.getAll = function () {
|
BDFDB.FolderUtils.getAll = function () {
|
||||||
let found = [];
|
let found = [];
|
||||||
for (let ins of BDFDB.ReactUtils.findOwner(document.querySelector(BDFDB.dotCN.guildswrapper), {name:"GuildFolder", all:true, unlimited:true})) {
|
for (let ins of BDFDB.ReactUtils.findOwner(document.querySelector(BDFDB.dotCN.guildswrapper), {name: "GuildFolder", all: true, unlimited: true})) {
|
||||||
if (ins.props && ins.props.folderId) found.push(Object.assign({}, ins.props, {div:BDFDB.ReactUtils.findDOMNode(ins), instance:ins}));
|
if (ins.props && ins.props.folderId) found.push(Object.assign({}, ins.props, {div: BDFDB.ReactUtils.findDOMNode(ins), instance: ins}));
|
||||||
}
|
}
|
||||||
return found;
|
return found;
|
||||||
};
|
};
|
||||||
|
@ -2715,16 +2715,16 @@ module.exports = (_ => {
|
||||||
};
|
};
|
||||||
BDFDB.ChannelUtils.getAll = function () {
|
BDFDB.ChannelUtils.getAll = function () {
|
||||||
let found = [];
|
let found = [];
|
||||||
for (let ins of BDFDB.ReactUtils.findOwner(document.querySelector(BDFDB.dotCN.channels), {name: ["ChannelCategoryItem", "ChannelItem", "PrivateChannel"], all:true, unlimited:true})) if (ins.props && !ins.props.ispin && ins.props.channel && ins._reactInternalFiber.return) {
|
for (let ins of BDFDB.ReactUtils.findOwner(document.querySelector(BDFDB.dotCN.channels), {name: ["ChannelCategoryItem", "ChannelItem", "PrivateChannel"], all: true, unlimited: true})) if (ins.props && !ins.props.ispin && ins.props.channel && ins._reactInternalFiber.return) {
|
||||||
let div = BDFDB.ReactUtils.findDOMNode(ins);
|
let div = BDFDB.ReactUtils.findDOMNode(ins);
|
||||||
div = div && BDFDB.DOMUtils.containsClass(div.parentElement, BDFDB.disCN.categorycontainerdefault, BDFDB.disCN.channelcontainerdefault, false) ? div.parentElement : div;
|
div = div && BDFDB.DOMUtils.containsClass(div.parentElement, BDFDB.disCN.categorycontainerdefault, BDFDB.disCN.channelcontainerdefault, false) ? div.parentElement : div;
|
||||||
found.push(Object.assign(new ins.props.channel.constructor(ins.props.channel), {div, instance:ins}));
|
found.push(Object.assign(new ins.props.channel.constructor(ins.props.channel), {div, instance: ins}));
|
||||||
}
|
}
|
||||||
return found;
|
return found;
|
||||||
};
|
};
|
||||||
BDFDB.ChannelUtils.getSelected = function () {
|
BDFDB.ChannelUtils.getSelected = function () {
|
||||||
let info = LibraryModules.ChannelStore.getChannel(LibraryModules.LastChannelStore.getChannelId());
|
let info = LibraryModules.ChannelStore.getChannel(LibraryModules.LastChannelStore.getChannelId());
|
||||||
if (info) return BDFDB.ChannelUtils.getData(info.id) || Object.assign(new info.constructor(info), {div:null, instance:null});
|
if (info) return BDFDB.ChannelUtils.getData(info.id) || Object.assign(new info.constructor(info), {div: null, instance: null});
|
||||||
else return null;
|
else return null;
|
||||||
};
|
};
|
||||||
BDFDB.ChannelUtils.markAsRead = function (channels) {
|
BDFDB.ChannelUtils.markAsRead = function (channels) {
|
||||||
|
@ -2742,7 +2742,7 @@ module.exports = (_ => {
|
||||||
BDFDB.ChannelUtils.rerenderAll = function (instant) {
|
BDFDB.ChannelUtils.rerenderAll = function (instant) {
|
||||||
BDFDB.TimeUtils.clear(ChannelsRerenderTimeout);
|
BDFDB.TimeUtils.clear(ChannelsRerenderTimeout);
|
||||||
ChannelsRerenderTimeout = BDFDB.TimeUtils.timeout(_ => {
|
ChannelsRerenderTimeout = BDFDB.TimeUtils.timeout(_ => {
|
||||||
let ChannelsIns = BDFDB.ReactUtils.findOwner(document.querySelector(BDFDB.dotCN.guildchannels), {name:"Channels", unlimited:true});
|
let ChannelsIns = BDFDB.ReactUtils.findOwner(document.querySelector(BDFDB.dotCN.guildchannels), {name: "Channels", unlimited: true});
|
||||||
let ChannelsPrototype = BDFDB.ObjectUtils.get(ChannelsIns, "_reactInternalFiber.type.prototype");
|
let ChannelsPrototype = BDFDB.ObjectUtils.get(ChannelsIns, "_reactInternalFiber.type.prototype");
|
||||||
if (ChannelsIns && ChannelsPrototype) {
|
if (ChannelsIns && ChannelsPrototype) {
|
||||||
BDFDB.PatchUtils.patch(BDFDB, ChannelsPrototype, "render", {after: e => {
|
BDFDB.PatchUtils.patch(BDFDB, ChannelsPrototype, "render", {after: e => {
|
||||||
|
@ -2797,8 +2797,8 @@ module.exports = (_ => {
|
||||||
};
|
};
|
||||||
BDFDB.DMUtils.getAll = function () {
|
BDFDB.DMUtils.getAll = function () {
|
||||||
let found = [];
|
let found = [];
|
||||||
for (let ins of BDFDB.ReactUtils.findOwner(document.querySelector(BDFDB.dotCN.guilds), {name:"DirectMessage", all:true, unlimited:true})) {
|
for (let ins of BDFDB.ReactUtils.findOwner(document.querySelector(BDFDB.dotCN.guilds), {name: "DirectMessage", all: true, unlimited: true})) {
|
||||||
if (ins.props && ins.props.channel) found.push(Object.assign(new ins.props.channel.constructor(ins.props.channel), {div:BDFDB.ReactUtils.findDOMNode(ins), instance:ins}));
|
if (ins.props && ins.props.channel) found.push(Object.assign(new ins.props.channel.constructor(ins.props.channel), {div: BDFDB.ReactUtils.findDOMNode(ins), instance: ins}));
|
||||||
}
|
}
|
||||||
return found;
|
return found;
|
||||||
};
|
};
|
||||||
|
@ -2808,13 +2808,13 @@ module.exports = (_ => {
|
||||||
let channel = LibraryModules.ChannelStore.getChannel(id);
|
let channel = LibraryModules.ChannelStore.getChannel(id);
|
||||||
if (channel) {
|
if (channel) {
|
||||||
if (channel.isMultiUserDM()) LibraryModules.ContextMenuUtils.openContextMenu(e, function (e) {
|
if (channel.isMultiUserDM()) LibraryModules.ContextMenuUtils.openContextMenu(e, function (e) {
|
||||||
return BDFDB.ReactUtils.createElement((BDFDB.ModuleUtils.findByName("GroupDMContextMenu", false) || {exports:{}}).exports.default, Object.assign({}, e, {
|
return BDFDB.ReactUtils.createElement((BDFDB.ModuleUtils.findByName("GroupDMContextMenu", false) || {exports: {}}).exports.default, Object.assign({}, e, {
|
||||||
channel: channel,
|
channel: channel,
|
||||||
selected: channel.id == LibraryModules.LastChannelStore.getChannelId()
|
selected: channel.id == LibraryModules.LastChannelStore.getChannelId()
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
else LibraryModules.ContextMenuUtils.openContextMenu(e, function (e) {
|
else LibraryModules.ContextMenuUtils.openContextMenu(e, function (e) {
|
||||||
return BDFDB.ReactUtils.createElement((BDFDB.ModuleUtils.findByName("DMUserContextMenu", false) || {exports:{}}).exports.default, Object.assign({}, e, {
|
return BDFDB.ReactUtils.createElement((BDFDB.ModuleUtils.findByName("DMUserContextMenu", false) || {exports: {}}).exports.default, Object.assign({}, e, {
|
||||||
user: LibraryModules.UserStore.getUser(channel.recipients[0]),
|
user: LibraryModules.UserStore.getUser(channel.recipients[0]),
|
||||||
channel: channel,
|
channel: channel,
|
||||||
selected: channel.id == LibraryModules.LastChannelStore.getChannelId()
|
selected: channel.id == LibraryModules.LastChannelStore.getChannelId()
|
||||||
|
@ -3180,7 +3180,7 @@ module.exports = (_ => {
|
||||||
if (!Node.prototype.isPrototypeOf(container)) return;
|
if (!Node.prototype.isPrototypeOf(container)) return;
|
||||||
let swatches = container.querySelector(`${BDFDB.dotCN.colorpickerswatches}[number="${number}"], ${BDFDB.dotCN.colorpickerswatch}[number="${number}"]`);
|
let swatches = container.querySelector(`${BDFDB.dotCN.colorpickerswatches}[number="${number}"], ${BDFDB.dotCN.colorpickerswatch}[number="${number}"]`);
|
||||||
if (!swatches) return null;
|
if (!swatches) return null;
|
||||||
return BDFDB.ColorUtils.convert(BDFDB.ReactUtils.findValue(BDFDB.ReactUtils.getInstance(swatches), "selectedColor", {up:true, blacklist:{"props":true}}));
|
return BDFDB.ColorUtils.convert(BDFDB.ReactUtils.findValue(BDFDB.ReactUtils.getInstance(swatches), "selectedColor", {up: true, blacklist: {"props":true}}));
|
||||||
};
|
};
|
||||||
|
|
||||||
BDFDB.DOMUtils = {};
|
BDFDB.DOMUtils = {};
|
||||||
|
@ -3486,7 +3486,7 @@ module.exports = (_ => {
|
||||||
if (child.type == InternalComponents.LibraryComponents.ModalComponents.ModalTabContent) {
|
if (child.type == InternalComponents.LibraryComponents.ModalComponents.ModalTabContent) {
|
||||||
if (!tabBarItems.length) child.props.open = true;
|
if (!tabBarItems.length) child.props.open = true;
|
||||||
else delete child.props.open;
|
else delete child.props.open;
|
||||||
tabBarItems.push({value:child.props.tab});
|
tabBarItems.push({value: child.props.tab});
|
||||||
}
|
}
|
||||||
contentChildren.push(child);
|
contentChildren.push(child);
|
||||||
}
|
}
|
||||||
|
@ -3500,7 +3500,7 @@ module.exports = (_ => {
|
||||||
type: InternalComponents.LibraryComponents.TabBar.Types.TOP,
|
type: InternalComponents.LibraryComponents.TabBar.Types.TOP,
|
||||||
items: tabBarItems,
|
items: tabBarItems,
|
||||||
onItemSelect: (value, instance) => {
|
onItemSelect: (value, instance) => {
|
||||||
let tabContentInstances = BDFDB.ReactUtils.findOwner(modal, {name:"BDFDB_ModalTabContent", all:true, unlimited:true});
|
let tabContentInstances = BDFDB.ReactUtils.findOwner(modal, {name: "BDFDB_ModalTabContent", all: true, unlimited: true});
|
||||||
for (let ins of tabContentInstances) {
|
for (let ins of tabContentInstances) {
|
||||||
if (ins.props.tab == value) ins.props.open = true;
|
if (ins.props.tab == value) ins.props.open = true;
|
||||||
else delete ins.props.open;
|
else delete ins.props.open;
|
||||||
|
@ -3613,9 +3613,9 @@ module.exports = (_ => {
|
||||||
};
|
};
|
||||||
BDFDB.ModalUtils.confirm = function (plugin, text, callback) {
|
BDFDB.ModalUtils.confirm = function (plugin, text, callback) {
|
||||||
if (!BDFDB.ObjectUtils.is(plugin) || typeof text != "string") return;
|
if (!BDFDB.ObjectUtils.is(plugin) || typeof text != "string") return;
|
||||||
BDFDB.ModalUtils.open(plugin, {text, header:"Are you sure?", className:BDFDB.disCN.modalconfirmmodal, scroller:false, buttons:[
|
BDFDB.ModalUtils.open(plugin, {text, header: "Are you sure?", className: BDFDB.disCN.modalconfirmmodal, scroller: false, buttons: [
|
||||||
{contents: BDFDB.LanguageUtils.LanguageStrings.OKAY, close:true, color:"RED", click:typeof callback == "function" ? callback : _ => {}},
|
{contents: BDFDB.LanguageUtils.LanguageStrings.OKAY, close: true, color: "RED", click: typeof callback == "function" ? callback : _ => {}},
|
||||||
{contents: BDFDB.LanguageUtils.LanguageStrings.CANCEL, close:true}
|
{contents: BDFDB.LanguageUtils.LanguageStrings.CANCEL, close: true}
|
||||||
]});
|
]});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -3632,7 +3632,7 @@ module.exports = (_ => {
|
||||||
};
|
};
|
||||||
BDFDB.ContextMenuUtils.close = function (nodeOrInstance) {
|
BDFDB.ContextMenuUtils.close = function (nodeOrInstance) {
|
||||||
if (!BDFDB.ObjectUtils.is(nodeOrInstance)) return;
|
if (!BDFDB.ObjectUtils.is(nodeOrInstance)) return;
|
||||||
let instance = BDFDB.ReactUtils.findOwner(nodeOrInstance, {props:"closeContextMenu", up:true});
|
let instance = BDFDB.ReactUtils.findOwner(nodeOrInstance, {props: "closeContextMenu", up: true});
|
||||||
if (BDFDB.ObjectUtils.is(instance) && instance.props && typeof instance.props.closeContextMenu == "function") instance.props.closeContextMenu();
|
if (BDFDB.ObjectUtils.is(instance) && instance.props && typeof instance.props.closeContextMenu == "function") instance.props.closeContextMenu();
|
||||||
else BDFDB.LibraryModules.ContextMenuUtils.closeContextMenu();
|
else BDFDB.LibraryModules.ContextMenuUtils.closeContextMenu();
|
||||||
};
|
};
|
||||||
|
@ -4407,7 +4407,7 @@ module.exports = (_ => {
|
||||||
onMouseLeave: e => {
|
onMouseLeave: e => {
|
||||||
this.setState({hovered: false});
|
this.setState({hovered: false});
|
||||||
},
|
},
|
||||||
children: BDFDB.ReactUtils.createElement(this.props.children, Object.assign({}, this.props.childProps, {isFocused:this.state.hovered && !this.props.disabled}))
|
children: BDFDB.ReactUtils.createElement(this.props.children, Object.assign({}, this.props.childProps, {isFocused: this.state.hovered && !this.props.disabled}))
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -4684,7 +4684,7 @@ module.exports = (_ => {
|
||||||
}), "backdrop", "noRemove"));
|
}), "backdrop", "noRemove"));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
InternalBDFDB.setDefaultProps(InternalComponents.LibraryComponents.Card, {backdrop:true, noRemove:false});
|
InternalBDFDB.setDefaultProps(InternalComponents.LibraryComponents.Card, {backdrop: true, noRemove: false});
|
||||||
|
|
||||||
InternalComponents.LibraryComponents.ChannelTextAreaButton = reactInitialized && class BDFDB_ChannelTextAreaButton extends LibraryModules.React.Component {
|
InternalComponents.LibraryComponents.ChannelTextAreaButton = reactInitialized && class BDFDB_ChannelTextAreaButton extends LibraryModules.React.Component {
|
||||||
render() {
|
render() {
|
||||||
|
@ -4708,13 +4708,13 @@ module.exports = (_ => {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
InternalBDFDB.setDefaultProps(InternalComponents.LibraryComponents.ChannelTextAreaButton, {tabIndex:0});
|
InternalBDFDB.setDefaultProps(InternalComponents.LibraryComponents.ChannelTextAreaButton, {tabIndex: 0});
|
||||||
|
|
||||||
InternalComponents.LibraryComponents.CharCounter = reactInitialized && class BDFDB_CharCounter extends LibraryModules.React.Component {
|
InternalComponents.LibraryComponents.CharCounter = reactInitialized && class BDFDB_CharCounter extends LibraryModules.React.Component {
|
||||||
getCounterString() {
|
getCounterString() {
|
||||||
let input = this.refElement || {}, string = "";
|
let input = this.refElement || {}, string = "";
|
||||||
if (BDFDB.DOMUtils.containsClass(this.refElement, BDFDB.disCN.textarea)) {
|
if (BDFDB.DOMUtils.containsClass(this.refElement, BDFDB.disCN.textarea)) {
|
||||||
let instance = BDFDB.ReactUtils.findOwner(input, {name:"ChannelEditorContainer", up:true});
|
let instance = BDFDB.ReactUtils.findOwner(input, {name: "ChannelEditorContainer", up: true});
|
||||||
if (instance) string = instance.props.textValue;
|
if (instance) string = instance.props.textValue;
|
||||||
else string = input.value || input.textContent || "";
|
else string = input.value || input.textContent || "";
|
||||||
}
|
}
|
||||||
|
@ -4872,7 +4872,7 @@ module.exports = (_ => {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
InternalBDFDB.setDefaultProps(InternalComponents.LibraryComponents.CollapseContainer, {collapsed:true, mini:true});
|
InternalBDFDB.setDefaultProps(InternalComponents.LibraryComponents.CollapseContainer, {collapsed: true, mini: true});
|
||||||
|
|
||||||
InternalComponents.LibraryComponents.ColorPicker = reactInitialized && class BDFDB_ColorPicker extends LibraryModules.React.Component {
|
InternalComponents.LibraryComponents.ColorPicker = reactInitialized && class BDFDB_ColorPicker extends LibraryModules.React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
|
@ -4899,7 +4899,7 @@ module.exports = (_ => {
|
||||||
}
|
}
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
this.domElementRef = {current: BDFDB.DOMUtils.getParent(BDFDB.dotCN.itemlayer, BDFDB.ReactUtils.findDOMNode(this))};
|
this.domElementRef = {current: BDFDB.DOMUtils.getParent(BDFDB.dotCN.itemlayer, BDFDB.ReactUtils.findDOMNode(this))};
|
||||||
let popoutContainerInstance = BDFDB.ReactUtils.findOwner(this.domElementRef.current, {name:"BDFDB_PopoutContainer", up:true, unlimited:true});
|
let popoutContainerInstance = BDFDB.ReactUtils.findOwner(this.domElementRef.current, {name: "BDFDB_PopoutContainer", up: true, unlimited: true});
|
||||||
if (popoutContainerInstance) {
|
if (popoutContainerInstance) {
|
||||||
let mousedown = event => {
|
let mousedown = event => {
|
||||||
if (!this.domElementRef.current || !document.contains(this.domElementRef.current)) document.removeEventListener("mousedown", mousedown);
|
if (!this.domElementRef.current || !document.contains(this.domElementRef.current)) document.removeEventListener("mousedown", mousedown);
|
||||||
|
@ -5406,7 +5406,7 @@ module.exports = (_ => {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
InternalBDFDB.setDefaultProps(InternalComponents.LibraryComponents.EmojiPickerButton, {allowManagedEmojis:false});
|
InternalBDFDB.setDefaultProps(InternalComponents.LibraryComponents.EmojiPickerButton, {allowManagedEmojis: false});
|
||||||
|
|
||||||
InternalComponents.LibraryComponents.FavButton = reactInitialized && class BDFDB_FavButton extends LibraryModules.React.Component {
|
InternalComponents.LibraryComponents.FavButton = reactInitialized && class BDFDB_FavButton extends LibraryModules.React.Component {
|
||||||
handleClick() {
|
handleClick() {
|
||||||
|
@ -5445,7 +5445,7 @@ module.exports = (_ => {
|
||||||
onChange: e => {
|
onChange: e => {
|
||||||
let file = e.currentTarget.files[0];
|
let file = e.currentTarget.files[0];
|
||||||
if (this.refInput && file && (!filter.length || filter.some(n => file.type.indexOf(n) == 0))) {
|
if (this.refInput && file && (!filter.length || filter.some(n => file.type.indexOf(n) == 0))) {
|
||||||
this.refInput.props.value = this.props.searchFolders ? file.path.split(file.name).slice(0, -1).join(file.name) : `${this.props.mode == "url" ? "url('" : ""}${(this.props.useFilePath) ? file.path : `data:${file.type};base64,${BDFDB.LibraryRequires.fs.readFileSync(file.path).toString("base64")}`}${this.props.mode ? "')" : ""}`;
|
this.refInput.props.value = this.props.searchFolders ? file.path.split(file.name).slice(0, -1).join(file.name) : `${this.props.mode == "url" ? "url('" : ""}${(this.props.useFilePath) ? file.path : `data: ${file.type};base64,${BDFDB.LibraryRequires.fs.readFileSync(file.path).toString("base64")}`}${this.props.mode ? "')" : ""}`;
|
||||||
BDFDB.ReactUtils.forceUpdate(this.refInput);
|
BDFDB.ReactUtils.forceUpdate(this.refInput);
|
||||||
this.refInput.handleChange(this.refInput.props.value);
|
this.refInput.handleChange(this.refInput.props.value);
|
||||||
}
|
}
|
||||||
|
@ -5594,7 +5594,7 @@ module.exports = (_ => {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
InternalBDFDB.setDefaultProps(InternalComponents.LibraryComponents.GuildComponents.Guild, {menu:true, tooltip:true, list:false, state:false, draggable:false, sorting:false});
|
InternalBDFDB.setDefaultProps(InternalComponents.LibraryComponents.GuildComponents.Guild, {menu: true, tooltip: true, list: false, state: false, draggable: false, sorting: false});
|
||||||
|
|
||||||
InternalComponents.LibraryComponents.GuildSummaryItem = reactInitialized && class BDFDB_GuildSummaryItem extends LibraryModules.React.Component {
|
InternalComponents.LibraryComponents.GuildSummaryItem = reactInitialized && class BDFDB_GuildSummaryItem extends LibraryModules.React.Component {
|
||||||
defaultRenderGuild(guild, isLast) {
|
defaultRenderGuild(guild, isLast) {
|
||||||
|
@ -5655,13 +5655,13 @@ module.exports = (_ => {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
InternalBDFDB.setDefaultProps(InternalComponents.LibraryComponents.GuildSummaryItem, {max:10, renderMoreGuilds: (count, amount, restGuilds, props) => {
|
InternalBDFDB.setDefaultProps(InternalComponents.LibraryComponents.GuildSummaryItem, {max: 10, renderMoreGuilds: (count, amount, restGuilds, props) => {
|
||||||
let icon = BDFDB.ReactUtils.createElement("div", {className: BDFDB.disCN.guildsummarymoreguilds, children: count});
|
let icon = BDFDB.ReactUtils.createElement("div", {className: BDFDB.disCN.guildsummarymoreguilds, children: count});
|
||||||
return props.showTooltip ? BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.TooltipContainer, {
|
return props.showTooltip ? BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.TooltipContainer, {
|
||||||
text: restGuilds.map(guild => guild.name).join(", "),
|
text: restGuilds.map(guild => guild.name).join(", "),
|
||||||
children: icon
|
children: icon
|
||||||
}) : icon;
|
}) : icon;
|
||||||
}, renderIcon:false});
|
}, renderIcon: false});
|
||||||
|
|
||||||
InternalComponents.LibraryComponents.KeybindRecorder = reactInitialized && class BDFDB_KeybindRecorder extends LibraryModules.React.Component {
|
InternalComponents.LibraryComponents.KeybindRecorder = reactInitialized && class BDFDB_KeybindRecorder extends LibraryModules.React.Component {
|
||||||
handleChange(arrays) {
|
handleChange(arrays) {
|
||||||
|
@ -5826,7 +5826,7 @@ module.exports = (_ => {
|
||||||
}), "digits", "renderLabel"));
|
}), "digits", "renderLabel"));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
InternalBDFDB.setDefaultProps(InternalComponents.LibraryComponents.MenuItems.MenuSliderItem, {minValue:0, maxValue:100, digits:0});
|
InternalBDFDB.setDefaultProps(InternalComponents.LibraryComponents.MenuItems.MenuSliderItem, {minValue: 0, maxValue: 100, digits: 0});
|
||||||
|
|
||||||
InternalComponents.LibraryComponents.ModalComponents.ModalContent = reactInitialized && class BDFDB_ModalContent extends LibraryModules.React.Component {
|
InternalComponents.LibraryComponents.ModalComponents.ModalContent = reactInitialized && class BDFDB_ModalContent extends LibraryModules.React.Component {
|
||||||
render() {
|
render() {
|
||||||
|
@ -5842,7 +5842,7 @@ module.exports = (_ => {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
InternalBDFDB.setDefaultProps(InternalComponents.LibraryComponents.ModalComponents.ModalContent, {scroller:true, content:true});
|
InternalBDFDB.setDefaultProps(InternalComponents.LibraryComponents.ModalComponents.ModalContent, {scroller: true, content: true});
|
||||||
|
|
||||||
InternalComponents.LibraryComponents.ModalComponents.ModalTabContent = reactInitialized && class BDFDB_ModalTabContent extends LibraryModules.React.Component {
|
InternalComponents.LibraryComponents.ModalComponents.ModalTabContent = reactInitialized && class BDFDB_ModalTabContent extends LibraryModules.React.Component {
|
||||||
render() {
|
render() {
|
||||||
|
@ -5855,7 +5855,7 @@ module.exports = (_ => {
|
||||||
})), ["display"]);
|
})), ["display"]);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
InternalBDFDB.setDefaultProps(InternalComponents.LibraryComponents.ModalComponents.ModalTabContent, {tab:"unnamed", render:true});
|
InternalBDFDB.setDefaultProps(InternalComponents.LibraryComponents.ModalComponents.ModalTabContent, {tab: "unnamed", render: true});
|
||||||
|
|
||||||
InternalComponents.LibraryComponents.ModalComponents.ModalFooter = reactInitialized && class BDFDB_ModalFooter extends LibraryModules.React.Component {
|
InternalComponents.LibraryComponents.ModalComponents.ModalFooter = reactInitialized && class BDFDB_ModalFooter extends LibraryModules.React.Component {
|
||||||
render() {
|
render() {
|
||||||
|
@ -6027,7 +6027,7 @@ module.exports = (_ => {
|
||||||
"aria-label": BDFDB.LanguageUtils.LanguageStrings.JUMP,
|
"aria-label": BDFDB.LanguageUtils.LanguageStrings.JUMP,
|
||||||
tooltipConfig: {zIndex: 3001},
|
tooltipConfig: {zIndex: 3001},
|
||||||
onClick: (event, instance) => {
|
onClick: (event, instance) => {
|
||||||
let jumpInput = BDFDB.ReactUtils.findOwner(instance._reactInternalFiber.return, {key:"pagination-list-jumpinput"});
|
let jumpInput = BDFDB.ReactUtils.findOwner(instance._reactInternalFiber.return, {key: "pagination-list-jumpinput"});
|
||||||
if (jumpInput) this.jump(isNaN(parseInt(jumpInput.props.value)) ? -1 : jumpInput.props.value - 1);
|
if (jumpInput) this.jump(isNaN(parseInt(jumpInput.props.value)) ? -1 : jumpInput.props.value - 1);
|
||||||
},
|
},
|
||||||
children: BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.Clickable, {
|
children: BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.Clickable, {
|
||||||
|
@ -6052,9 +6052,9 @@ module.exports = (_ => {
|
||||||
let numbers = key == "0-9", alphaItems = [];
|
let numbers = key == "0-9", alphaItems = [];
|
||||||
for (let item of unsortedItems) if (item && item[this.props.alphabetKey] && (numbers && !isNaN(parseInt(item[this.props.alphabetKey][0])) || item[this.props.alphabetKey].toUpperCase().indexOf(key) == 0)) alphaItems.push(item);
|
for (let item of unsortedItems) if (item && item[this.props.alphabetKey] && (numbers && !isNaN(parseInt(item[this.props.alphabetKey][0])) || item[this.props.alphabetKey].toUpperCase().indexOf(key) == 0)) alphaItems.push(item);
|
||||||
for (let sortedItem of alphaItems) BDFDB.ArrayUtils.remove(unsortedItems, sortedItem);
|
for (let sortedItem of alphaItems) BDFDB.ArrayUtils.remove(unsortedItems, sortedItem);
|
||||||
alphabet[key] = {items:BDFDB.ArrayUtils.keySort(alphaItems, this.props.alphabetKey), disabled:!alphaItems.length};
|
alphabet[key] = {items: BDFDB.ArrayUtils.keySort(alphaItems, this.props.alphabetKey), disabled: !alphaItems.length};
|
||||||
}
|
}
|
||||||
alphabet["?!"] = {items:BDFDB.ArrayUtils.keySort(unsortedItems, this.props.alphabetKey), disabled:!unsortedItems.length};
|
alphabet["?!"] = {items: BDFDB.ArrayUtils.keySort(unsortedItems, this.props.alphabetKey), disabled: !unsortedItems.length};
|
||||||
for (let key in alphabet) items.push(alphabet[key].items);
|
for (let key in alphabet) items.push(alphabet[key].items);
|
||||||
items = items.flat(10);
|
items = items.flat(10);
|
||||||
}
|
}
|
||||||
|
@ -6082,7 +6082,7 @@ module.exports = (_ => {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
InternalBDFDB.setDefaultProps(InternalComponents.LibraryComponents.PaginatedList, {amount:50, offset:0, jump:true, first:true, last:true, copyToBottom:false, fade:true});
|
InternalBDFDB.setDefaultProps(InternalComponents.LibraryComponents.PaginatedList, {amount: 50, offset: 0, jump: true, first: true, last: true, copyToBottom: false, fade: true});
|
||||||
|
|
||||||
InternalComponents.LibraryComponents.Popout = reactInitialized && class BDFDB_Popout extends LibraryModules.React.Component {
|
InternalComponents.LibraryComponents.Popout = reactInitialized && class BDFDB_Popout extends LibraryModules.React.Component {
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
|
@ -6108,7 +6108,7 @@ module.exports = (_ => {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
InternalBDFDB.setDefaultProps(InternalComponents.LibraryComponents.Popout, {themed:true});
|
InternalBDFDB.setDefaultProps(InternalComponents.LibraryComponents.Popout, {themed: true});
|
||||||
|
|
||||||
InternalComponents.LibraryComponents.PopoutContainer = reactInitialized && class BDFDB_PopoutContainer extends LibraryModules.React.Component {
|
InternalComponents.LibraryComponents.PopoutContainer = reactInitialized && class BDFDB_PopoutContainer extends LibraryModules.React.Component {
|
||||||
handleRender(e) {
|
handleRender(e) {
|
||||||
|
@ -6124,7 +6124,7 @@ module.exports = (_ => {
|
||||||
}), "popoutStyle", "popoutClassName")));
|
}), "popoutStyle", "popoutClassName")));
|
||||||
}
|
}
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
let basePopout = BDFDB.ReactUtils.findOwner(this, {name:"BasePopout"});
|
let basePopout = BDFDB.ReactUtils.findOwner(this, {name: "BasePopout"});
|
||||||
if (!basePopout || !basePopout.handleClick) return;
|
if (!basePopout || !basePopout.handleClick) return;
|
||||||
basePopout.isBDFDBpopout = true;
|
basePopout.isBDFDBpopout = true;
|
||||||
this.handleClick = e => {return basePopout.handleClick(BDFDB.ObjectUtils.is(e) ? e : (new MouseEvent({})));};
|
this.handleClick = e => {return basePopout.handleClick(BDFDB.ObjectUtils.is(e) ? e : (new MouseEvent({})));};
|
||||||
|
@ -6159,7 +6159,7 @@ module.exports = (_ => {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
InternalBDFDB.setDefaultProps(InternalComponents.LibraryComponents.PopoutContainer, {wrap:true});
|
InternalBDFDB.setDefaultProps(InternalComponents.LibraryComponents.PopoutContainer, {wrap: true});
|
||||||
|
|
||||||
InternalComponents.LibraryComponents.QuickSelect = reactInitialized && class BDFDB_QuickSelect extends LibraryModules.React.Component {
|
InternalComponents.LibraryComponents.QuickSelect = reactInitialized && class BDFDB_QuickSelect extends LibraryModules.React.Component {
|
||||||
handleChange(option) {
|
handleChange(option) {
|
||||||
|
@ -6283,7 +6283,7 @@ module.exports = (_ => {
|
||||||
return BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.Flex, {
|
return BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.Flex, {
|
||||||
className: this.props.className,
|
className: this.props.className,
|
||||||
wrap: InternalComponents.LibraryComponents.Flex.Wrap.WRAP,
|
wrap: InternalComponents.LibraryComponents.Flex.Wrap.WRAP,
|
||||||
children: [this.props.includeDMs && {name:"Direct Messages", acronym:"DMs", id:BDFDB.DiscordConstants.ME, getIconURL: _ => {}}].concat(BDFDB.LibraryModules.FolderStore.getFlattenedGuilds()).filter(n => n).map(guild => BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.TooltipContainer, {
|
children: [this.props.includeDMs && {name: "Direct Messages", acronym: "DMs", id: BDFDB.DiscordConstants.ME, getIconURL: _ => {}}].concat(BDFDB.LibraryModules.FolderStore.getFlattenedGuilds()).filter(n => n).map(guild => BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.TooltipContainer, {
|
||||||
text: guild.name,
|
text: guild.name,
|
||||||
children: BDFDB.ReactUtils.createElement("div", {
|
children: BDFDB.ReactUtils.createElement("div", {
|
||||||
className: BDFDB.DOMUtils.formatClassName(this.props.guildClassName, BDFDB.disCN.settingsguild, this.props.disabled.includes(guild.id) && BDFDB.disCN.settingsguilddisabled),
|
className: BDFDB.DOMUtils.formatClassName(this.props.guildClassName, BDFDB.disCN.settingsguild, this.props.disabled.includes(guild.id) && BDFDB.disCN.settingsguilddisabled),
|
||||||
|
@ -6668,7 +6668,7 @@ module.exports = (_ => {
|
||||||
}), "digits", "edges", "max", "min", "markerAmount"));
|
}), "digits", "edges", "max", "min", "markerAmount"));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
InternalBDFDB.setDefaultProps(InternalComponents.LibraryComponents.Slider, {hideBubble:false});
|
InternalBDFDB.setDefaultProps(InternalComponents.LibraryComponents.Slider, {hideBubble: false});
|
||||||
|
|
||||||
InternalComponents.LibraryComponents.SvgIcon = reactInitialized && class BDFDB_Icon extends LibraryModules.React.Component {
|
InternalComponents.LibraryComponents.SvgIcon = reactInitialized && class BDFDB_Icon extends LibraryModules.React.Component {
|
||||||
render() {
|
render() {
|
||||||
|
@ -7144,7 +7144,7 @@ module.exports = (_ => {
|
||||||
onColorChange: color => {
|
onColorChange: color => {
|
||||||
this.handleChange(!color ? "" : (this.props.mode == "comp" ? BDFDB.ColorUtils.convert(color, "RGBCOMP").slice(0, 3).join(",") : (this.props.noAlpha ? BDFDB.ColorUtils.convert(color, "RGB") : color)));
|
this.handleChange(!color ? "" : (this.props.mode == "comp" ? BDFDB.ColorUtils.convert(color, "RGBCOMP").slice(0, 3).join(",") : (this.props.noAlpha ? BDFDB.ColorUtils.convert(color, "RGB") : color)));
|
||||||
},
|
},
|
||||||
pickerConfig: {gradient:false, alpha:this.props.mode != "comp" && !this.props.noAlpha}
|
pickerConfig: {gradient: false, alpha: this.props.mode != "comp" && !this.props.noAlpha}
|
||||||
})
|
})
|
||||||
}) : null,
|
}) : null,
|
||||||
this.props.type == "file" ? BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.FileButton, {
|
this.props.type == "file" ? BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.FileButton, {
|
||||||
|
@ -7219,13 +7219,13 @@ module.exports = (_ => {
|
||||||
}, 3000);
|
}, 3000);
|
||||||
let Animation = new LibraryModules.AnimationUtils.Value(0);
|
let Animation = new LibraryModules.AnimationUtils.Value(0);
|
||||||
Animation
|
Animation
|
||||||
.interpolate({inputRange:[0, 1], outputRange:[0, (BDFDB.DOMUtils.getRects(ele.firstElementChild).width - BDFDB.DOMUtils.getRects(ele).width) * -1]})
|
.interpolate({inputRange: [0, 1], outputRange: [0, (BDFDB.DOMUtils.getRects(ele.firstElementChild).width - BDFDB.DOMUtils.getRects(ele).width) * -1]})
|
||||||
.addListener(v => {ele.firstElementChild.style.setProperty("left", `${v.value}px`, "important");});
|
.addListener(v => {ele.firstElementChild.style.setProperty("left", `${v.value}px`, "important");});
|
||||||
this.scroll = p => {
|
this.scroll = p => {
|
||||||
let w = p + parseFloat(ele.firstElementChild.style.getPropertyValue("left")) / (BDFDB.DOMUtils.getRects(ele.firstElementChild).width - BDFDB.DOMUtils.getRects(ele).width);
|
let w = p + parseFloat(ele.firstElementChild.style.getPropertyValue("left")) / (BDFDB.DOMUtils.getRects(ele.firstElementChild).width - BDFDB.DOMUtils.getRects(ele).width);
|
||||||
w = isNaN(w) || !isFinite(w) ? p : w;
|
w = isNaN(w) || !isFinite(w) ? p : w;
|
||||||
w *= BDFDB.DOMUtils.getRects(ele.firstElementChild).width / (BDFDB.DOMUtils.getRects(ele).width * 2);
|
w *= BDFDB.DOMUtils.getRects(ele.firstElementChild).width / (BDFDB.DOMUtils.getRects(ele).width * 2);
|
||||||
LibraryModules.AnimationUtils.parallel([LibraryModules.AnimationUtils.timing(Animation, {toValue:p, duration:Math.sqrt(w**2) * 4000 / (parseInt(this.props.speed) || 1)})]).start();
|
LibraryModules.AnimationUtils.parallel([LibraryModules.AnimationUtils.timing(Animation, {toValue: p, duration: Math.sqrt(w**2) * 4000 / (parseInt(this.props.speed) || 1)})]).start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -7342,7 +7342,7 @@ module.exports = (_ => {
|
||||||
let plugin = props && props.addon && (props.addon.plugin || props.addon.instance);
|
let plugin = props && props.addon && (props.addon.plugin || props.addon.instance);
|
||||||
if (plugin && !props.hasCustomControls && (plugin == libraryInstance || plugin.name && plugin.name && PluginStores.loaded[plugin.name] && PluginStores.loaded[plugin.name] == plugin)) {
|
if (plugin && !props.hasCustomControls && (plugin == libraryInstance || plugin.name && plugin.name && PluginStores.loaded[plugin.name] && PluginStores.loaded[plugin.name] == plugin)) {
|
||||||
props.hasCustomControls = true;
|
props.hasCustomControls = true;
|
||||||
let url = plugin.rawUrl ||`https://mwittrien.github.io/BetterDiscordAddons/Plugins/${plugin.name}/${plugin.name}.plugin.js`;
|
let url = plugin.rawUrl ||`https: //mwittrien.github.io/BetterDiscordAddons/Plugins/${plugin.name}/${plugin.name}.plugin.js`;
|
||||||
let controls = [];
|
let controls = [];
|
||||||
let footerControls = card.querySelector("." + BDFDB.disCN._repofooter.split(" ")[0] + " " + BDFDB.dotCN._repocontrols);
|
let footerControls = card.querySelector("." + BDFDB.disCN._repofooter.split(" ")[0] + " " + BDFDB.dotCN._repocontrols);
|
||||||
if (plugin.changeLog) controls.push(InternalBDFDB.createCustomControl({
|
if (plugin.changeLog) controls.push(InternalBDFDB.createCustomControl({
|
||||||
|
@ -7363,9 +7363,9 @@ module.exports = (_ => {
|
||||||
if (BDFDB.DOMUtils.containsClass(node, BDFDB.disCN._repocard)) InternalBDFDB.appendCustomControls(node);
|
if (BDFDB.DOMUtils.containsClass(node, BDFDB.disCN._repocard)) InternalBDFDB.appendCustomControls(node);
|
||||||
if (node.nodeType != Node.TEXT_NODE) for (let child of node.querySelectorAll(BDFDB.dotCN._repocard)) InternalBDFDB.appendCustomControls(child);
|
if (node.nodeType != Node.TEXT_NODE) for (let child of node.querySelectorAll(BDFDB.dotCN._repocard)) InternalBDFDB.appendCustomControls(child);
|
||||||
});}});}));
|
});}});}));
|
||||||
BDFDB.ObserverUtils.connect(BDFDB, document.querySelector(`${BDFDB.dotCN.layer}[aria-label="${BDFDB.DiscordConstants.Layers.USER_SETTINGS}"]`), {name:"cardObserver", instance:cardObserver}, {childList: true, subtree:true});
|
BDFDB.ObserverUtils.connect(BDFDB, document.querySelector(`${BDFDB.dotCN.layer}[aria-label="${BDFDB.DiscordConstants.Layers.USER_SETTINGS}"]`), {name: "cardObserver", instance: cardObserver}, {childList: true, subtree: true});
|
||||||
BDFDB.ObserverUtils.connect(BDFDB, BDFDB.dotCN.applayers, {name:"appLayerObserver", instance:(new MutationObserver(changes => {changes.forEach(change => {if (change.addedNodes) {change.addedNodes.forEach(node => {
|
BDFDB.ObserverUtils.connect(BDFDB, BDFDB.dotCN.applayers, {name: "appLayerObserver", instance: (new MutationObserver(changes => {changes.forEach(change => {if (change.addedNodes) {change.addedNodes.forEach(node => {
|
||||||
if (node.nodeType != Node.TEXT_NODE && node.getAttribute("aria-label") == BDFDB.DiscordConstants.Layers.USER_SETTINGS) BDFDB.ObserverUtils.connect(BDFDB, node, {name:"cardObserver", instance:cardObserver}, {childList: true, subtree:true});
|
if (node.nodeType != Node.TEXT_NODE && node.getAttribute("aria-label") == BDFDB.DiscordConstants.Layers.USER_SETTINGS) BDFDB.ObserverUtils.connect(BDFDB, node, {name: "cardObserver", instance: cardObserver}, {childList: true, subtree: true});
|
||||||
});}});}))}, {childList: true});
|
});}});}))}, {childList: true});
|
||||||
for (let child of document.querySelectorAll(BDFDB.dotCN._repocard)) InternalBDFDB.appendCustomControls(child);
|
for (let child of document.querySelectorAll(BDFDB.dotCN._repocard)) InternalBDFDB.appendCustomControls(child);
|
||||||
|
|
||||||
|
@ -7570,7 +7570,7 @@ module.exports = (_ => {
|
||||||
InternalBDFDB.patchContextMenuForPlugin = function (plugin, type, module) {
|
InternalBDFDB.patchContextMenuForPlugin = function (plugin, type, module) {
|
||||||
plugin = plugin == BDFDB && InternalBDFDB || plugin;
|
plugin = plugin == BDFDB && InternalBDFDB || plugin;
|
||||||
if (module && module.exports && module.exports.default) BDFDB.PatchUtils.patch(plugin, module.exports, "default", {after: e => {
|
if (module && module.exports && module.exports.default) BDFDB.PatchUtils.patch(plugin, module.exports, "default", {after: e => {
|
||||||
if (e.returnValue && typeof plugin[`on${type}`] === "function") plugin[`on${type}`]({instance:{props:e.methodArguments[0]}, returnvalue:e.returnValue, methodname:"default", type:module.exports.default.displayName});
|
if (e.returnValue && typeof plugin[`on${type}`] === "function") plugin[`on${type}`]({instance: {props: e.methodArguments[0]}, returnvalue: e.returnValue, methodname: "default", type: module.exports.default.displayName});
|
||||||
}});
|
}});
|
||||||
};
|
};
|
||||||
InternalBDFDB.executeExtraPatchedPatches = function (type, e) {
|
InternalBDFDB.executeExtraPatchedPatches = function (type, e) {
|
||||||
|
@ -7585,7 +7585,7 @@ module.exports = (_ => {
|
||||||
|
|
||||||
InternalBDFDB.patchPlugin(BDFDB);
|
InternalBDFDB.patchPlugin(BDFDB);
|
||||||
|
|
||||||
for (let type of QueuedComponents) if (!PluginStores.patchQueues[type]) PluginStores.patchQueues[type] = {query:[], modules:[]};
|
for (let type of QueuedComponents) if (!PluginStores.patchQueues[type]) PluginStores.patchQueues[type] = {query: [], modules: []};
|
||||||
BDFDB.PatchUtils.patch(BDFDB, LibraryModules.ContextMenuUtils, "openContextMenu", {before: e => {
|
BDFDB.PatchUtils.patch(BDFDB, LibraryModules.ContextMenuUtils, "openContextMenu", {before: e => {
|
||||||
let menu = e.methodArguments[1]();
|
let menu = e.methodArguments[1]();
|
||||||
if (BDFDB.ObjectUtils.is(menu) && menu.type && menu.type.displayName) {
|
if (BDFDB.ObjectUtils.is(menu) && menu.type && menu.type.displayName) {
|
||||||
|
@ -7607,13 +7607,13 @@ module.exports = (_ => {
|
||||||
let toolbar = BDFDB.ReactUtils.findChild(e.returnValue, {filter: c => c && c.props && c.props.showMoreUtilities != undefined && c.props.showEmojiPicker != undefined && c.props.setPopout != undefined});
|
let toolbar = BDFDB.ReactUtils.findChild(e.returnValue, {filter: c => c && c.props && c.props.showMoreUtilities != undefined && c.props.showEmojiPicker != undefined && c.props.setPopout != undefined});
|
||||||
if (toolbar) BDFDB.PatchUtils.patch(BDFDB, toolbar, "type", {after: e2 => {
|
if (toolbar) BDFDB.PatchUtils.patch(BDFDB, toolbar, "type", {after: e2 => {
|
||||||
let menu = BDFDB.ReactUtils.findChild(e2.returnValue, {filter: c => c && c.props && typeof c.props.onRequestClose == "function" && c.props.onRequestClose.toString().indexOf("moreUtilities") > -1});
|
let menu = BDFDB.ReactUtils.findChild(e2.returnValue, {filter: c => c && c.props && typeof c.props.onRequestClose == "function" && c.props.onRequestClose.toString().indexOf("moreUtilities") > -1});
|
||||||
InternalBDFDB.executeExtraPatchedPatches("MessageOptionToolbar", {instance:{props:e2.methodArguments[0]}, returnvalue:e2.returnValue, methodname:"default"});
|
InternalBDFDB.executeExtraPatchedPatches("MessageOptionToolbar", {instance: {props: e2.methodArguments[0]}, returnvalue: e2.returnValue, methodname: "default"});
|
||||||
if (menu && typeof menu.props.renderPopout == "function") {
|
if (menu && typeof menu.props.renderPopout == "function") {
|
||||||
let renderPopout = menu.props.renderPopout;
|
let renderPopout = menu.props.renderPopout;
|
||||||
menu.props.renderPopout = (...args) => {
|
menu.props.renderPopout = (...args) => {
|
||||||
let renderedPopout = renderPopout(...args);
|
let renderedPopout = renderPopout(...args);
|
||||||
BDFDB.PatchUtils.patch(BDFDB, renderedPopout, "type", {after: e3 => {
|
BDFDB.PatchUtils.patch(BDFDB, renderedPopout, "type", {after: e3 => {
|
||||||
InternalBDFDB.executeExtraPatchedPatches("MessageOptionContextMenu", {instance:{props:e3.methodArguments[0]}, returnvalue:e3.returnValue, methodname:"default"});
|
InternalBDFDB.executeExtraPatchedPatches("MessageOptionContextMenu", {instance: {props: e3.methodArguments[0]}, returnvalue: e3.returnValue, methodname: "default"});
|
||||||
}}, {noCache: true});
|
}}, {noCache: true});
|
||||||
return renderedPopout;
|
return renderedPopout;
|
||||||
}
|
}
|
||||||
|
@ -7623,7 +7623,7 @@ module.exports = (_ => {
|
||||||
|
|
||||||
BDFDB.PatchUtils.patch(BDFDB, BDFDB.ObjectUtils.get(BDFDB.ModuleUtils.findByString("guild-header-popout", false), "exports.default.prototype"), "render", {after: e => {
|
BDFDB.PatchUtils.patch(BDFDB, BDFDB.ObjectUtils.get(BDFDB.ModuleUtils.findByString("guild-header-popout", false), "exports.default.prototype"), "render", {after: e => {
|
||||||
BDFDB.PatchUtils.patch(BDFDB, e.returnValue.type, "type", {after: e2 => {
|
BDFDB.PatchUtils.patch(BDFDB, e.returnValue.type, "type", {after: e2 => {
|
||||||
InternalBDFDB.executeExtraPatchedPatches("GuildHeaderContextMenu", {instance:{props:e2.methodArguments[0]}, returnvalue:e2.returnValue, methodname:"type"});
|
InternalBDFDB.executeExtraPatchedPatches("GuildHeaderContextMenu", {instance: {props: e2.methodArguments[0]}, returnvalue: e2.returnValue, methodname: "type"});
|
||||||
}}, {noCache: true});
|
}}, {noCache: true});
|
||||||
}});
|
}});
|
||||||
|
|
||||||
|
@ -7751,7 +7751,7 @@ module.exports = (_ => {
|
||||||
}
|
}
|
||||||
|
|
||||||
BDFDB.PatchUtils.patch(BDFDB, LibraryModules.GuildStore, "getGuild", {after: e => {
|
BDFDB.PatchUtils.patch(BDFDB, LibraryModules.GuildStore, "getGuild", {after: e => {
|
||||||
if (e.returnValue && e.methodArguments[0] == InternalData.myGuildId) e.returnValue.banner = "https://mwittrien.github.io/BetterDiscordAddons/Library/_res/BDFDB.banner.png";
|
if (e.returnValue && e.methodArguments[0] == InternalData.myGuildId) e.returnValue.banner = "https: //mwittrien.github.io/BetterDiscordAddons/Library/_res/BDFDB.banner.png";
|
||||||
}});
|
}});
|
||||||
|
|
||||||
BDFDB.PatchUtils.patch(BDFDB, LibraryModules.IconUtils, "getGuildBannerURL", {instead: e => {
|
BDFDB.PatchUtils.patch(BDFDB, LibraryModules.IconUtils, "getGuildBannerURL", {instead: e => {
|
||||||
|
@ -7819,13 +7819,13 @@ module.exports = (_ => {
|
||||||
window.t = {"$filter":(m => [...strings].flat(10).filter(n => typeof n == "string").map(string => string.toLowerCase()).every(string => typeof m == "function" && (m.toString().toLowerCase().indexOf(string) > -1 || typeof m.__originalMethod == "function" && m.__originalMethod.toString().toLowerCase().indexOf(string) > -1 || typeof m.__originalFunction == "function" && m.__originalFunction.toString().toLowerCase().indexOf(string) > -1) || BDFDB.ObjectUtils.is(m) && typeof m.type == "function" && m.type.toString().toLowerCase().indexOf(string) > -1))};
|
window.t = {"$filter":(m => [...strings].flat(10).filter(n => typeof n == "string").map(string => string.toLowerCase()).every(string => typeof m == "function" && (m.toString().toLowerCase().indexOf(string) > -1 || typeof m.__originalMethod == "function" && m.__originalMethod.toString().toLowerCase().indexOf(string) > -1 || typeof m.__originalFunction == "function" && m.__originalFunction.toString().toLowerCase().indexOf(string) > -1) || BDFDB.ObjectUtils.is(m) && typeof m.type == "function" && m.type.toString().toLowerCase().indexOf(string) > -1))};
|
||||||
for (let i in BDFDB.DevUtils.req.c) if (BDFDB.DevUtils.req.c.hasOwnProperty(i)) {
|
for (let i in BDFDB.DevUtils.req.c) if (BDFDB.DevUtils.req.c.hasOwnProperty(i)) {
|
||||||
let m = BDFDB.DevUtils.req.c[i].exports;
|
let m = BDFDB.DevUtils.req.c[i].exports;
|
||||||
if (m && typeof m == "function" && window.t.$filter(m)) window.t["module_" + i] = {string:m.toString(), func:m};
|
if (m && typeof m == "function" && window.t.$filter(m)) window.t["module_" + i] = {string: m.toString(), func: m};
|
||||||
if (m && m.__esModule) {
|
if (m && m.__esModule) {
|
||||||
for (let j in m) if (m[j] && typeof m[j] == "function" && window.t.$filter(m[j])) window.t[j + "_module_" + i] = {string:m[j].toString(), func:m[j], module:m};
|
for (let j in m) if (m[j] && typeof m[j] == "function" && window.t.$filter(m[j])) window.t[j + "_module_" + i] = {string: m[j].toString(), func: m[j], module: m};
|
||||||
if (m.default && (typeof m.default == "object" || typeof m.default == "function")) for (let j in m.default) if (m.default[j] && typeof m.default[j] == "function" && window.t.$filter(m.default[j])) window.t[j + "_module_" + i + "_default"] = {string:m.default[j].toString(), func:m.default[j], module:m};
|
if (m.default && (typeof m.default == "object" || typeof m.default == "function")) for (let j in m.default) if (m.default[j] && typeof m.default[j] == "function" && window.t.$filter(m.default[j])) window.t[j + "_module_" + i + "_default"] = {string: m.default[j].toString(), func: m.default[j], module: m};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (let i in BDFDB.DevUtils.req.m) if (typeof BDFDB.DevUtils.req.m[i] == "function" && window.t.$filter(BDFDB.DevUtils.req.m[i])) window.t["funtion_" + i] = {string:BDFDB.DevUtils.req.m[i].toString(), func:BDFDB.DevUtils.req.m[i]};
|
for (let i in BDFDB.DevUtils.req.m) if (typeof BDFDB.DevUtils.req.m[i] == "function" && window.t.$filter(BDFDB.DevUtils.req.m[i])) window.t["funtion_" + i] = {string: BDFDB.DevUtils.req.m[i].toString(), func: BDFDB.DevUtils.req.m[i]};
|
||||||
console.clear();
|
console.clear();
|
||||||
console.log(window.t);
|
console.log(window.t);
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
# BDFDB - [![Downlad][download-badge]][download-link] [![Paypal][paypal-badge]][paypal-link] [![Patreon][patreon-badge]][patreon-link]
|
# BDFDB - [![Downlad][download-badge]][download-link] [![Paypal][paypal-badge]][paypal-link] [![Patreon][patreon-badge]][patreon-link]
|
||||||
|
|
||||||
[download-badge]: https://img.shields.io/badge/Download-Plugin-brightgreen.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAAC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ffp360/rP8f9/AA0ADzT6lvFdAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAF1SURBVHja7JihTgNBEIb/K1WkBtEEAsESBKEvgEKRAhLHOxAMfQ9cHwEMBoFA1/ACBEGgzbkmUAwI+BENubTs9WZmLz1CZtZd9v7/u9vMZGdAGFabA05Hn3sWrYQwRB9rwafreikbQN5LiV6qhorDARzAARzAARzAARzAARzAARygGOAQ6a+GLr9jmlwpDuJbsxQrER+YYrXaI2D8EZyAEfangj2Fq0NrnBWry8YI5yb7rkRbBrDAK7X9NevlAYCL7Kns79iQKcunOU0+iO0fuSzV1QyUNjkU2b9wS66qm2nt8L3Q/oO7Gk3tWO2InzPtv3isU9RP9jqxmR8LMKsqdPVqFoC8qiDM/HiAcFUQZ34IYDr0VUGW+QEfK8BkVZBmfqkAWVWQZ37JAOA+n/nEtnh/wGd8JWP81Nt0P0r8Wu4ADvAHAOq2fsaP4N8BvFXi/ZoB3FYCcJMNKDbQw9Kc7YdoYfDzB+6xjUuM5mY+wsXYHvgeABIzsPkSOM/lAAAAAElFTkSuQmCC&style=flat
|
[download-badge]: https: //img.shields.io/badge/Download-Plugin-brightgreen.svg?logo=data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAACXBIWXMAAA7EAAAOxAGVKw4bAAADGGlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjaY2BgnuDo4uTKJMDAUFBUUuQe5BgZERmlwH6egY2BmYGBgYGBITG5uMAxIMCHgYGBIS8/L5UBFTAyMHy7xsDIwMDAcFnX0cXJlYE0wJpcUFTCwMBwgIGBwSgltTiZgYHhCwMDQ3p5SUEJAwNjDAMDg0hSdkEJAwNjAQMDg0h2SJAzAwNjCwMDE09JakUJAwMDg3N+QWVRZnpGiYKhpaWlgmNKflKqQnBlcUlqbrGCZ15yflFBflFiSWoKAwMD1A4GBgYGXpf8EgX3xMw8BSMDVQYq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SzV1QyUNjkU2b9wS66qm2nt8L3Q/oO7Gk3tWO2InzPtv3isU9RP9jqxmR8LMKsqdPVqFoC8qiDM/HiAcFUQZ34IYDr0VUGW+QEfK8BkVZBmfqkAWVWQZ37JAOA+n/nEtnh/wGd8JWP81Nt0P0r8Wu4ADvAHAOq2fsaP4N8BvFXi/ZoB3FYCcJMNKDbQw9Kc7YdoYfDzB+6xjUuM5mY+wsXYHvgeABIzsPkSOM/lAAAAAElFTkSuQmCC&style=flat
|
||||||
[download-link]: https://betterdiscord.net/ghdl?url=https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Library/0BDFDB.plugin.js
|
[download-link]: https: //betterdiscord.net/ghdl?url=https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Library/0BDFDB.plugin.js
|
||||||
|
|
||||||
[paypal-badge]: https://img.shields.io/badge/Paypal-Donate!-%23003087.svg?logo=paypal&style=flat
|
[paypal-badge]: https: //img.shields.io/badge/Paypal-Donate!-%23003087.svg?logo=paypal&style=flat
|
||||||
[paypal-link]: https://paypal.me/MircoWittrien
|
[paypal-link]: https: //paypal.me/MircoWittrien
|
||||||
|
|
||||||
[patreon-badge]: https://img.shields.io/badge/Patreon-Support!-%23F96854.svg?logo=patreon&style=flat
|
[patreon-badge]: https: //img.shields.io/badge/Patreon-Support!-%23F96854.svg?logo=patreon&style=flat
|
||||||
[patreon-link]: https://patreon.com/MircoWittrien
|
[patreon-link]: https: //patreon.com/MircoWittrien
|
||||||
|
|
||||||
Give other plugins utility functions
|
Give other plugins utility functions
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
@import url(https://mwittrien.github.io/BetterDiscordAddons/Themes/_res/SupporterBadge.css);
|
@import url(https: //mwittrien.github.io/BetterDiscordAddons/Themes/_res/SupporterBadge.css);
|
||||||
|
|
||||||
#pluginNotice[class=" "], #pluginNotice[class=""] {
|
#pluginNotice[class=" "], #pluginNotice[class=""] {
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
img:not([src]), img[src=""], img[src="null"] {
|
img: not([src]), img[src=""], img[src="null"] {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ img:not([src]), img[src=""], img[src="null"] {
|
||||||
}
|
}
|
||||||
[REPLACE_CLASS_collapsecontainertitle]::after {
|
[REPLACE_CLASS_collapsecontainertitle]::after {
|
||||||
content: "";
|
content: "";
|
||||||
-webkit-mask: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOS4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iQ2FscXVlXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSItOTUwIDUzMiAxOCAxOCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAtOTUwIDUzMiAxOCAxODsiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4NCgkuc3Qwe2ZpbGw6bm9uZTt9DQoJLnN0MXtmaWxsOm5vbmU7c3Ryb2tlOiNGRkZGRkY7c3Ryb2tlLXdpZHRoOjEuNTtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTS05MzIsNTMydjE4aC0xOHYtMThILTkzMnoiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QxIiBwb2ludHM9Ii05MzYuNiw1MzguOCAtOTQxLDU0My4yIC05NDUuNCw1MzguOCAiLz4NCjwvc3ZnPg0K) center/cover no-repeat;
|
-webkit-mask: url(data: image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOS4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iQ2FscXVlXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSItOTUwIDUzMiAxOCAxOCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAtOTUwIDUzMiAxOCAxODsiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4NCgkuc3Qwe2ZpbGw6bm9uZTt9DQoJLnN0MXtmaWxsOm5vbmU7c3Ryb2tlOiNGRkZGRkY7c3Ryb2tlLXdpZHRoOjEuNTtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTS05MzIsNTMydjE4aC0xOHYtMThILTkzMnoiLz4NCjxwb2x5bGluZSBjbGFzcz0ic3QxIiBwb2ludHM9Ii05MzYuNiw1MzguOCAtOTQxLDU0My4yIC05NDUuNCw1MzguOCAiLz4NCjwvc3ZnPg0K) center/cover no-repeat;
|
||||||
background-color: currentColor;
|
background-color: currentColor;
|
||||||
width: 20px;
|
width: 20px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
|
@ -413,7 +413,7 @@ img:not([src]), img[src=""], img[src="null"] {
|
||||||
}
|
}
|
||||||
[REPLACE_CLASS_guildsummaryiconcontainermasked] {
|
[REPLACE_CLASS_guildsummaryiconcontainermasked] {
|
||||||
margin-right: -4px;
|
margin-right: -4px;
|
||||||
-webkit-mask: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 1 1"><path fill="white" d="M 0 0 L 0 1 L 1 1 L 1 0.99804688 A 0.54166669 0.54166669 0 0 1 0.66601562 0.5 A 0.54166669 0.54166669 0 0 1 1 0.001953125 L 1 0 L 0 0 z"/></svg>') center/cover no-repeat;
|
-webkit-mask: url('data: image/svg+xml; utf8, <svg xmlns="http: //www.w3.org/2000/svg" xmlns: xlink="http: //www.w3.org/1999/xlink" version="1.1" viewBox="0 0 1 1"><path fill="white" d="M 0 0 L 0 1 L 1 1 L 1 0.99804688 A 0.54166669 0.54166669 0 0 1 0.66601562 0.5 A 0.54166669 0.54166669 0 0 1 1 0.001953125 L 1 0 L 0 0 z"/></svg>') center/cover no-repeat;
|
||||||
}
|
}
|
||||||
[REPLACE_CLASS_guildsummaryclickableicon] {
|
[REPLACE_CLASS_guildsummaryclickableicon] {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
@ -884,7 +884,7 @@ img:not([src]), img[src=""], img[src="null"] {
|
||||||
}
|
}
|
||||||
[REPLACE_CLASS_colorpickerswatch]:not([REPLACE_CLASS_colorpickerswatchnocolor]):not([REPLACE_CLASS_colorpickerswatchdefault]):not([REPLACE_CLASS_colorpickerswatchdisabled]):after {
|
[REPLACE_CLASS_colorpickerswatch]:not([REPLACE_CLASS_colorpickerswatchnocolor]):not([REPLACE_CLASS_colorpickerswatchdefault]):not([REPLACE_CLASS_colorpickerswatchdisabled]):after {
|
||||||
content: "";
|
content: "";
|
||||||
background: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" width="8" height="8"><rect x="0" y="0" width="4" height="4" fill="black"></rect><rect x="0" y="4" width="4" height="4" fill="white"></rect><rect x="4" y="0" width="4" height="4" fill="white"></rect><rect x="4" y="4" width="4" height="4" fill="black"></rect></svg>') center repeat;
|
background: url('data: image/svg+xml; utf8, <svg xmlns="http: //www.w3.org/2000/svg" width="8" height="8"><rect x="0" y="0" width="4" height="4" fill="black"></rect><rect x="0" y="4" width="4" height="4" fill="white"></rect><rect x="4" y="0" width="4" height="4" fill="white"></rect><rect x="4" y="4" width="4" height="4" fill="black"></rect></svg>') center repeat;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
|
@ -923,8 +923,8 @@ img:not([src]), img[src=""], img[src="null"] {
|
||||||
}
|
}
|
||||||
[REPLACE_CLASS_colorpickeralpha] [REPLACE_CLASS_colorpickeralphacheckered],
|
[REPLACE_CLASS_colorpickeralpha] [REPLACE_CLASS_colorpickeralphacheckered],
|
||||||
[REPLACE_CLASS_colorpickergradient] [REPLACE_CLASS_colorpickergradientcheckered],
|
[REPLACE_CLASS_colorpickergradient] [REPLACE_CLASS_colorpickergradientcheckered],
|
||||||
[REPLACE_CLASS_colorpickergradient] [REPLACE_CLASS_colorpickergradientcursor] > div:after {
|
[REPLACE_CLASS_colorpickergradient] [REPLACE_CLASS_colorpickergradientcursor] > div: after {
|
||||||
background: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" width="8" height="8"><rect x="0" y="0" width="4" height="4" fill="black"></rect><rect x="0" y="4" width="4" height="4" fill="white"></rect><rect x="4" y="0" width="4" height="4" fill="white"></rect><rect x="4" y="4" width="4" height="4" fill="black"></rect></svg>') center repeat;
|
background: url('data: image/svg+xml; utf8, <svg xmlns="http: //www.w3.org/2000/svg" width="8" height="8"><rect x="0" y="0" width="4" height="4" fill="black"></rect><rect x="0" y="4" width="4" height="4" fill="white"></rect><rect x="4" y="0" width="4" height="4" fill="white"></rect><rect x="4" y="4" width="4" height="4" fill="black"></rect></svg>') center repeat;
|
||||||
}
|
}
|
||||||
[REPLACE_CLASS_colorpickergradient] [REPLACE_CLASS_colorpickergradientcursor] > div {
|
[REPLACE_CLASS_colorpickergradient] [REPLACE_CLASS_colorpickergradientcursor] > div {
|
||||||
height: 8px;
|
height: 8px;
|
||||||
|
@ -935,7 +935,7 @@ img:not([src]), img[src=""], img[src="null"] {
|
||||||
transform: translateX(-5px);
|
transform: translateX(-5px);
|
||||||
transform-style: preserve-3d;
|
transform-style: preserve-3d;
|
||||||
}
|
}
|
||||||
[REPLACE_CLASS_colorpickergradient] [REPLACE_CLASS_colorpickergradientcursor] > div:after {
|
[REPLACE_CLASS_colorpickergradient] [REPLACE_CLASS_colorpickergradientcursor] > div: after {
|
||||||
content: "";
|
content: "";
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
@ -946,7 +946,7 @@ img:not([src]), img[src=""], img[src="null"] {
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
transform: translateZ(-1px);
|
transform: translateZ(-1px);
|
||||||
}
|
}
|
||||||
[REPLACE_CLASS_colorpickergradient] [REPLACE_CLASS_colorpickergradientcursor] > div:before {
|
[REPLACE_CLASS_colorpickergradient] [REPLACE_CLASS_colorpickergradientcursor] > div: before {
|
||||||
content: "";
|
content: "";
|
||||||
position: absolute;
|
position: absolute;
|
||||||
border: 3px solid transparent;
|
border: 3px solid transparent;
|
||||||
|
@ -958,24 +958,24 @@ img:not([src]), img[src=""], img[src="null"] {
|
||||||
left: -50%;
|
left: -50%;
|
||||||
transform: translateX(5px);
|
transform: translateX(5px);
|
||||||
}
|
}
|
||||||
[REPLACE_CLASS_colorpickergradient] [REPLACE_CLASS_colorpickergradientcursor][REPLACE_CLASS_colorpickergradientcursoredge] > div:before {
|
[REPLACE_CLASS_colorpickergradient] [REPLACE_CLASS_colorpickergradientcursor][REPLACE_CLASS_colorpickergradientcursoredge] > div: before {
|
||||||
border-right-width: 0;
|
border-right-width: 0;
|
||||||
border-left-width: 5px;
|
border-left-width: 5px;
|
||||||
}
|
}
|
||||||
[REPLACE_CLASS_colorpickergradient] [REPLACE_CLASS_colorpickergradientcursor][REPLACE_CLASS_colorpickergradientcursoredge] ~ [REPLACE_CLASS_colorpickergradientcursor][REPLACE_CLASS_colorpickergradientcursoredge] > div:before {
|
[REPLACE_CLASS_colorpickergradient] [REPLACE_CLASS_colorpickergradientcursor][REPLACE_CLASS_colorpickergradientcursoredge] ~ [REPLACE_CLASS_colorpickergradientcursor][REPLACE_CLASS_colorpickergradientcursoredge] > div: before {
|
||||||
border-right-width: 5px;
|
border-right-width: 5px;
|
||||||
border-left-width: 0;
|
border-left-width: 0;
|
||||||
}
|
}
|
||||||
[REPLACE_CLASS_themelight] [REPLACE_CLASS_colorpickergradient] [REPLACE_CLASS_colorpickergradientcursor][REPLACE_CLASS_colorpickergradientcursorselected] > div {
|
[REPLACE_CLASS_themelight] [REPLACE_CLASS_colorpickergradient] [REPLACE_CLASS_colorpickergradientcursor][REPLACE_CLASS_colorpickergradientcursorselected] > div {
|
||||||
border-color: rgb(55, 55, 55);
|
border-color: rgb(55, 55, 55);
|
||||||
}
|
}
|
||||||
[REPLACE_CLASS_themelight] [REPLACE_CLASS_colorpickergradient] [REPLACE_CLASS_colorpickergradientcursor][REPLACE_CLASS_colorpickergradientcursorselected] > div:before {
|
[REPLACE_CLASS_themelight] [REPLACE_CLASS_colorpickergradient] [REPLACE_CLASS_colorpickergradientcursor][REPLACE_CLASS_colorpickergradientcursorselected] > div: before {
|
||||||
border-top-color: rgb(55, 55, 55);
|
border-top-color: rgb(55, 55, 55);
|
||||||
}
|
}
|
||||||
[REPLACE_CLASS_themedark] [REPLACE_CLASS_colorpickergradient] [REPLACE_CLASS_colorpickergradientcursor][REPLACE_CLASS_colorpickergradientcursorselected] > div {
|
[REPLACE_CLASS_themedark] [REPLACE_CLASS_colorpickergradient] [REPLACE_CLASS_colorpickergradientcursor][REPLACE_CLASS_colorpickergradientcursorselected] > div {
|
||||||
border-color: rgb(200, 200, 200);
|
border-color: rgb(200, 200, 200);
|
||||||
}
|
}
|
||||||
[REPLACE_CLASS_themedark] [REPLACE_CLASS_colorpickergradient] [REPLACE_CLASS_colorpickergradientcursor][REPLACE_CLASS_colorpickergradientcursorselected] > div:before {
|
[REPLACE_CLASS_themedark] [REPLACE_CLASS_colorpickergradient] [REPLACE_CLASS_colorpickergradientcursor][REPLACE_CLASS_colorpickergradientcursorselected] > div: before {
|
||||||
border-top-color: rgb(200, 200, 200);
|
border-top-color: rgb(200, 200, 200);
|
||||||
}
|
}
|
||||||
[REPLACE_CLASS_colorpickergradientbutton] {
|
[REPLACE_CLASS_colorpickergradientbutton] {
|
||||||
|
@ -1011,7 +1011,7 @@ img:not([src]), img[src=""], img[src="null"] {
|
||||||
color: #FFF;
|
color: #FFF;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
#pluginNotice #outdatedPlugins span:hover {
|
#pluginNotice #outdatedPlugins span: hover {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1085,7 +1085,7 @@ img:not([src]), img[src=""], img[src="null"] {
|
||||||
color: #FFF;
|
color: #FFF;
|
||||||
}
|
}
|
||||||
.toast.toast-brand.icon {
|
.toast.toast-brand.icon {
|
||||||
background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiIHhtbDpzcGFjZT0icHJlc2VydmUiIHg9IjBweCIgeT0iMHB4IiB3aWR0aD0iNTEycHgiIGhlaWdodD0iNTEycHgiIHZpZXdCb3g9IjI3IDI3IDExNSAxMTUiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMC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MC4zLTQuNSwxOC40LTUuNywyMS44LTZjMC41LTAuMSwxLjEtMC4yLDEuNi0wLjJjNS45LTAuNywxMi41LTAuOSwxOS40LTAuMmM5LjEsMSwxOC45LDMuNywyOC45LDkuMSBjMCwwLTcuNS03LjItMjMuOS0xMi4xbDEuMy0xLjVjMCwwLDEzLjEtMC4zLDI2LjksMTBjMCwwLDEzLjgsMjQuOCwxMy44LDU1LjRDMTQwLjYsMTA5LjYsMTMyLjUsMTIzLjUsMTExLjMsMTI0LjF6IE0xMDEuNyw3OS43Yy01LjQsMC05LjgsNC43LTkuOCwxMC41YzAsNS44LDQuNCwxMC41LDkuOCwxMC41YzUuNCwwLDkuOC00LjcsOS44LTEwLjUgQzExMS41LDg0LjQsMTA3LjEsNzkuNywxMDEuNyw3OS43eiBNNjYuNyw3OS43Yy01LjQsMC05LjgsNC43LTkuOCwxMC41YzAsNS44LDQuNCwxMC41LDkuOCwxMC41YzUuNCwwLDkuOC00LjcsOS44LTEwLjUgQzc2LjUsODQuNCw3Mi4xLDc5LjcsNjYuNyw3OS43eiIvPjwvc3ZnPg==);
|
||||||
}
|
}
|
||||||
.toast.toast-danger,
|
.toast.toast-danger,
|
||||||
.toast.toast-error {
|
.toast.toast-error {
|
||||||
|
@ -1094,7 +1094,7 @@ img:not([src]), img[src=""], img[src="null"] {
|
||||||
}
|
}
|
||||||
.toast.toast-danger.icon,
|
.toast.toast-danger.icon,
|
||||||
.toast.toast-error.icon {
|
.toast.toast-error.icon {
|
||||||
background-image: url(data:image/svg+xml;base64,PHN2ZyBmaWxsPSIjRkZGRkZGIiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4gICAgPHBhdGggZD0iTTEyIDJDNi40NyAyIDIgNi40NyAyIDEyczQuNDcgMTAgMTAgMTAgMTAtNC40NyAxMC0xMFMxNy41MyAyIDEyIDJ6bTUgMTMuNTlMMTUuNTkgMTcgMTIgMTMuNDEgOC40MSAxNyA3IDE1LjU5IDEwLjU5IDEyIDcgOC40MSA4LjQxIDcgMTIgMTAuNTkgMTUuNTkgNyAxNyA4LjQxIDEzLjQxIDEyIDE3IDE1LjU5eiIvPiAgICA8cGF0aCBkPSJNMCAwaDI0djI0SDB6IiBmaWxsPSJub25lIi8+PC9zdmc+);
|
background-image: url(data: image/svg+xml;base64,PHN2ZyBmaWxsPSIjRkZGRkZGIiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4gICAgPHBhdGggZD0iTTEyIDJDNi40NyAyIDIgNi40NyAyIDEyczQuNDcgMTAgMTAgMTAgMTAtNC40NyAxMC0xMFMxNy41MyAyIDEyIDJ6bTUgMTMuNTlMMTUuNTkgMTcgMTIgMTMuNDEgOC40MSAxNyA3IDE1LjU5IDEwLjU5IDEyIDcgOC40MSA4LjQxIDcgMTIgMTAuNTkgMTUuNTkgNyAxNyA4LjQxIDEzLjQxIDEyIDE3IDE1LjU5eiIvPiAgICA8cGF0aCBkPSJNMCAwaDI0djI0SDB6IiBmaWxsPSJub25lIi8+PC9zdmc+);
|
||||||
}
|
}
|
||||||
.toast.toast-default {
|
.toast.toast-default {
|
||||||
background-color: #F26522;
|
background-color: #F26522;
|
||||||
|
@ -1108,21 +1108,21 @@ img:not([src]), img[src=""], img[src="null"] {
|
||||||
color: #FFF;
|
color: #FFF;
|
||||||
}
|
}
|
||||||
.toast.toast-facebook.icon {
|
.toast.toast-facebook.icon {
|
||||||
background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiIGlkPSJDYXBhXzEiIHg9I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VzZXJ2ZSI+PGc+PHBhdGggaWQ9IkZhY2Vib29rX194MjhfYWx0X3gyOV8iIGQ9Ik05MCwxNS4wMDFDOTAsNy4xMTksODIuODg0LDAsNzUsMEgxNUM3LjExNiwwLDAsNy4xMTksMCwxNS4wMDF2NTkuOTk4ICAgQzAsODIuODgxLDcuMTE2LDkwLDE1LjAwMSw5MEg0NVY1NkgzNFY0MWgxMXYtNS44NDRDNDUsMjUuMDc3LDUyLjU2OCwxNiw2MS44NzUsMTZINzR2MTVINjEuODc1QzYwLjU0OCwzMSw1OSwzMi42MTEsNTksMzUuMDI0VjQxICAgaDE1djE1SDU5djM0aDE2YzcuODg0LDAsMTUtNy4xMTksMTUtMTUuMDAxVjE1LjAwMXoiIGZpbGw9IndoaXRlIi8+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjwvc3ZnPg==);
|
||||||
}
|
}
|
||||||
.toast.toast-info {
|
.toast.toast-info {
|
||||||
background-color: #4A90E2;
|
background-color: #4A90E2;
|
||||||
color: #FFF;
|
color: #FFF;
|
||||||
}
|
}
|
||||||
.toast.toast-info.icon {
|
.toast.toast-info.icon {
|
||||||
background-image: url(data:image/svg+xml;base64,PHN2ZyBmaWxsPSIjRkZGRkZGIiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4gICAgPHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPiAgICA8cGF0aCBkPSJNMTIgMkM2LjQ4IDIgMiA2LjQ4IDIgMTJzNC40OCAxMCAxMCAxMCAxMC00LjQ4IDEwLTEwUzE3LjUyIDIgMTIgMnptMSAxNWgtMnYtNmgydjZ6bTAtOGgtMlY3aDJ2MnoiLz48L3N2Zz4=);
|
background-image: url(data: image/svg+xml;base64,PHN2ZyBmaWxsPSIjRkZGRkZGIiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4gICAgPHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPiAgICA8cGF0aCBkPSJNMTIgMkM2LjQ4IDIgMiA2LjQ4IDIgMTJzNC40OCAxMCAxMCAxMCAxMC00LjQ4IDEwLTEwUzE3LjUyIDIgMTIgMnptMSAxNWgtMnYtNmgydjZ6bTAtOGgtMlY3aDJ2MnoiLz48L3N2Zz4=);
|
||||||
}
|
}
|
||||||
.toast.toast-premium {
|
.toast.toast-premium {
|
||||||
background-color: #202225;
|
background-color: #202225;
|
||||||
color: #FFF;
|
color: #FFF;
|
||||||
}
|
}
|
||||||
.toast.toast-premium.icon {
|
.toast.toast-premium.icon {
|
||||||
background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDMiIGhlaWdodD0iMjYiPiAgPHBhdGggZmlsbD0iI0ZGRiIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNOTYuMjgyNiA4LjYwMjc4ODI0bC0xLjIxNTUgOC4zOTAzNTI5NmMtLjI3NzUgMS45ODI2Mjc0LTIuNDY1NSAyLjkwMzMzMzMtNC40NzkgMi45MDMzMzMzLTEuODc1IDAtMy43MTU1LS45MjA3MDU5LTMuNDcyNS0yLjcyNTkyMTZsMS4yMTU1LTguNTY3NzY0NjZjLjI3NzUtMS44NzY1ODgyNCAyLjQ2NTUtMi44MzI0NzA2IDQuNDc5LTIuODMyNDcwNiAyLjAxNCAwIDMuNzUuOTU1ODgyMzYgMy40NzI1IDIuODMyNDcwNk05My43NzIxLjAwMzky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-size: 63px 16px;
|
||||||
padding-left: 73px;
|
padding-left: 73px;
|
||||||
}
|
}
|
||||||
|
@ -1131,21 +1131,21 @@ img:not([src]), img[src=""], img[src="null"] {
|
||||||
color: #FFF;
|
color: #FFF;
|
||||||
}
|
}
|
||||||
.toast.toast-spotify.icon {
|
.toast.toast-spotify.icon {
|
||||||
background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDUwOC41MiA1MDguNTIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDUwOC41MiA1MDguNTI7IiB4bWw6c3BhY2U9InByZXNlcnZlIiB3aWR0aD0iMjRweCIgaGVpZ2h0PSIyNHB4Ij4KPGc+Cgk8Zz4KCQk8Zz4KCQkJPHBhdGggZD0iTTI1NC4yNiwwQzExMy44NDUsMCwwLDExMy44NDUsMCwyNTQuMjZzMTEzLjg0NSwyNTQuMjYsMjU0LjI2LDI1NC4yNiAgICAgczI1NC4yNi0xMTMuODQ1LDI1NC4yNi0yNTQuMjZTMzk0LjY3NSwwLDI1NC4yNiwweiBNMzcxLjY5Niw0MDMuMjg4Yy0zLjE3OCw1LjgxNi05LjEyMiw5LjA1OC0xNS4yODcsOS4wNTggICAgIGMtMi44NiwwLTUuNzIxLTAuNjY3LTguNDIyLTIuMTI5Yy00MC43MTMtMjIuNDM4L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Pgo=);
|
||||||
}
|
}
|
||||||
.toast.toast-streamermode {
|
.toast.toast-streamermode {
|
||||||
background-color: #593695;
|
background-color: #593695;
|
||||||
color: #FFF;
|
color: #FFF;
|
||||||
}
|
}
|
||||||
.toast.toast-streamermode.icon {
|
.toast.toast-streamermode.icon {
|
||||||
background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiIGlkPSJDYXBhXzEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSItMjUgLTI1IDU0MiA1NDIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ5MiA0OTI7IiB4bWw6c3BhY2U9InByZXNlcnZlIiB3aWR0aD0iNTEycHgiIGhlaWdodD0iNTEycHgiPjxwYXRoIGQ9Ik00ODguMywxNDIuNXYyMDMuMWMwLDE1LjctMTcsMjUuNS0zMC42LDE3LjdsLTg0LjYtNDguOHYxMy45YzAsNDEuOC0zMy45LDc1LjctNzUuNyw3NS43SDc1LjdDMzMuOSw0MDQuMSwwLDM3MC4yLDAsMzI4LjQgICBWMTU5LjljMC00MS44LDMzLjktNzUuNyw3NS43LTc1LjdoMjIxLjhjNDEuOCwwLDc1LjcsMzMuOSw3NS43LDc1Ljd2MTMuOWw4NC42LTQ4LjhDNDcxLjMsMTE3LDQ4OC4zLDEyNi45LDQ4OC4zLDE0Mi41eiIgZmlsbD0iI0ZGRkZGRiIvPjwvc3ZnPg==);
|
background-image: url(data: image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiIGlkPSJDYXBhXzEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSItMjUgLTI1IDU0MiA1NDIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ5MiA0OTI7IiB4bWw6c3BhY2U9InByZXNlcnZlIiB3aWR0aD0iNTEycHgiIGhlaWdodD0iNTEycHgiPjxwYXRoIGQ9Ik00ODguMywxNDIuNXYyMDMuMWMwLDE1LjctMTcsMjUuNS0zMC42LDE3LjdsLTg0LjYtNDguOHYxMy45YzAsNDEuOC0zMy45LDc1LjctNzUuNyw3NS43SDc1LjdDMzMuOSw0MDQuMSwwLDM3MC4yLDAsMzI4LjQgICBWMTU5LjljMC00MS44LDMzLjktNzUuNyw3NS43LTc1LjdoMjIxLjhjNDEuOCwwLDc1LjcsMzMuOSw3NS43LDc1Ljd2MTMuOWw4NC42LTQ4LjhDNDcxLjMsMTE3LDQ4OC4zLDEyNi45LDQ4OC4zLDE0Mi41eiIgZmlsbD0iI0ZGRkZGRiIvPjwvc3ZnPg==);
|
||||||
}
|
}
|
||||||
.toast.toast-success {
|
.toast.toast-success {
|
||||||
background-color: #43B581;
|
background-color: #43B581;
|
||||||
color: #FFF;
|
color: #FFF;
|
||||||
}
|
}
|
||||||
.toast.toast-success.icon {
|
.toast.toast-success.icon {
|
||||||
background-image: url(data:image/svg+xml;base64,PHN2ZyBmaWxsPSIjRkZGRkZGIiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4gICAgPHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPiAgICA8cGF0aCBkPSJNMTIgMkM2LjQ4IDIgMiA2LjQ4IDIgMTJzNC40OCAxMCAxMCAxMCAxMC00LjQ4IDEwLTEwUzE3LjUyIDIgMTIgMnptLTIgMTVsLTUtNSAxLjQxLTEuNDFMMTAgMTQuMTdsNy41OS03LjU5TDE5IDhsLTkgOXoiLz48L3N2Zz4=);
|
background-image: url(data: image/svg+xml;base64,PHN2ZyBmaWxsPSIjRkZGRkZGIiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4gICAgPHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPiAgICA8cGF0aCBkPSJNMTIgMkM2LjQ4IDIgMiA2LjQ4IDIgMTJzNC40OCAxMCAxMCAxMCAxMC00LjQ4IDEwLTEwUzE3LjUyIDIgMTIgMnptLTIgMTVsLTUtNSAxLjQxLTEuNDFMMTAgMTQuMTdsNy41OS03LjU5TDE5IDhsLTkgOXoiLz48L3N2Zz4=);
|
||||||
}
|
}
|
||||||
.toast.toast-warning,
|
.toast.toast-warning,
|
||||||
.toast.toast-warn {
|
.toast.toast-warn {
|
||||||
|
@ -1154,5 +1154,5 @@ img:not([src]), img[src=""], img[src="null"] {
|
||||||
}
|
}
|
||||||
.toast.toast-warning.icon,
|
.toast.toast-warning.icon,
|
||||||
.toast.toast-warn.icon {
|
.toast.toast-warn.icon {
|
||||||
background-image: url(data:image/svg+xml;base64,PHN2ZyBmaWxsPSIjRkZGRkZGIiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4gICAgPHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPiAgICA8cGF0aCBkPSJNMSAyMWgyMkwxMiAyIDEgMjF6bTEyLTNoLTJ2LTJoMnYyem0wLTRoLTJ2LTRoMnY0eiIvPjwvc3ZnPg==);
|
background-image: url(data: image/svg+xml;base64,PHN2ZyBmaWxsPSIjRkZGRkZGIiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4gICAgPHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPiAgICA8cGF0aCBkPSJNMSAyMWgyMkwxMiAyIDEgMjF6bTEyLTNoLTJ2LTJoMnYyem0wLTRoLTJ2LTRoMnY0eiIvPjwvc3ZnPg==);
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ if (window.BDFDB && window.BDFDB.myPlugins && Object.keys(window.BDFDB.myPlugins
|
||||||
let last = i >= Object.keys(plugins).length;
|
let last = i >= Object.keys(plugins).length;
|
||||||
clearTimeout(plugins[name].startTimeout);
|
clearTimeout(plugins[name].startTimeout);
|
||||||
setTimeout(_ => {
|
setTimeout(_ => {
|
||||||
let url = typeof plugins[name].getRawUrl == "function" && typeof plugins[name].getRawUrl() == "string" ? plugins[name].getRawUrl() : `https://mwittrien.github.io/BetterDiscordAddons/Plugins/${name}/${name}.plugin.js`;
|
let url = typeof plugins[name].getRawUrl == "function" && typeof plugins[name].getRawUrl() == "string" ? plugins[name].getRawUrl() : `https: //mwittrien.github.io/BetterDiscordAddons/Plugins/${name}/${name}.plugin.js`;
|
||||||
request(url, (error, response, body) => {
|
request(url, (error, response, body) => {
|
||||||
let filePath = path.join(BdApi.Plugins.folder, name + ".plugin.js");
|
let filePath = path.join(BdApi.Plugins.folder, name + ".plugin.js");
|
||||||
if (!error && body && body.indexOf("/**") == 0 && body.indexOf(` * @name `) > -1) {
|
if (!error && body && body.indexOf("/**") == 0 && body.indexOf(` * @name `) > -1) {
|
||||||
|
@ -30,7 +30,7 @@ if (window.BDFDB && window.BDFDB.myPlugins && Object.keys(window.BDFDB.myPlugins
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if (BdApi.Plugins.get("BDFDB")) downloadPlugins();
|
if (BdApi.Plugins.get("BDFDB")) downloadPlugins();
|
||||||
else request.get("https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (error, response, body) => {
|
else request.get("https: //mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (error, response, body) => {
|
||||||
fs.writeFile(path.join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), body, _ => {
|
fs.writeFile(path.join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), body, _ => {
|
||||||
let count = 0, interval = setInterval(_ => {
|
let count = 0, interval = setInterval(_ => {
|
||||||
if (window.BDFDB_Global) {
|
if (window.BDFDB_Global) {
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
* @name BadgesEverywhere
|
* @name BadgesEverywhere
|
||||||
* @authorId 278543574059057154
|
* @authorId 278543574059057154
|
||||||
* @invite Jx3TjNS
|
* @invite Jx3TjNS
|
||||||
* @donate https://www.paypal.me/MircoWittrien
|
* @donate https: //www.paypal.me/MircoWittrien
|
||||||
* @patreon https://www.patreon.com/MircoWittrien
|
* @patreon https: //www.patreon.com/MircoWittrien
|
||||||
* @website https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/BadgesEverywhere
|
* @website https: //github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/BadgesEverywhere
|
||||||
* @source https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/BadgesEverywhere/BadgesEverywhere.plugin.js
|
* @source https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/BadgesEverywhere/BadgesEverywhere.plugin.js
|
||||||
* @updateUrl https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/BadgesEverywhere/BadgesEverywhere.plugin.js
|
* @updateUrl https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/BadgesEverywhere/BadgesEverywhere.plugin.js
|
||||||
*/
|
*/
|
||||||
|
|
||||||
module.exports = (_ => {
|
module.exports = (_ => {
|
||||||
|
@ -31,7 +31,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
@ -40,7 +40,7 @@ module.exports = (_ => {
|
||||||
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
|
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
|
||||||
onConfirm: _ => {
|
onConfirm: _ => {
|
||||||
delete window.BDFDB_Global.downloadModal;
|
delete window.BDFDB_Global.downloadModal;
|
||||||
require("request").get("https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
|
require("request").get("https: //mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
|
||||||
if (!e && b && b.indexOf(`* @name BDFDB`) > -1) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => {});
|
if (!e && b && b.indexOf(`* @name BDFDB`) > -1) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => {});
|
||||||
else BdApi.alert("Error", "Could not download BDFDB library plugin, try again some time later.");
|
else BdApi.alert("Error", "Could not download BDFDB library plugin, try again some time later.");
|
||||||
});
|
});
|
||||||
|
@ -52,7 +52,7 @@ module.exports = (_ => {
|
||||||
start() {this.load();}
|
start() {this.load();}
|
||||||
stop() {}
|
stop() {}
|
||||||
} : (([Plugin, BDFDB]) => {
|
} : (([Plugin, BDFDB]) => {
|
||||||
var badgeClasses, requestedUsers = {}, loadedUsers = {}, requestQueue = {queue:[], timeout:null, id:null}, cacheTimeout;
|
var badgeClasses, requestedUsers = {}, loadedUsers = {}, requestQueue = {queue: [], timeout: null, id: null}, cacheTimeout;
|
||||||
var nitroFlag, boostFlag;
|
var nitroFlag, boostFlag;
|
||||||
var settings = {}, badges = {}, indicators = {};
|
var settings = {}, badges = {}, indicators = {};
|
||||||
|
|
||||||
|
@ -70,11 +70,11 @@ module.exports = (_ => {
|
||||||
|
|
||||||
this.defaults = {
|
this.defaults = {
|
||||||
settings: {
|
settings: {
|
||||||
showInPopout: {value:true, description:"Show Badge in User Popout"},
|
showInPopout: {value: true, description: "Show Badge in User Popout"},
|
||||||
showInChat: {value:true, description:"Show Badge in Chat Window"},
|
showInChat: {value: true, description: "Show Badge in Chat Window"},
|
||||||
showInMemberList: {value:true, description:"Show Badge in Member List"},
|
showInMemberList: {value: true, description: "Show Badge in Member List"},
|
||||||
useColoredVersion: {value:true, description:"Use colored version of the Badges for Chat and Members"},
|
useColoredVersion: {value: true, description: "Use colored version of the Badges for Chat and Members"},
|
||||||
showNitroDate: {value:true, description:"Show the subscription date for Nitro/Boost Badges"}
|
showNitroDate: {value: true, description: "Show the subscription date for Nitro/Boost Badges"}
|
||||||
},
|
},
|
||||||
badges: {
|
badges: {
|
||||||
"STAFF": {
|
"STAFF": {
|
||||||
|
@ -280,7 +280,7 @@ module.exports = (_ => {
|
||||||
badgeClasses = BDFDB.DiscordClassModules.UserBadges || {};
|
badgeClasses = BDFDB.DiscordClassModules.UserBadges || {};
|
||||||
|
|
||||||
requestedUsers = {}, loadedUsers = {};
|
requestedUsers = {}, loadedUsers = {};
|
||||||
requestQueue = {queue:[], timeout:null, id:null};
|
requestQueue = {queue: [], timeout: null, id: null};
|
||||||
|
|
||||||
let badgeCache = BDFDB.DataUtils.load(this, "badgeCache");
|
let badgeCache = BDFDB.DataUtils.load(this, "badgeCache");
|
||||||
if (badgeCache) {
|
if (badgeCache) {
|
||||||
|
@ -349,7 +349,7 @@ module.exports = (_ => {
|
||||||
labelchildren: this.createSettingsBadges(flag)
|
labelchildren: this.createSettingsBadges(flag)
|
||||||
}));
|
}));
|
||||||
settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsPanelInner, {
|
settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsPanelInner, {
|
||||||
title: "Display Badges:",
|
title: "Display Badges: ",
|
||||||
first: settingsItems.length == 0,
|
first: settingsItems.length == 0,
|
||||||
last: true,
|
last: true,
|
||||||
children: innerItems
|
children: innerItems
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
# Badges Everywhere - [![Downlad][download-badge]][download-link] [![Paypal][paypal-badge]][paypal-link] [![Patreon][patreon-badge]][patreon-link]
|
# Badges Everywhere - [![Downlad][download-badge]][download-link] [![Paypal][paypal-badge]][paypal-link] [![Patreon][patreon-badge]][patreon-link]
|
||||||
|
|
||||||
[download-badge]: https://img.shields.io/badge/Download-Plugin-brightgreen.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAACXBIWXMAAA7EAAAOxAGVKw4bAAADGGlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjaY2BgnuDo4uTKJMDAUFBUUuQe5BgZERmlwH6egY2BmYGBgYGBITG5uMAxIMCHgYGBIS8/L5UBFTAyMHy7xsDIwMDAcFnX0cXJlYE0wJpcUFTCwMBwgIGBwSgltTiZgYHhCwMDQ3p5SUEJAwNjDAMDg0hSdkEJAwNjAQMDg0h2SJAzAwNjCwMDE09JakUJAwMDg3N+QWVRZnpGiYKhpaWlgmNKflKqQnBlcUlqbrGCZ15yflFBflFiSWoKAwMD1A4GBgYGXpf8EgX3xMw8BSMDVQYqg4jIKAUICxE+CD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d99gvwT//ID6wIlBS4N3hVwMfRnOFCEXaRUVEV0RMzN2T9yDBLZE3aSw5IaUNak30zkyLDIzs+ZmX8xlz7PPryjYVPiuWLskq3RV2ZsK/cqSql01jLVedVPrHzbqNdU0n22VaytsP9op3VXUfbpXta+x/+5Em0mzJ/+dGj/t8AyNmf2zvs9JmHt6vvmCpYtEFrcu+bYsc/m9lSGrTq9xWbtvveWGbZtMNm/ZarJt+w6rnft3u+45uy9s/4ODOYd+Hmk/Jn58xUnrU+fOJJ/9dX7SRe1LR68kXv13fc5Nm1t379TfU75/4mHeY7En+59lvhB5efB1/lv5dxc+NH0y/fzq64Lv4T8Ffp360/rP8f9/AA0ADzT6lvFdAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAF1SURBVHja7JihTgNBEIb/K1WkBtEEAsESBKEvgEKRAhLHOxAMfQ9cHwEMBoFA1/ACBEGgzbkmUAwI+BENubTs9WZmLz1CZtZd9v7/u9vMZGdAGFabA05Hn3sWrYQwRB9rwafreikbQN5LiV6qhorDARzAARzAARzAARzAARzAARygGOAQ6a+GLr9jmlwpDuJbsxQrER+YYrXaI2D8EZyAEfangj2Fq0NrnBWry8YI5yb7rkRbBrDAK7X9NevlAYCL7Kns79iQKcunOU0+iO0fuSzV1QyUNjkU2b9wS66qm2nt8L3Q/oO7Gk3tWO2InzPtv3isU9RP9jqxmR8LMKsqdPVqFoC8qiDM/HiAcFUQZ34IYDr0VUGW+QEfK8BkVZBmfqkAWVWQZ37JAOA+n/nEtnh/wGd8JWP81Nt0P0r8Wu4ADvAHAOq2fsaP4N8BvFXi/ZoB3FYCcJMNKDbQw9Kc7YdoYfDzB+6xjUuM5mY+wsXYHvgeABIzsPkSOM/lAAAAAElFTkSuQmCC&style=flat
|
||||||
[download-link]: https://betterdiscord.net/ghdl?url=https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/BadgesEverywhere/BadgesEverywhere.plugin.js
|
[download-link]: https: //betterdiscord.net/ghdl?url=https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/BadgesEverywhere/BadgesEverywhere.plugin.js
|
||||||
|
|
||||||
[paypal-badge]: https://img.shields.io/badge/Paypal-Donate!-%23003087.svg?logo=paypal&style=flat
|
[paypal-badge]: https: //img.shields.io/badge/Paypal-Donate!-%23003087.svg?logo=paypal&style=flat
|
||||||
[paypal-link]: https://paypal.me/MircoWittrien
|
[paypal-link]: https: //paypal.me/MircoWittrien
|
||||||
|
|
||||||
[patreon-badge]: https://img.shields.io/badge/Patreon-Support!-%23F96854.svg?logo=patreon&style=flat
|
[patreon-badge]: https: //img.shields.io/badge/Patreon-Support!-%23F96854.svg?logo=patreon&style=flat
|
||||||
[patreon-link]: https://patreon.com/MircoWittrien
|
[patreon-link]: https: //patreon.com/MircoWittrien
|
||||||
|
|
||||||
Display Badges (Nitro, Hypesquad, etc...) in the chat/memberlist/userpopout
|
Display Badges (Nitro, Hypesquad, etc...) in the chat/memberlist/userpopout
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
* @name BetterFriendList
|
* @name BetterFriendList
|
||||||
* @authorId 278543574059057154
|
* @authorId 278543574059057154
|
||||||
* @invite Jx3TjNS
|
* @invite Jx3TjNS
|
||||||
* @donate https://www.paypal.me/MircoWittrien
|
* @donate https: //www.paypal.me/MircoWittrien
|
||||||
* @patreon https://www.patreon.com/MircoWittrien
|
* @patreon https: //www.patreon.com/MircoWittrien
|
||||||
* @website https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/BetterFriendList
|
* @website https: //github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/BetterFriendList
|
||||||
* @source https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/BetterFriendList/BetterFriendList.plugin.js
|
* @source https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/BetterFriendList/BetterFriendList.plugin.js
|
||||||
* @updateUrl https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/BetterFriendList/BetterFriendList.plugin.js
|
* @updateUrl https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/BetterFriendList/BetterFriendList.plugin.js
|
||||||
*/
|
*/
|
||||||
|
|
||||||
module.exports = (_ => {
|
module.exports = (_ => {
|
||||||
|
@ -31,7 +31,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
@ -40,7 +40,7 @@ module.exports = (_ => {
|
||||||
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
|
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
|
||||||
onConfirm: _ => {
|
onConfirm: _ => {
|
||||||
delete window.BDFDB_Global.downloadModal;
|
delete window.BDFDB_Global.downloadModal;
|
||||||
require("request").get("https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
|
require("request").get("https: //mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
|
||||||
if (!e && b && b.indexOf(`* @name BDFDB`) > -1) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => {});
|
if (!e && b && b.indexOf(`* @name BDFDB`) > -1) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => {});
|
||||||
else BdApi.alert("Error", "Could not download BDFDB library plugin, try again some time later.");
|
else BdApi.alert("Error", "Could not download BDFDB library plugin, try again some time later.");
|
||||||
});
|
});
|
||||||
|
@ -71,10 +71,10 @@ module.exports = (_ => {
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.defaults = {
|
this.defaults = {
|
||||||
settings: {
|
settings: {
|
||||||
addTotalAmount: {value:true, description:"Add total amount for all/requested/blocked"},
|
addTotalAmount: {value: true, description: "Add total amount for all/requested/blocked"},
|
||||||
addSortOptions: {value:true, description:"Add sort options"},
|
addSortOptions: {value: true, description: "Add sort options"},
|
||||||
addSearchbar: {value:true, description:"Add searchbar"},
|
addSearchbar: {value: true, description: "Add searchbar"},
|
||||||
addMutualGuild: {value:true, description:"Add mutual servers in friend list"}
|
addMutualGuild: {value: true, description: "Add mutual servers in friend list"}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
# Better Friend List - [![Downlad][download-badge]][download-link] [![Paypal][paypal-badge]][paypal-link] [![Patreon][patreon-badge]][patreon-link]
|
# Better Friend List - [![Downlad][download-badge]][download-link] [![Paypal][paypal-badge]][paypal-link] [![Patreon][patreon-badge]][patreon-link]
|
||||||
|
|
||||||
[download-badge]: https://img.shields.io/badge/Download-Plugin-brightgreen.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAACXBIWXMAAA7EAAAOxAGVKw4bAAADGGlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjaY2BgnuDo4uTKJMDAUFBUUuQe5BgZERmlwH6egY2BmYGBgYGBITG5uMAxIMCHgYGBIS8/L5UBFTAyMHy7xsDIwMDAcFnX0cXJlYE0wJpcUFTC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tZd9v7/u9vMZGdAGFabA05Hn3sWrYQwRB9rwafreikbQN5LiV6qhorDARzAARzAARzAARzAARzAARygGOAQ6a+GLr9jmlwpDuJbsxQrER+YYrXaI2D8EZyAEfangj2Fq0NrnBWry8YI5yb7rkRbBrDAK7X9NevlAYCL7Kns79iQKcunOU0+iO0fuSzV1QyUNjkU2b9wS66qm2nt8L3Q/oO7Gk3tWO2InzPtv3isU9RP9jqxmR8LMKsqdPVqFoC8qiDM/HiAcFUQZ34IYDr0VUGW+QEfK8BkVZBmfqkAWVWQZ37JAOA+n/nEtnh/wGd8JWP81Nt0P0r8Wu4ADvAHAOq2fsaP4N8BvFXi/ZoB3FYCcJMNKDbQw9Kc7YdoYfDzB+6xjUuM5mY+wsXYHvgeABIzsPkSOM/lAAAAAElFTkSuQmCC&style=flat
|
[download-badge]: https: //img.shields.io/badge/Download-Plugin-brightgreen.svg?logo=data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAACXBIWXMAAA7EAAAOxAGVKw4bAAADGGlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjaY2BgnuDo4uTKJMDAUFBUUuQe5BgZERmlwH6egY2BmYGBgYGBITG5uMAxIMCHgYGBIS8/L5UBFTAyMHy7xsDIwMDAcFnX0cXJlYE0wJpcUFTCwMBwgIGBwSgltTiZgYHhCwMDQ3p5SUEJAwNjDAMDg0hSdkEJAwNjAQMDg0h2SJAzAwNjCwMDE09JakUJAwMDg3N+QWVRZnpGiYKhpaWlgmNKflKqQnBlcUlqbrGCZ15yflFBflFiSWoKAwMD1A4GBgYGXpf8EgX3xMw8BSMDVQYqg4jIKAUICxE+CDEESC4tKoMHJQODAIMCgwGDA0MAQyJDPcMChqMMbxjFGV0YSxlXMN5jEmMKYprAdIFZmDmSeSHzGxZLlg6WW6x6rK2s99gs2aaxfWMPZ9/NocTRxfGFM5HzApcj1xZuTe4FPFI8U3mFeCfxCfNN45fhXyygI7BD0FXwilCq0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/ZoB3FYCcJMNKDbQw9Kc7YdoYfDzB+6xjUuM5mY+wsXYHvgeABIzsPkSOM/lAAAAAElFTkSuQmCC&style=flat
|
||||||
[download-link]: https://betterdiscord.net/ghdl?url=https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/BetterFriendList/BetterFriendList.plugin.js
|
[download-link]: https: //betterdiscord.net/ghdl?url=https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/BetterFriendList/BetterFriendList.plugin.js
|
||||||
|
|
||||||
[paypal-badge]: https://img.shields.io/badge/Paypal-Donate!-%23003087.svg?logo=paypal&style=flat
|
[paypal-badge]: https: //img.shields.io/badge/Paypal-Donate!-%23003087.svg?logo=paypal&style=flat
|
||||||
[paypal-link]: https://paypal.me/MircoWittrien
|
[paypal-link]: https: //paypal.me/MircoWittrien
|
||||||
|
|
||||||
[patreon-badge]: https://img.shields.io/badge/Patreon-Support!-%23F96854.svg?logo=patreon&style=flat
|
[patreon-badge]: https: //img.shields.io/badge/Patreon-Support!-%23F96854.svg?logo=patreon&style=flat
|
||||||
[patreon-link]: https://patreon.com/MircoWittrien
|
[patreon-link]: https: //patreon.com/MircoWittrien
|
||||||
|
|
||||||
Add extra controls to the friends page, like sort by name/status, search and all/request/blocked amount
|
Add extra controls to the friends page, like sort by name/status, search and all/request/blocked amount
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
* @name BetterNsfwTag
|
* @name BetterNsfwTag
|
||||||
* @authorId 278543574059057154
|
* @authorId 278543574059057154
|
||||||
* @invite Jx3TjNS
|
* @invite Jx3TjNS
|
||||||
* @donate https://www.paypal.me/MircoWittrien
|
* @donate https: //www.paypal.me/MircoWittrien
|
||||||
* @patreon https://www.patreon.com/MircoWittrien
|
* @patreon https: //www.patreon.com/MircoWittrien
|
||||||
* @website https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/BetterNsfwTag
|
* @website https: //github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/BetterNsfwTag
|
||||||
* @source https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/BetterNsfwTag/BetterNsfwTag.plugin.js
|
* @source https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/BetterNsfwTag/BetterNsfwTag.plugin.js
|
||||||
*/
|
*/
|
||||||
|
|
||||||
module.exports = (_ => {
|
module.exports = (_ => {
|
||||||
|
@ -29,7 +29,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
@ -38,7 +38,7 @@ module.exports = (_ => {
|
||||||
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
|
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
|
||||||
onConfirm: _ => {
|
onConfirm: _ => {
|
||||||
delete window.BDFDB_Global.downloadModal;
|
delete window.BDFDB_Global.downloadModal;
|
||||||
require("request").get("https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
|
require("request").get("https: //mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
|
||||||
if (!e && b && b.indexOf(`* @name BDFDB`) > -1) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => {});
|
if (!e && b && b.indexOf(`* @name BDFDB`) > -1) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => {});
|
||||||
else BdApi.alert("Error", "Could not download BDFDB library plugin, try again some time later.");
|
else BdApi.alert("Error", "Could not download BDFDB library plugin, try again some time later.");
|
||||||
});
|
});
|
||||||
|
@ -69,7 +69,7 @@ module.exports = (_ => {
|
||||||
|
|
||||||
processChannelItem (e) {
|
processChannelItem (e) {
|
||||||
if (e.instance.props.channel && e.instance.props.channel.nsfw) {
|
if (e.instance.props.channel && e.instance.props.channel.nsfw) {
|
||||||
let children = BDFDB.ReactUtils.findChild(e.returnvalue, {props:[["className", BDFDB.disCN.channelchildren]]});
|
let children = BDFDB.ReactUtils.findChild(e.returnvalue, {props: [["className", BDFDB.disCN.channelchildren]]});
|
||||||
let childrenChilds = children && BDFDB.ArrayUtils.is(children.props.children) ? children.props.children : BDFDB.ObjectUtils.get(children, "props.children.props.children");
|
let childrenChilds = children && BDFDB.ArrayUtils.is(children.props.children) ? children.props.children : BDFDB.ObjectUtils.get(children, "props.children.props.children");
|
||||||
if (BDFDB.ArrayUtils.is(childrenChilds)) {
|
if (BDFDB.ArrayUtils.is(childrenChilds)) {
|
||||||
let [oldTagParent, oldTagIndex] = BDFDB.ReactUtils.findParent(childrenChilds, {key: "NSFW-badge"});
|
let [oldTagParent, oldTagIndex] = BDFDB.ReactUtils.findParent(childrenChilds, {key: "NSFW-badge"});
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
# Better NSFW Tag - [![Downlad][download-badge]][download-link] [![Paypal][paypal-badge]][paypal-link] [![Patreon][patreon-badge]][patreon-link]
|
# Better NSFW Tag - [![Downlad][download-badge]][download-link] [![Paypal][paypal-badge]][paypal-link] [![Patreon][patreon-badge]][patreon-link]
|
||||||
|
|
||||||
[download-badge]: https://img.shields.io/badge/Download-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dX7SRe1LR68kXv13fc5Nm1t379TfU75/4mHeY7En+59lvhB5efB1/lv5dxc+NH0y/fzq64Lv4T8Ffp360/rP8f9/AA0ADzT6lvFdAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAF1SURBVHja7JihTgNBEIb/K1WkBtEEAsESBKEvgEKRAhLHOxAMfQ9cHwEMBoFA1/ACBEGgzbkmUAwI+BENubTs9WZmLz1CZtZd9v7/u9vMZGdAGFabA05Hn3sWrYQwRB9rwafreikbQN5LiV6qhorDARzAARzAARzAARzAARzAARygGOAQ6a+GLr9jmlwpDuJbsxQrER+YYrXaI2D8EZyAEfangj2Fq0NrnBWry8YI5yb7rkRbBrDAK7X9NevlAYCL7Kns79iQKcunOU0+iO0fuSzV1QyUNjkU2b9wS66qm2nt8L3Q/oO7Gk3tWO2InzPtv3isU9RP9jqxmR8LMKsqdPVqFoC8qiDM/HiAcFUQZ34IYDr0VUGW+QEfK8BkVZBmfqkAWVWQZ37JAOA+n/nEtnh/wGd8JWP81Nt0P0r8Wu4ADvAHAOq2fsaP4N8BvFXi/ZoB3FYCcJMNKDbQw9Kc7YdoYfDzB+6xjUuM5mY+wsXYHvgeABIzsPkSOM/lAAAAAElFTkSuQmCC&style=flat
|
[download-badge]: https: //img.shields.io/badge/Download-Plugin-brightgreen.svg?logo=data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAACXBIWXMAAA7EAAAOxAGVKw4bAAADGGlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjaY2BgnuDo4uTKJMDAUFBUUuQe5BgZERmlwH6egY2BmYGBgYGBITG5uMAxIMCHgYGBIS8/L5UBFTAyMHy7xsDIwMDAcFnX0cXJlYE0wJpcUFTCwMBwgIGBwSgltTiZgYHhCwMDQ3p5SUEJAwNjDAMDg0hSdkEJAwNjAQMDg0h2SJAzAwNjCwMDE09JakUJAwMDg3N+QWVRZnpGiYK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XaI2D8EZyAEfangj2Fq0NrnBWry8YI5yb7rkRbBrDAK7X9NevlAYCL7Kns79iQKcunOU0+iO0fuSzV1QyUNjkU2b9wS66qm2nt8L3Q/oO7Gk3tWO2InzPtv3isU9RP9jqxmR8LMKsqdPVqFoC8qiDM/HiAcFUQZ34IYDr0VUGW+QEfK8BkVZBmfqkAWVWQZ37JAOA+n/nEtnh/wGd8JWP81Nt0P0r8Wu4ADvAHAOq2fsaP4N8BvFXi/ZoB3FYCcJMNKDbQw9Kc7YdoYfDzB+6xjUuM5mY+wsXYHvgeABIzsPkSOM/lAAAAAElFTkSuQmCC&style=flat
|
||||||
[download-link]: https://betterdiscord.net/ghdl?url=https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/BetterNsfwTag/BetterNsfwTag.plugin.js
|
[download-link]: https: //betterdiscord.net/ghdl?url=https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/BetterNsfwTag/BetterNsfwTag.plugin.js
|
||||||
|
|
||||||
[paypal-badge]: https://img.shields.io/badge/Paypal-Donate!-%23003087.svg?logo=paypal&style=flat
|
[paypal-badge]: https: //img.shields.io/badge/Paypal-Donate!-%23003087.svg?logo=paypal&style=flat
|
||||||
[paypal-link]: https://paypal.me/MircoWittrien
|
[paypal-link]: https: //paypal.me/MircoWittrien
|
||||||
|
|
||||||
[patreon-badge]: https://img.shields.io/badge/Patreon-Support!-%23F96854.svg?logo=patreon&style=flat
|
[patreon-badge]: https: //img.shields.io/badge/Patreon-Support!-%23F96854.svg?logo=patreon&style=flat
|
||||||
[patreon-link]: https://patreon.com/MircoWittrien
|
[patreon-link]: https: //patreon.com/MircoWittrien
|
||||||
|
|
||||||
Add a more noticeable tag to NSFW channels
|
Add a more noticeable tag to NSFW channels
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
* @name BetterSearchPage
|
* @name BetterSearchPage
|
||||||
* @authorId 278543574059057154
|
* @authorId 278543574059057154
|
||||||
* @invite Jx3TjNS
|
* @invite Jx3TjNS
|
||||||
* @donate https://www.paypal.me/MircoWittrien
|
* @donate https: //www.paypal.me/MircoWittrien
|
||||||
* @patreon https://www.patreon.com/MircoWittrien
|
* @patreon https: //www.patreon.com/MircoWittrien
|
||||||
* @website https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/BetterSearchPage
|
* @website https: //github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/BetterSearchPage
|
||||||
* @source https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/BetterSearchPage/BetterSearchPage.plugin.js
|
* @source https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/BetterSearchPage/BetterSearchPage.plugin.js
|
||||||
* @updateUrl https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/BetterSearchPage/BetterSearchPage.plugin.js
|
* @updateUrl https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/BetterSearchPage/BetterSearchPage.plugin.js
|
||||||
*/
|
*/
|
||||||
|
|
||||||
module.exports = (_ => {
|
module.exports = (_ => {
|
||||||
|
@ -26,7 +26,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
@ -35,7 +35,7 @@ module.exports = (_ => {
|
||||||
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
|
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
|
||||||
onConfirm: _ => {
|
onConfirm: _ => {
|
||||||
delete window.BDFDB_Global.downloadModal;
|
delete window.BDFDB_Global.downloadModal;
|
||||||
require("request").get("https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
|
require("request").get("https: //mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
|
||||||
if (!e && b && b.indexOf(`* @name BDFDB`) > -1) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => {});
|
if (!e && b && b.indexOf(`* @name BDFDB`) > -1) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => {});
|
||||||
else BdApi.alert("Error", "Could not download BDFDB library plugin, try again some time later.");
|
else BdApi.alert("Error", "Could not download BDFDB library plugin, try again some time later.");
|
||||||
});
|
});
|
||||||
|
@ -53,9 +53,9 @@ module.exports = (_ => {
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.defaults = {
|
this.defaults = {
|
||||||
settings: {
|
settings: {
|
||||||
addFirstLast: {value:true, description:"Add a first and last page button"},
|
addFirstLast: {value: true, description: "Add a first and last page button"},
|
||||||
addJumpTo: {value:true, description:"Add a jump to input field (press enter to jump)"},
|
addJumpTo: {value: true, description: "Add a jump to input field (press enter to jump)"},
|
||||||
cloneToTheTop: {value:true, description:"Clone the controls to the top of the results page"}
|
cloneToTheTop: {value: true, description: "Clone the controls to the top of the results page"}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ module.exports = (_ => {
|
||||||
|
|
||||||
processSearchResultsInner (e) {
|
processSearchResultsInner (e) {
|
||||||
if (e.instance.props.search) {
|
if (e.instance.props.search) {
|
||||||
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {name:"SearchPagination"});
|
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {name: "SearchPagination"});
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
let currentPage = parseInt(Math.floor(e.instance.props.search.offset / BDFDB.DiscordConstants.SEARCH_PAGE_SIZE)) + 1;
|
let currentPage = parseInt(Math.floor(e.instance.props.search.offset / BDFDB.DiscordConstants.SEARCH_PAGE_SIZE)) + 1;
|
||||||
let maxPage = e.instance.props.search.totalResults > 5000 ? parseInt(Math.ceil(5000 / BDFDB.DiscordConstants.SEARCH_PAGE_SIZE)) : parseInt(Math.ceil(e.instance.props.search.totalResults / BDFDB.DiscordConstants.SEARCH_PAGE_SIZE));
|
let maxPage = e.instance.props.search.totalResults > 5000 ? parseInt(Math.ceil(5000 / BDFDB.DiscordConstants.SEARCH_PAGE_SIZE)) : parseInt(Math.ceil(e.instance.props.search.totalResults / BDFDB.DiscordConstants.SEARCH_PAGE_SIZE));
|
||||||
|
@ -170,7 +170,7 @@ module.exports = (_ => {
|
||||||
text: BDFDB.LanguageUtils.LanguageStrings.JUMP,
|
text: BDFDB.LanguageUtils.LanguageStrings.JUMP,
|
||||||
"aria-label": BDFDB.LanguageUtils.LanguageStrings.JUMP,
|
"aria-label": BDFDB.LanguageUtils.LanguageStrings.JUMP,
|
||||||
onClick: (event, instance) => {
|
onClick: (event, instance) => {
|
||||||
let jumpInput = BDFDB.ReactUtils.findOwner(instance._reactInternalFiber.return, {key:"BSP-pagination-jumpinput"});
|
let jumpInput = BDFDB.ReactUtils.findOwner(instance._reactInternalFiber.return, {key: "BSP-pagination-jumpinput"});
|
||||||
if (jumpInput) doJump(jumpInput.props.value);
|
if (jumpInput) doJump(jumpInput.props.value);
|
||||||
},
|
},
|
||||||
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Clickable, {
|
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Clickable, {
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
# Better Search Page - [![Downlad][download-badge]][download-link] [![Paypal][paypal-badge]][paypal-link] [![Patreon][patreon-badge]][patreon-link]
|
# Better Search Page - [![Downlad][download-badge]][download-link] [![Paypal][paypal-badge]][paypal-link] [![Patreon][patreon-badge]][patreon-link]
|
||||||
|
|
||||||
[download-badge]: https://img.shields.io/badge/Download-Plugin-brightgreen.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAACXBIWXMAAA7EAAAOxAGVKw4bAAADGGlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjaY2BgnuDo4uTKJMDAUFBUUuQe5BgZERmlwH6egY2BmYGBgYGBITG5uMAxIMCHgYGBIS8/L5UBFTAyMHy7xsDIwMDAcFnX0cXJlYE0wJpcUFTCwMBwgIGBwSgltTiZgYHhCwMDQ3p5SUEJAwNjDAMDg0hSdkEJAwNjAQMDg0h2SJAzAwNjCwMDE09JakUJAwMDg3N+QWVRZnpGiYKhpaWlgmNKflKqQnBlcUlqbrGCZ15yflFBflFiSWoKAwMD1A4GBgYGXpf8EgX3xMw8BSMDVQYqg4jIKAUICxE+CDEESC4tKoMHJQODAIMCgwGDA0MAQyJDPcMChqMMbxjFGV0YSxlXMN5jEmMKYprAdIFZmDmSeSHzGxZLlg6WW6x6rK2s99gs2aaxfWMPZ9/NocTRxfGFM5HzApcj1xZuTe4FPFI8U3mFeCfxCfNN45fhXyygI7BD0FXwilCq0A/hXhEVkb2i4aJfxCaJG4lfkaiQlJM8JpUvLS19QqZMVl32llyfvIv8H4WtioVKekpvldeqFKiaqP5UO6jepRGqqaT5QeuA9iSdVF0rPUG9V/pHDBYY1hrFGNuayJsym740u2C+02KJ5QSrOutcmzjbQDtXe2sHY0cdJzVnJRcFV3k3BXdlD3VPXS8Tbxsfd99gvwT//ID6wIlBS4N3hVwMfRnOFCEXaRUVEV0RMzN2T9yDBLZE3aSw5IaUNak30zkyLDIzs+ZmX8xlz7PPryjYVPiuWLskq3RV2ZsK/cqSql01jLVedVPrHzbqNdU0n22VaytsP9op3VXUfbpXta+x/+5Em0mzJ/+dGj/t8AyNmf2zvs9JmHt6vvmCpYtEFrcu+bYsc/m9lSGrTq9xWbtvveWGbZtMNm/ZarJt+w6rnft3u+45uy9s/4ODOYd+Hmk/Jn58xUnrU+fOJJ/9dX7SRe1LR68kXv13fc5Nm1t379TfU75/4mHeY7En+59lvhB5efB1/lv5dxc+NH0y/fzq64Lv4T8Ffp360/rP8f9/AA0ADzT6lvFdAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAF1SURBVHja7JihTgNBEIb/K1WkBtEEAsESBKEvgEKRAhLHOxAMfQ9cHwEMBoFA1/ACBEGgzbkmUAwI+BENubTs9WZmLz1CZtZd9v7/u9vMZGdAGFabA05Hn3sWrYQwRB9rwafreikbQN5LiV6qhorDARzAARzAARzAARzAARzAARygGOAQ6a+GLr9jmlwpDuJbsxQrER+YYrXaI2D8EZyAEfangj2Fq0NrnBWry8YI5yb7rkRbBrDAK7X9NevlAYCL7Kns79iQKcunOU0+iO0fuSzV1QyUNjkU2b9wS66qm2nt8L3Q/oO7Gk3tWO2InzPtv3isU9RP9jqxmR8LMKsqdPVqFoC8qiDM/HiAcFUQZ34IYDr0VUGW+QEfK8BkVZBmfqkAWVWQZ37JAOA+n/nEtnh/wGd8JWP81Nt0P0r8Wu4ADvAHAOq2fsaP4N8BvFXi/ZoB3FYCcJMNKDbQw9Kc7YdoYfDzB+6xjUuM5mY+wsXYHvgeABIzsPkSOM/lAAAAAElFTkSuQmCC&style=flat
|
[download-badge]: https: //img.shields.io/badge/Download-Plugin-brightgreen.svg?logo=data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAACXBIWXMAAA7EAAAOxAGVKw4bAAADGGlDQ1BQaG90b3Nob3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+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAF1SURBVHja7JihTgNBEIb/K1WkBtEEAsESBKEvgEKRAhLHOxAMfQ9cHwEMBoFA1/ACBEGgzbkmUAwI+BENubTs9WZmLz1CZtZd9v7/u9vMZGdAGFabA05Hn3sWrYQwRB9rwafreikbQN5LiV6qhorDARzAARzAARzAARzAARzAARygGOAQ6a+GLr9jmlwpDuJbsxQrER+YYrXaI2D8EZyAEfangj2Fq0NrnBWry8YI5yb7rkRbBrDAK7X9NevlAYCL7Kns79iQKcunOU0+iO0fuSzV1QyUNjkU2b9wS66qm2nt8L3Q/oO7Gk3tWO2InzPtv3isU9RP9jqxmR8LMKsqdPVqFoC8qiDM/HiAcFUQZ34IYDr0VUGW+QEfK8BkVZBmfqkAWVWQZ37JAOA+n/nEtnh/wGd8JWP81Nt0P0r8Wu4ADvAHAOq2fsaP4N8BvFXi/ZoB3FYCcJMNKDbQw9Kc7YdoYfDzB+6xjUuM5mY+wsXYHvgeABIzsPkSOM/lAAAAAElFTkSuQmCC&style=flat
|
||||||
[download-link]: https://betterdiscord.net/ghdl?url=https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/BetterSearchPage/BetterSearchPage.plugin.js
|
[download-link]: https: //betterdiscord.net/ghdl?url=https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/BetterSearchPage/BetterSearchPage.plugin.js
|
||||||
|
|
||||||
[paypal-badge]: https://img.shields.io/badge/Paypal-Donate!-%23003087.svg?logo=paypal&style=flat
|
[paypal-badge]: https: //img.shields.io/badge/Paypal-Donate!-%23003087.svg?logo=paypal&style=flat
|
||||||
[paypal-link]: https://paypal.me/MircoWittrien
|
[paypal-link]: https: //paypal.me/MircoWittrien
|
||||||
|
|
||||||
[patreon-badge]: https://img.shields.io/badge/Patreon-Support!-%23F96854.svg?logo=patreon&style=flat
|
[patreon-badge]: https: //img.shields.io/badge/Patreon-Support!-%23F96854.svg?logo=patreon&style=flat
|
||||||
[patreon-link]: https://patreon.com/MircoWittrien
|
[patreon-link]: https: //patreon.com/MircoWittrien
|
||||||
|
|
||||||
Add some extra controls to the search results page
|
Add some extra controls to the search results page
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
* @name CharCounter
|
* @name CharCounter
|
||||||
* @authorId 278543574059057154
|
* @authorId 278543574059057154
|
||||||
* @invite Jx3TjNS
|
* @invite Jx3TjNS
|
||||||
* @donate https://www.paypal.me/MircoWittrien
|
* @donate https: //www.paypal.me/MircoWittrien
|
||||||
* @patreon https://www.patreon.com/MircoWittrien
|
* @patreon https: //www.patreon.com/MircoWittrien
|
||||||
* @website https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/CharCounter
|
* @website https: //github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/CharCounter
|
||||||
* @source https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/CharCounter/CharCounter.plugin.js
|
* @source https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/CharCounter/CharCounter.plugin.js
|
||||||
* @updateUrl https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/CharCounter/CharCounter.plugin.js
|
* @updateUrl https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/CharCounter/CharCounter.plugin.js
|
||||||
*/
|
*/
|
||||||
|
|
||||||
module.exports = (_ => {
|
module.exports = (_ => {
|
||||||
|
@ -31,7 +31,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
@ -40,7 +40,7 @@ module.exports = (_ => {
|
||||||
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
|
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
|
||||||
onConfirm: _ => {
|
onConfirm: _ => {
|
||||||
delete window.BDFDB_Global.downloadModal;
|
delete window.BDFDB_Global.downloadModal;
|
||||||
require("request").get("https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
|
require("request").get("https: //mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
|
||||||
if (!e && b && b.indexOf(`* @name BDFDB`) > -1) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => {});
|
if (!e && b && b.indexOf(`* @name BDFDB`) > -1) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => {});
|
||||||
else BdApi.alert("Error", "Could not download BDFDB library plugin, try again some time later.");
|
else BdApi.alert("Error", "Could not download BDFDB library plugin, try again some time later.");
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
# Char Counter - [![Downlad][download-badge]][download-link] [![Paypal][paypal-badge]][paypal-link] [![Patreon][patreon-badge]][patreon-link]
|
# Char Counter - [![Downlad][download-badge]][download-link] [![Paypal][paypal-badge]][paypal-link] [![Patreon][patreon-badge]][patreon-link]
|
||||||
|
|
||||||
[download-badge]: https://img.shields.io/badge/Download-Plugin-brightgreen.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACA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y/fzq64Lv4T8Ffp360/rP8f9/AA0ADzT6lvFdAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAF1SURBVHja7JihTgNBEIb/K1WkBtEEAsESBKEvgEKRAhLHOxAMfQ9cHwEMBoFA1/ACBEGgzbkmUAwI+BENubTs9WZmLz1CZtZd9v7/u9vMZGdAGFabA05Hn3sWrYQwRB9rwafreikbQN5LiV6qhorDARzAARzAARzAARzAARzAARygGOAQ6a+GLr9jmlwpDuJbsxQrER+YYrXaI2D8EZyAEfangj2Fq0NrnBWry8YI5yb7rkRbBrDAK7X9NevlAYCL7Kns79iQKcunOU0+iO0fuSzV1QyUNjkU2b9wS66qm2nt8L3Q/oO7Gk3tWO2InzPtv3isU9RP9jqxmR8LMKsqdPVqFoC8qiDM/HiAcFUQZ34IYDr0VUGW+QEfK8BkVZBmfqkAWVWQZ37JAOA+n/nEtnh/wGd8JWP81Nt0P0r8Wu4ADvAHAOq2fsaP4N8BvFXi/ZoB3FYCcJMNKDbQw9Kc7YdoYfDzB+6xjUuM5mY+wsXYHvgeABIzsPkSOM/lAAAAAElFTkSuQmCC&style=flat
|
[download-badge]: https: //img.shields.io/badge/Download-Plugin-brightgreen.svg?logo=data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAACXBIWXMAAA7EAAAOxAGVKw4bAAADGGlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjaY2BgnuDo4uTKJMDAUFBUUuQe5BgZERmlwH6egY2BmYGBgYGBITG5uMAxIMCHgYGBIS8/L5UBFTAyMHy7xsDIwMDAcFnX0cXJlYE0wJpcUFTCwMBwgIGBwSgltTiZgYHhCwMDQ3p5SUEJAwNjDAMDg0hSdkEJAwNjAQMDg0h2SJAzAwNjCwMDE09JakUJAwMDg3N+QWVRZnpGiYKhpaWlgmNKflKqQnBlcUlqbrGCZ15yflFBflFiSWoKAwMD1A4GBgYGXpf8Eg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iQKcunOU0+iO0fuSzV1QyUNjkU2b9wS66qm2nt8L3Q/oO7Gk3tWO2InzPtv3isU9RP9jqxmR8LMKsqdPVqFoC8qiDM/HiAcFUQZ34IYDr0VUGW+QEfK8BkVZBmfqkAWVWQZ37JAOA+n/nEtnh/wGd8JWP81Nt0P0r8Wu4ADvAHAOq2fsaP4N8BvFXi/ZoB3FYCcJMNKDbQw9Kc7YdoYfDzB+6xjUuM5mY+wsXYHvgeABIzsPkSOM/lAAAAAElFTkSuQmCC&style=flat
|
||||||
[download-link]: https://betterdiscord.net/ghdl?url=https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/CharCounter/CharCounter.plugin.js
|
[download-link]: https: //betterdiscord.net/ghdl?url=https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/CharCounter/CharCounter.plugin.js
|
||||||
|
|
||||||
[paypal-badge]: https://img.shields.io/badge/Paypal-Donate!-%23003087.svg?logo=paypal&style=flat
|
[paypal-badge]: https: //img.shields.io/badge/Paypal-Donate!-%23003087.svg?logo=paypal&style=flat
|
||||||
[paypal-link]: https://paypal.me/MircoWittrien
|
[paypal-link]: https: //paypal.me/MircoWittrien
|
||||||
|
|
||||||
[patreon-badge]: https://img.shields.io/badge/Patreon-Support!-%23F96854.svg?logo=patreon&style=flat
|
[patreon-badge]: https: //img.shields.io/badge/Patreon-Support!-%23F96854.svg?logo=patreon&style=flat
|
||||||
[patreon-link]: https://patreon.com/MircoWittrien
|
[patreon-link]: https: //patreon.com/MircoWittrien
|
||||||
|
|
||||||
Add a character counter to your textarea
|
Add a character counter to your textarea
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
* @name ChatAliases
|
* @name ChatAliases
|
||||||
* @authorId 278543574059057154
|
* @authorId 278543574059057154
|
||||||
* @invite Jx3TjNS
|
* @invite Jx3TjNS
|
||||||
* @donate https://www.paypal.me/MircoWittrien
|
* @donate https: //www.paypal.me/MircoWittrien
|
||||||
* @patreon https://www.patreon.com/MircoWittrien
|
* @patreon https: //www.patreon.com/MircoWittrien
|
||||||
* @website https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/ChatAliases
|
* @website https: //github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/ChatAliases
|
||||||
* @source https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/ChatAliases/ChatAliases.plugin.js
|
* @source https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/ChatAliases/ChatAliases.plugin.js
|
||||||
* @updateUrl https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/ChatAliases/ChatAliases.plugin.js
|
* @updateUrl https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/ChatAliases/ChatAliases.plugin.js
|
||||||
*/
|
*/
|
||||||
|
|
||||||
module.exports = (_ => {
|
module.exports = (_ => {
|
||||||
|
@ -31,7 +31,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
@ -40,7 +40,7 @@ module.exports = (_ => {
|
||||||
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
|
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
|
||||||
onConfirm: _ => {
|
onConfirm: _ => {
|
||||||
delete window.BDFDB_Global.downloadModal;
|
delete window.BDFDB_Global.downloadModal;
|
||||||
require("request").get("https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
|
require("request").get("https: //mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
|
||||||
if (!e && b && b.indexOf(`* @name BDFDB`) > -1) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => {});
|
if (!e && b && b.indexOf(`* @name BDFDB`) > -1) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => {});
|
||||||
else BdApi.alert("Error", "Could not download BDFDB library plugin, try again some time later.");
|
else BdApi.alert("Error", "Could not download BDFDB library plugin, try again some time later.");
|
||||||
});
|
});
|
||||||
|
@ -58,22 +58,22 @@ module.exports = (_ => {
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.defaults = {
|
this.defaults = {
|
||||||
configs: {
|
configs: {
|
||||||
case: {value:false, description:"Handle the wordvalue case sensitive"},
|
case: {value: false, description: "Handle the wordvalue case sensitive"},
|
||||||
exact: {value:true, description:"Handle the wordvalue as an exact word and not as part of a word"},
|
exact: {value: true, description: "Handle the wordvalue as an exact word and not as part of a word"},
|
||||||
autoc: {value:true, description:"Add this alias in the autocomplete menu (not for RegExp)"},
|
autoc: {value: true, description: "Add this alias in the autocomplete menu (not for RegExp)"},
|
||||||
regex: {value:false, description:"Handle the wordvalue as a RegExp string"},
|
regex: {value: false, description: "Handle the wordvalue as a RegExp string"},
|
||||||
file: {value:false, description:"Handle the replacevalue as a filepath"}
|
file: {value: false, description: "Handle the replacevalue as a filepath"}
|
||||||
},
|
},
|
||||||
settings: {
|
settings: {
|
||||||
replaceBeforeSend: {value:true, inner:false, description:"Replace words with your aliases before a message is sent"},
|
replaceBeforeSend: {value: true, inner: false, description: "Replace words with your aliases before a message is sent"},
|
||||||
addContextMenu: {value:true, inner:false, description:"Add a contextmenu entry to faster add new aliases"},
|
addContextMenu: {value: true, inner: false, description: "Add a contextmenu entry to faster add new aliases"},
|
||||||
addAutoComplete: {value:true, inner:false, description:"Add an autocomplete-menu for non-RegExp aliases"},
|
addAutoComplete: {value: true, inner: false, description: "Add an autocomplete-menu for non-RegExp aliases"},
|
||||||
triggerNormal: {value:true, inner:true, description:"Normal Message Textarea"},
|
triggerNormal: {value: true, inner: true, description: "Normal Message Textarea"},
|
||||||
triggerEdit: {value:true, inner:true, description:"Edit Message Textarea"},
|
triggerEdit: {value: true, inner: true, description: "Edit Message Textarea"},
|
||||||
triggerUpload: {value:true, inner:true, description:"Upload Message Prompt"}
|
triggerUpload: {value: true, inner: true, description: "Upload Message Prompt"}
|
||||||
},
|
},
|
||||||
amounts: {
|
amounts: {
|
||||||
minAliasLength: {value:2, min:1, description:"Minimal Character Length to open Autocomplete-Menu:"}
|
minAliasLength: {value: 2, min: 1, description: "Minimal Character Length to open Autocomplete-Menu: "}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -230,7 +230,7 @@ module.exports = (_ => {
|
||||||
max: this.defaults.amounts[key].max,
|
max: this.defaults.amounts[key].max,
|
||||||
value: amounts[key]
|
value: amounts[key]
|
||||||
}))).concat(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsPanelInner, {
|
}))).concat(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsPanelInner, {
|
||||||
title: "Automatically replace aliases in:",
|
title: "Automatically replace aliases in: ",
|
||||||
last: true,
|
last: true,
|
||||||
children: Object.keys(settings).map(key => this.defaults.settings[key].inner && BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
|
children: Object.keys(settings).map(key => this.defaults.settings[key].inner && BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
|
||||||
type: "Switch",
|
type: "Switch",
|
||||||
|
@ -241,14 +241,14 @@ module.exports = (_ => {
|
||||||
}))
|
}))
|
||||||
}))
|
}))
|
||||||
}));
|
}));
|
||||||
let values = {wordvalue:"", replacevalue:""};
|
let values = {wordvalue: "", replacevalue: ""};
|
||||||
settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.CollapseContainer, {
|
settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.CollapseContainer, {
|
||||||
title: "Add new alias",
|
title: "Add new alias",
|
||||||
collapseStates: collapseStates,
|
collapseStates: collapseStates,
|
||||||
children: [
|
children: [
|
||||||
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, {
|
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, {
|
||||||
type: "Button",
|
type: "Button",
|
||||||
label: "Pick a wordvalue and replacevalue:",
|
label: "Pick a wordvalue and replacevalue: ",
|
||||||
key: "ADDBUTTON",
|
key: "ADDBUTTON",
|
||||||
disabled: !Object.keys(values).every(valuename => values[valuename]),
|
disabled: !Object.keys(values).every(valuename => values[valuename]),
|
||||||
children: BDFDB.LanguageUtils.LanguageStrings.ADD,
|
children: BDFDB.LanguageUtils.LanguageStrings.ADD,
|
||||||
|
@ -337,7 +337,7 @@ module.exports = (_ => {
|
||||||
"Autoc: Will appear in the Autocomplete Menu (if enabled).",
|
"Autoc: Will appear in the Autocomplete Menu (if enabled).",
|
||||||
[
|
[
|
||||||
"Regex: Will treat the entered wordvalue as a regular expression. ",
|
"Regex: Will treat the entered wordvalue as a regular expression. ",
|
||||||
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Anchor, {href: "https://regexr.com/", children: BDFDB.LanguageUtils.LanguageStrings.HELP + "?"})
|
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Anchor, {href: "https: //regexr.com/", children: BDFDB.LanguageUtils.LanguageStrings.HELP + "?"})
|
||||||
],
|
],
|
||||||
"File: If the replacevalue is a filepath it will try to upload the file located at the filepath."
|
"File: If the replacevalue is a filepath it will try to upload the file located at the filepath."
|
||||||
].map(string => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormText, {
|
].map(string => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormText, {
|
||||||
|
@ -449,7 +449,7 @@ module.exports = (_ => {
|
||||||
newText = newText.length == 1 ? newText[0] : newText.join(" ");
|
newText = newText.length == 1 ? newText[0] : newText.join(" ");
|
||||||
newText = newText.replace(/ ([\n\t\r]) /g, "$1");
|
newText = newText.replace(/ ([\n\t\r]) /g, "$1");
|
||||||
newText = this.useAliases(newText, multiAliases, files, false);
|
newText = this.useAliases(newText, multiAliases, files, false);
|
||||||
return {text:newText, files};
|
return {text: newText, files};
|
||||||
}
|
}
|
||||||
|
|
||||||
useAliases (string, aliases, files, singleWord) {
|
useAliases (string, aliases, files, singleWord) {
|
||||||
|
@ -468,7 +468,7 @@ module.exports = (_ => {
|
||||||
tempString1 = tempString1.slice(result.index + result[0].length);
|
tempString1 = tempString1.slice(result.index + result[0].length);
|
||||||
if (config.file && typeof config.filedata == "string") {
|
if (config.file && typeof config.filedata == "string") {
|
||||||
let filedata = JSON.parse(config.filedata);
|
let filedata = JSON.parse(config.filedata);
|
||||||
files.push(new File([Uint8Array.from(atob(filedata.data), c => c.charCodeAt(0))], filedata.name, {type:filedata.type}));
|
files.push(new File([Uint8Array.from(atob(filedata.data), c => c.charCodeAt(0))], filedata.name, {type: filedata.type}));
|
||||||
}
|
}
|
||||||
if (config.regex && regString.indexOf("^") == 0) result = null;
|
if (config.regex && regString.indexOf("^") == 0) result = null;
|
||||||
}
|
}
|
||||||
|
@ -521,7 +521,7 @@ module.exports = (_ => {
|
||||||
createInputs (values) {
|
createInputs (values) {
|
||||||
return [
|
return [
|
||||||
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormItem, {
|
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormItem, {
|
||||||
title: "Replace:",
|
title: "Replace: ",
|
||||||
className: "input-wordvalue",
|
className: "input-wordvalue",
|
||||||
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TextInput, {
|
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TextInput, {
|
||||||
value: values.wordvalue,
|
value: values.wordvalue,
|
||||||
|
@ -532,7 +532,7 @@ module.exports = (_ => {
|
||||||
if (!values.wordvalue) instance.props.errorMessage = "Choose a wordvalue";
|
if (!values.wordvalue) instance.props.errorMessage = "Choose a wordvalue";
|
||||||
else if (aliases[values.wordvalue]) instance.props.errorMessage = "Wordvalue already used, saving will overwrite old alias";
|
else if (aliases[values.wordvalue]) instance.props.errorMessage = "Wordvalue already used, saving will overwrite old alias";
|
||||||
else delete instance.props.errorMessage;
|
else delete instance.props.errorMessage;
|
||||||
let addButtonIns = BDFDB.ReactUtils.findOwner(BDFDB.ReactUtils.findOwner(instance, {name:["BDFDB_Modal", "BDFDB_SettingsPanel"], up:true}), {key:"ADDBUTTON"});
|
let addButtonIns = BDFDB.ReactUtils.findOwner(BDFDB.ReactUtils.findOwner(instance, {name: ["BDFDB_Modal", "BDFDB_SettingsPanel"], up: true}), {key: "ADDBUTTON"});
|
||||||
if (addButtonIns) {
|
if (addButtonIns) {
|
||||||
addButtonIns.props.disabled = !Object.keys(values).every(valuename => values[valuename]);
|
addButtonIns.props.disabled = !Object.keys(values).every(valuename => values[valuename]);
|
||||||
BDFDB.ReactUtils.forceUpdate(addButtonIns);
|
BDFDB.ReactUtils.forceUpdate(addButtonIns);
|
||||||
|
@ -541,7 +541,7 @@ module.exports = (_ => {
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormItem, {
|
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormItem, {
|
||||||
title: "With:",
|
title: "With: ",
|
||||||
className: "input-replacevalue",
|
className: "input-replacevalue",
|
||||||
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TextInput, {
|
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TextInput, {
|
||||||
type: "file",
|
type: "file",
|
||||||
|
@ -554,7 +554,7 @@ module.exports = (_ => {
|
||||||
values.replacevalue = value.trim();
|
values.replacevalue = value.trim();
|
||||||
if (!values.replacevalue) instance.props.errorMessage = "Choose a replacevalue";
|
if (!values.replacevalue) instance.props.errorMessage = "Choose a replacevalue";
|
||||||
else delete instance.props.errorMessage;
|
else delete instance.props.errorMessage;
|
||||||
let addButtonIns = BDFDB.ReactUtils.findOwner(BDFDB.ReactUtils.findOwner(instance, {name:["BDFDB_Modal", "BDFDB_SettingsPanel"], up:true}), {key:"ADDBUTTON"});
|
let addButtonIns = BDFDB.ReactUtils.findOwner(BDFDB.ReactUtils.findOwner(instance, {name: ["BDFDB_Modal", "BDFDB_SettingsPanel"], up: true}), {key: "ADDBUTTON"});
|
||||||
if (addButtonIns) {
|
if (addButtonIns) {
|
||||||
addButtonIns.props.disabled = !Object.keys(values).every(valuename => values[valuename]);
|
addButtonIns.props.disabled = !Object.keys(values).every(valuename => values[valuename]);
|
||||||
BDFDB.ReactUtils.forceUpdate(addButtonIns);
|
BDFDB.ReactUtils.forceUpdate(addButtonIns);
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
# Chat Aliases - [![Downlad][download-badge]][download-link] [![Paypal][paypal-badge]][paypal-link] [![Patreon][patreon-badge]][patreon-link]
|
# Chat Aliases - [![Downlad][download-badge]][download-link] [![Paypal][paypal-badge]][paypal-link] [![Patreon][patreon-badge]][patreon-link]
|
||||||
|
|
||||||
[download-badge]: https://img.shields.io/badge/Download-Plugin-brightgreen.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAACXBIWXMAAA7EAAAOxAGVKw4bAAADGGlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjaY2BgnuDo4u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UYAAAF1SURBVHja7JihTgNBEIb/K1WkBtEEAsESBKEvgEKRAhLHOxAMfQ9cHwEMBoFA1/ACBEGgzbkmUAwI+BENubTs9WZmLz1CZtZd9v7/u9vMZGdAGFabA05Hn3sWrYQwRB9rwafreikbQN5LiV6qhorDARzAARzAARzAARzAARzAARygGOAQ6a+GLr9jmlwpDuJbsxQrER+YYrXaI2D8EZyAEfangj2Fq0NrnBWry8YI5yb7rkRbBrDAK7X9NevlAYCL7Kns79iQKcunOU0+iO0fuSzV1QyUNjkU2b9wS66qm2nt8L3Q/oO7Gk3tWO2InzPtv3isU9RP9jqxmR8LMKsqdPVqFoC8qiDM/HiAcFUQZ34IYDr0VUGW+QEfK8BkVZBmfqkAWVWQZ37JAOA+n/nEtnh/wGd8JWP81Nt0P0r8Wu4ADvAHAOq2fsaP4N8BvFXi/ZoB3FYCcJMNKDbQw9Kc7YdoYfDzB+6xjUuM5mY+wsXYHvgeABIzsPkSOM/lAAAAAElFTkSuQmCC&style=flat
|
[download-badge]: https: //img.shields.io/badge/Download-Plugin-brightgreen.svg?logo=data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAACXBIWXMAAA7EAAAOxAGVKw4bAAADGGlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjaY2BgnuDo4uTKJMDAUFBUUuQe5BgZERmlwH6egY2BmYGBgYGBITG5uMAxIMCHgYGBIS8/L5UBFTAyMHy7xsDIwMDAcFnX0cXJlYE0wJpcUFTCwMBwgIGBwSgltTiZgYHhCwMDQ3p5SUEJAwNjDAMDg0hSdkEJAwNjAQMDg0h2SJAzAwNjCwMDE09JakUJAwMDg3N+QWVRZnpGiYKhpaWlgmNKflKqQnBlcUlqbrGCZ15yflFBflFiSWoKAwMD1A4GBgYGXpf8EgX3xMw8BSMDVQYqg4jIKAUICxE+CDEESC4tKoMHJQODAIMCgwGDA0MAQyJDPcMChqMMbxjFGV0YSxlXMN5jEmMKYprAdIFZm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iAcFUQZ34IYDr0VUGW+QEfK8BkVZBmfqkAWVWQZ37JAOA+n/nEtnh/wGd8JWP81Nt0P0r8Wu4ADvAHAOq2fsaP4N8BvFXi/ZoB3FYCcJMNKDbQw9Kc7YdoYfDzB+6xjUuM5mY+wsXYHvgeABIzsPkSOM/lAAAAAElFTkSuQmCC&style=flat
|
||||||
[download-link]: https://betterdiscord.net/ghdl?url=https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/ChatAliases/ChatAliases.plugin.js
|
[download-link]: https: //betterdiscord.net/ghdl?url=https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/ChatAliases/ChatAliases.plugin.js
|
||||||
|
|
||||||
[paypal-badge]: https://img.shields.io/badge/Paypal-Donate!-%23003087.svg?logo=paypal&style=flat
|
[paypal-badge]: https: //img.shields.io/badge/Paypal-Donate!-%23003087.svg?logo=paypal&style=flat
|
||||||
[paypal-link]: https://paypal.me/MircoWittrien
|
[paypal-link]: https: //paypal.me/MircoWittrien
|
||||||
|
|
||||||
[patreon-badge]: https://img.shields.io/badge/Patreon-Support!-%23F96854.svg?logo=patreon&style=flat
|
[patreon-badge]: https: //img.shields.io/badge/Patreon-Support!-%23F96854.svg?logo=patreon&style=flat
|
||||||
[patreon-link]: https://patreon.com/MircoWittrien
|
[patreon-link]: https: //patreon.com/MircoWittrien
|
||||||
|
|
||||||
Allow the user to configure their own chat-aliases which will automatically be replaced before the message is being sent
|
Allow the user to configure their own chat-aliases which will automatically be replaced before the message is being sent
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
* @name ChatFilter
|
* @name ChatFilter
|
||||||
* @authorId 278543574059057154
|
* @authorId 278543574059057154
|
||||||
* @invite Jx3TjNS
|
* @invite Jx3TjNS
|
||||||
* @donate https://www.paypal.me/MircoWittrien
|
* @donate https: //www.paypal.me/MircoWittrien
|
||||||
* @patreon https://www.patreon.com/MircoWittrien
|
* @patreon https: //www.patreon.com/MircoWittrien
|
||||||
* @website https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/ChatFilter
|
* @website https: //github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/ChatFilter
|
||||||
* @source https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/ChatFilter/ChatFilter.plugin.js
|
* @source https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/ChatFilter/ChatFilter.plugin.js
|
||||||
* @updateUrl https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/ChatFilter/ChatFilter.plugin.js
|
* @updateUrl https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/ChatFilter/ChatFilter.plugin.js
|
||||||
*/
|
*/
|
||||||
|
|
||||||
module.exports = (_ => {
|
module.exports = (_ => {
|
||||||
|
@ -26,7 +26,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
@ -35,7 +35,7 @@ module.exports = (_ => {
|
||||||
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
|
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
|
||||||
onConfirm: _ => {
|
onConfirm: _ => {
|
||||||
delete window.BDFDB_Global.downloadModal;
|
delete window.BDFDB_Global.downloadModal;
|
||||||
require("request").get("https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
|
require("request").get("https: //mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
|
||||||
if (!e && b && b.indexOf(`* @name BDFDB`) > -1) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => {});
|
if (!e && b && b.indexOf(`* @name BDFDB`) > -1) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => {});
|
||||||
else BdApi.alert("Error", "Could not download BDFDB library plugin, try again some time later.");
|
else BdApi.alert("Error", "Could not download BDFDB library plugin, try again some time later.");
|
||||||
});
|
});
|
||||||
|
@ -54,17 +54,17 @@ module.exports = (_ => {
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.defaults = {
|
this.defaults = {
|
||||||
configs: {
|
configs: {
|
||||||
empty: {value:false, description:"Allow the replacevalue to be empty (ignoring the default)"},
|
empty: {value: false, description: "Allow the replacevalue to be empty (ignoring the default)"},
|
||||||
case: {value:false, description:"Handle the wordvalue case sensitive"},
|
case: {value: false, description: "Handle the wordvalue case sensitive"},
|
||||||
exact: {value:true, description:"Handle the wordvalue as an exact word and not as part of a word"},
|
exact: {value: true, description: "Handle the wordvalue as an exact word and not as part of a word"},
|
||||||
regex: {value:false, description:"Handle the wordvalue as a RegExp string"}
|
regex: {value: false, description: "Handle the wordvalue as a RegExp string"}
|
||||||
},
|
},
|
||||||
replaces: {
|
replaces: {
|
||||||
blocked: {value:"~~BLOCKED~~", description:"Default replaceword for blocked messages:"},
|
blocked: {value: "~~BLOCKED~~", description: "Default replaceword for blocked messages: "},
|
||||||
censored: {value:"$!%&%!&", description:"Default replaceword for censored messages:"}
|
censored: {value: "$!%&%!&", description: "Default replaceword for censored messages: "}
|
||||||
},
|
},
|
||||||
settings: {
|
settings: {
|
||||||
addContextMenu: {value:true, description:"Add a contextmenu entry to faster add new blocked/censored words:"}
|
addContextMenu: {value: true, description: "Add a contextmenu entry to faster add new blocked/censored words: "}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -116,14 +116,14 @@ module.exports = (_ => {
|
||||||
placeholder: this.defaults.replaces[rType].value
|
placeholder: this.defaults.replaces[rType].value
|
||||||
})))
|
})))
|
||||||
}));
|
}));
|
||||||
let values = {wordvalue:"", replacevalue:"", choice:"blocked"};
|
let values = {wordvalue: "", replacevalue: "", choice: "blocked"};
|
||||||
settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.CollapseContainer, {
|
settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.CollapseContainer, {
|
||||||
title: `Add new blocked/censored word`,
|
title: `Add new blocked/censored word`,
|
||||||
collapseStates: collapseStates,
|
collapseStates: collapseStates,
|
||||||
children: [
|
children: [
|
||||||
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, {
|
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, {
|
||||||
type: "Button",
|
type: "Button",
|
||||||
label: "Pick a wordvalue and replacevalue:",
|
label: "Pick a wordvalue and replacevalue: ",
|
||||||
key: "ADDBUTTON",
|
key: "ADDBUTTON",
|
||||||
disabled: !Object.keys(values).every(valuename => values[valuename]),
|
disabled: !Object.keys(values).every(valuename => values[valuename]),
|
||||||
children: BDFDB.LanguageUtils.LanguageStrings.ADD,
|
children: BDFDB.LanguageUtils.LanguageStrings.ADD,
|
||||||
|
@ -210,7 +210,7 @@ module.exports = (_ => {
|
||||||
"Empty: Ignores the default and set replace word and removes the word/message instead.",
|
"Empty: Ignores the default and set replace word and removes the word/message instead.",
|
||||||
[
|
[
|
||||||
"Regex: Will treat the entered wordvalue as a regular expression. ",
|
"Regex: Will treat the entered wordvalue as a regular expression. ",
|
||||||
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Anchor, {href: "https://regexr.com/", children: BDFDB.LanguageUtils.LanguageStrings.HELP + "?"})
|
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Anchor, {href: "https: //regexr.com/", children: BDFDB.LanguageUtils.LanguageStrings.HELP + "?"})
|
||||||
],
|
],
|
||||||
].map(string => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormText, {
|
].map(string => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormText, {
|
||||||
type: BDFDB.LibraryComponents.FormComponents.FormTextTypes.DESCRIPTION,
|
type: BDFDB.LibraryComponents.FormComponents.FormTextTypes.DESCRIPTION,
|
||||||
|
@ -349,7 +349,7 @@ module.exports = (_ => {
|
||||||
}
|
}
|
||||||
if (blocked) break;
|
if (blocked) break;
|
||||||
}
|
}
|
||||||
if (blocked) return {blocked, censored, content:blockedReplace};
|
if (blocked) return {blocked, censored, content: blockedReplace};
|
||||||
else {
|
else {
|
||||||
content = content.replace(/([\n\t\r])/g, " $1 ");
|
content = content.replace(/([\n\t\r])/g, " $1 ");
|
||||||
for (let cWord in words.censored) {
|
for (let cWord in words.censored) {
|
||||||
|
@ -399,7 +399,7 @@ module.exports = (_ => {
|
||||||
}
|
}
|
||||||
|
|
||||||
openAddModal (wordvalue) {
|
openAddModal (wordvalue) {
|
||||||
let values = {wordvalue, replacevalue:"", choice:"blocked"};
|
let values = {wordvalue, replacevalue: "", choice: "blocked"};
|
||||||
BDFDB.ModalUtils.open(this, {
|
BDFDB.ModalUtils.open(this, {
|
||||||
size: "MEDIUM",
|
size: "MEDIUM",
|
||||||
header: "Add to ChatAliases",
|
header: "Add to ChatAliases",
|
||||||
|
@ -434,7 +434,7 @@ module.exports = (_ => {
|
||||||
createInputs (values) {
|
createInputs (values) {
|
||||||
return [
|
return [
|
||||||
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormItem, {
|
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormItem, {
|
||||||
title: "Block/Censor:",
|
title: "Block/Censor: ",
|
||||||
className: "input-wordvalue",
|
className: "input-wordvalue",
|
||||||
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TextInput, {
|
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TextInput, {
|
||||||
key: "WORDVALUE",
|
key: "WORDVALUE",
|
||||||
|
@ -446,7 +446,7 @@ module.exports = (_ => {
|
||||||
if (!values.wordvalue) instance.props.errorMessage = "Choose a wordvalue";
|
if (!values.wordvalue) instance.props.errorMessage = "Choose a wordvalue";
|
||||||
else if (words[values.choice][values.wordvalue]) instance.props.errorMessage = `Wordvalue already used, saving will overwrite old ${values.choice} word`;
|
else if (words[values.choice][values.wordvalue]) instance.props.errorMessage = `Wordvalue already used, saving will overwrite old ${values.choice} word`;
|
||||||
else delete instance.props.errorMessage;
|
else delete instance.props.errorMessage;
|
||||||
let addButtonIns = BDFDB.ReactUtils.findOwner(BDFDB.ReactUtils.findOwner(instance, {name:["BDFDB_Modal", "BDFDB_SettingsPanel"], up:true}), {key:"ADDBUTTON"});
|
let addButtonIns = BDFDB.ReactUtils.findOwner(BDFDB.ReactUtils.findOwner(instance, {name: ["BDFDB_Modal", "BDFDB_SettingsPanel"], up: true}), {key: "ADDBUTTON"});
|
||||||
if (addButtonIns) {
|
if (addButtonIns) {
|
||||||
addButtonIns.props.disabled = !values.wordvalue;
|
addButtonIns.props.disabled = !values.wordvalue;
|
||||||
BDFDB.ReactUtils.forceUpdate(addButtonIns);
|
BDFDB.ReactUtils.forceUpdate(addButtonIns);
|
||||||
|
@ -455,7 +455,7 @@ module.exports = (_ => {
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormItem, {
|
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormItem, {
|
||||||
title: "With:",
|
title: "With: ",
|
||||||
className: "input-replacevalue",
|
className: "input-replacevalue",
|
||||||
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TextInput, {
|
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TextInput, {
|
||||||
value: values.replacevalue,
|
value: values.replacevalue,
|
||||||
|
@ -469,10 +469,10 @@ module.exports = (_ => {
|
||||||
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.RadioGroup, {
|
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.RadioGroup, {
|
||||||
className: BDFDB.disCN.marginbottom8,
|
className: BDFDB.disCN.marginbottom8,
|
||||||
value: values.choice,
|
value: values.choice,
|
||||||
options: [{value:"blocked", name:"Block"}, {value:"censored", name:"Censor"}],
|
options: [{value: "blocked", name: "Block"}, {value: "censored", name: "Censor"}],
|
||||||
onChange: (value, instance) => {
|
onChange: (value, instance) => {
|
||||||
values.choice = value.value;
|
values.choice = value.value;
|
||||||
let wordvalueInputIns = BDFDB.ReactUtils.findOwner(BDFDB.ReactUtils.findOwner(instance, {name:["BDFDB_Modal", "BDFDB_SettingsPanel"], up:true}), {key:"WORDVALUE"});
|
let wordvalueInputIns = BDFDB.ReactUtils.findOwner(BDFDB.ReactUtils.findOwner(instance, {name: ["BDFDB_Modal", "BDFDB_SettingsPanel"], up: true}), {key: "WORDVALUE"});
|
||||||
if (wordvalueInputIns) {
|
if (wordvalueInputIns) {
|
||||||
if (!values.wordvalue) wordvalueInputIns.props.errorMessage = "Choose a wordvalue";
|
if (!values.wordvalue) wordvalueInputIns.props.errorMessage = "Choose a wordvalue";
|
||||||
else if (words[values.choice][values.wordvalue]) wordvalueInputIns.props.errorMessage = `Wordvalue already used, saving will overwrite old ${values.choice} word`;
|
else if (words[values.choice][values.wordvalue]) wordvalueInputIns.props.errorMessage = `Wordvalue already used, saving will overwrite old ${values.choice} word`;
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
# Chat Filter - [![Downlad][download-badge]][download-link] [![Paypal][paypal-badge]][paypal-link] [![Patreon][patreon-badge]][patreon-link]
|
# Chat Filter - [![Downlad][download-badge]][download-link] [![Paypal][paypal-badge]][paypal-link] [![Patreon][patreon-badge]][patreon-link]
|
||||||
|
|
||||||
[download-badge]: https://img.shields.io/badge/Download-Plugin-brightgreen.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAACXBIWXMAAA7EAAAOxAGVKw4bAAADGGlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjaY2BgnuDo4uTKJMDAUFBUUuQe5BgZERmlwH6egY2BmYGBgYGBITG5uMAxIMCHgYGBIS8/L5UBFTAyMHy7xsDIwMDAcFnX0cXJlYE0wJpcUFTCwMBwgIGBwSgltTiZgYHhCwMDQ3p5SUEJAwNjDAMDg0hSdkEJAwNjAQMDg0h2SJAzAwNjCwMDE09JakUJAwMDg3N+QWVRZnpGiYKhpaWlgmNKflKqQnBlcUlqbrGCZ15yflFBflFiSWoKAwMD1A4GBgYGXpf8EgX3xMw8BSMDVQYqg4jIKAUICxE+CDEESC4tKoMHJQODAIMCgwGDA0MAQyJDPcMChqMMbxjFGV0YSxlXMN5jEmMKYprAdIFZmDmSeSHzGxZLlg6WW6x6rK2s99gs2aaxfWMPZ9/NocTRxfGFM5HzApcj1xZuTe4FPFI8U3mFeCfxCfNN45fhXyygI7BD0FXwilCq0A/hXhEVkb2i4aJfxCaJG4lfkaiQlJM8JpUvLS19QqZMVl32llyfvIv8H4WtioVKekpvldeqFKiaqP5UO6jepRGqqaT5QeuA9iSdVF0rPUG9V/pHDBYY1hrFGNuayJsym740u2C+02KJ5QSrOutcmzjbQDtXe2sHY0cdJzVnJRcFV3k3BXdlD3VPXS8Tbxsfd99gvwT//ID6wIlBS4N3hVwMfRnOFCEXaRUVEV0RMzN2T9yDBLZE3aSw5IaUNak30zkyLDIzs+ZmX8xlz7PPryjYVPiuWLskq3RV2ZsK/cqSql01jLVedVPrHzbqNdU0n22VaytsP9op3VXUfbpXta+x/+5Em0mzJ/+dGj/t8AyNmf2zvs9JmHt6vvmCpYtEFrcu+bYsc/m9lSGrTq9xWbtvveWGbZtMNm/ZarJt+w6rnft3u+45uy9s/4ODOYd+Hmk/Jn58xUnrU+fOJJ/9dX7SRe1LR68kXv13fc5Nm1t379TfU75/4mHeY7En+59lvhB5efB1/lv5dxc+NH0y/fzq64Lv4T8Ffp360/rP8f9/AA0ADzT6lvFdAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAF1SURBVHja7JihTgNBEIb/K1WkBtEEAsESBKEvgEKRAhLHOxAMfQ9cHwEMBoFA1/ACBEGgzbkmUAwI+BENubTs9WZmLz1CZtZd9v7/u9vMZGdAGFabA05Hn3sWrYQwRB9rwafreikbQN5LiV6qhorDARzAARzAARzAARzAARzAARygGOAQ6a+GLr9jmlwpDuJbsxQrER+YYrXaI2D8EZyAEfangj2Fq0NrnBWry8YI5yb7rkRbBrDAK7X9NevlAYCL7Kns79iQKcunOU0+iO0fuSzV1QyUNjkU2b9wS66qm2nt8L3Q/oO7Gk3tWO2InzPtv3isU9RP9jqxmR8LMKsqdPVqFoC8qiDM/HiAcFUQZ34IYDr0VUGW+QEfK8BkVZBmfqkAWVWQZ37JAOA+n/nEtnh/wGd8JWP81Nt0P0r8Wu4ADvAHAOq2fsaP4N8BvFXi/ZoB3FYCcJMNKDbQw9Kc7YdoYfDzB+6xjUuM5mY+wsXYHvgeABIzsPkSOM/lAAAAAElFTkSuQmCC&style=flat
|
[download-badge]: https: //img.shields.io/badge/Download-Plugin-brightgreen.svg?logo=data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAACXBIWXMAAA7EAAAOxAGVKw4bAAADGGlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjaY2BgnuDo4uTKJMDAUFBUUuQe5BgZERmlwH6egY2BmYGBgYGBITG5uMAxIMCHgYGBIS8/L5UBF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BoFA1/ACBEGgzbkmUAwI+BENubTs9WZmLz1CZtZd9v7/u9vMZGdAGFabA05Hn3sWrYQwRB9rwafreikbQN5LiV6qhorDARzAARzAARzAARzAARzAARygGOAQ6a+GLr9jmlwpDuJbsxQrER+YYrXaI2D8EZyAEfangj2Fq0NrnBWry8YI5yb7rkRbBrDAK7X9NevlAYCL7Kns79iQKcunOU0+iO0fuSzV1QyUNjkU2b9wS66qm2nt8L3Q/oO7Gk3tWO2InzPtv3isU9RP9jqxmR8LMKsqdPVqFoC8qiDM/HiAcFUQZ34IYDr0VUGW+QEfK8BkVZBmfqkAWVWQZ37JAOA+n/nEtnh/wGd8JWP81Nt0P0r8Wu4ADvAHAOq2fsaP4N8BvFXi/ZoB3FYCcJMNKDbQw9Kc7YdoYfDzB+6xjUuM5mY+wsXYHvgeABIzsPkSOM/lAAAAAElFTkSuQmCC&style=flat
|
||||||
[download-link]: https://betterdiscord.net/ghdl?url=https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/ChatFilter/ChatFilter.plugin.js
|
[download-link]: https: //betterdiscord.net/ghdl?url=https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/ChatFilter/ChatFilter.plugin.js
|
||||||
|
|
||||||
[paypal-badge]: https://img.shields.io/badge/Paypal-Donate!-%23003087.svg?logo=paypal&style=flat
|
[paypal-badge]: https: //img.shields.io/badge/Paypal-Donate!-%23003087.svg?logo=paypal&style=flat
|
||||||
[paypal-link]: https://paypal.me/MircoWittrien
|
[paypal-link]: https: //paypal.me/MircoWittrien
|
||||||
|
|
||||||
[patreon-badge]: https://img.shields.io/badge/Patreon-Support!-%23F96854.svg?logo=patreon&style=flat
|
[patreon-badge]: https: //img.shields.io/badge/Patreon-Support!-%23F96854.svg?logo=patreon&style=flat
|
||||||
[patreon-link]: https://patreon.com/MircoWittrien
|
[patreon-link]: https: //patreon.com/MircoWittrien
|
||||||
|
|
||||||
Allow the user to censor words or block complete messages based on words in the chatwindow. Blocked in this case means, that a message that contains one of the words will be completely blocked in your chat window. Censored means you will still be able to read the message but the censored words will be unreadable. You can also completely hide blocked messages and enable the option to see the original message while hovering over a censored/blocked message
|
Allow the user to censor words or block complete messages based on words in the chatwindow. Blocked in this case means, that a message that contains one of the words will be completely blocked in your chat window. Censored means you will still be able to read the message but the censored words will be unreadable. You can also completely hide blocked messages and enable the option to see the original message while hovering over a censored/blocked message
|
||||||
Support Regular Expressions
|
Support Regular Expressions
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
* @name CompleteTimestamps
|
* @name CompleteTimestamps
|
||||||
* @authorId 278543574059057154
|
* @authorId 278543574059057154
|
||||||
* @invite Jx3TjNS
|
* @invite Jx3TjNS
|
||||||
* @donate https://www.paypal.me/MircoWittrien
|
* @donate https: //www.paypal.me/MircoWittrien
|
||||||
* @patreon https://www.patreon.com/MircoWittrien
|
* @patreon https: //www.patreon.com/MircoWittrien
|
||||||
* @website https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/CompleteTimestamps
|
* @website https: //github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/CompleteTimestamps
|
||||||
* @source https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/CompleteTimestamps/CompleteTimestamps.plugin.js
|
* @source https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/CompleteTimestamps/CompleteTimestamps.plugin.js
|
||||||
* @updateUrl https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/CompleteTimestamps/CompleteTimestamps.plugin.js
|
* @updateUrl https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/CompleteTimestamps/CompleteTimestamps.plugin.js
|
||||||
*/
|
*/
|
||||||
|
|
||||||
module.exports = (_ => {
|
module.exports = (_ => {
|
||||||
|
@ -31,7 +31,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
@ -40,7 +40,7 @@ module.exports = (_ => {
|
||||||
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
|
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
|
||||||
onConfirm: _ => {
|
onConfirm: _ => {
|
||||||
delete window.BDFDB_Global.downloadModal;
|
delete window.BDFDB_Global.downloadModal;
|
||||||
require("request").get("https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
|
require("request").get("https: //mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
|
||||||
if (!e && b && b.indexOf(`* @name BDFDB`) > -1) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => {});
|
if (!e && b && b.indexOf(`* @name BDFDB`) > -1) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => {});
|
||||||
else BdApi.alert("Error", "Could not download BDFDB library plugin, try again some time later.");
|
else BdApi.alert("Error", "Could not download BDFDB library plugin, try again some time later.");
|
||||||
});
|
});
|
||||||
|
@ -59,24 +59,24 @@ module.exports = (_ => {
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.defaults = {
|
this.defaults = {
|
||||||
settings: {
|
settings: {
|
||||||
showInChat: {value:true, description:"Replace chat timestamp with complete timestamp"},
|
showInChat: {value: true, description: "Replace chat timestamp with complete timestamp"},
|
||||||
showInEmbed: {value:true, description:"Replace embed timestamp with complete timestamp"},
|
showInEmbed: {value: true, description: "Replace embed timestamp with complete timestamp"},
|
||||||
changeForChat: {value:true, description:"Change the time for the chat time tooltips"},
|
changeForChat: {value: true, description: "Change the time for the chat time tooltips"},
|
||||||
changeForEdit: {value:true, description:"Change the time for the edited time tooltips"},
|
changeForEdit: {value: true, description: "Change the time for the edited time tooltips"},
|
||||||
displayTime: {value:true, description:"Display the time in the timestamp"},
|
displayTime: {value: true, description: "Display the time in the timestamp"},
|
||||||
displayDate: {value:true, description:"Display the date in the timestamp"},
|
displayDate: {value: true, description: "Display the date in the timestamp"},
|
||||||
cutSeconds: {value:false, description:"Cut off seconds of the time"},
|
cutSeconds: {value: false, description: "Cut off seconds of the time"},
|
||||||
forceZeros: {value:false, description:"Force leading zeros"},
|
forceZeros: {value: false, description: "Force leading zeros"},
|
||||||
otherOrder: {value:false, description:"Show the time before the date"}
|
otherOrder: {value: false, description: "Show the time before the date"}
|
||||||
},
|
},
|
||||||
choices: {
|
choices: {
|
||||||
timestampLang: {value:"$discord", description:"Timestamp Format"}
|
timestampLang: {value: "$discord", description: "Timestamp Format"}
|
||||||
},
|
},
|
||||||
formats: {
|
formats: {
|
||||||
ownFormat: {value:"$hour:$minute:$second, $day.$month.$year", description:"Own Format"}
|
ownFormat: {value: "$hour: $minute: $second, $day.$month.$year", description: "Own Format"}
|
||||||
},
|
},
|
||||||
amounts: {
|
amounts: {
|
||||||
maxDaysAgo: {value:0, min:0, description:"Maximum count of days displayed in the $daysago placeholder", note:"0 equals no limit"}
|
maxDaysAgo: {value: 0, min: 0, description: "Maximum count of days displayed in the $daysago placeholder", note: "0 equals no limit"}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -122,7 +122,7 @@ module.exports = (_ => {
|
||||||
value: settings[key],
|
value: settings[key],
|
||||||
onChange: (value, instance) => {
|
onChange: (value, instance) => {
|
||||||
settings[key] = value;
|
settings[key] = value;
|
||||||
BDFDB.ReactUtils.forceUpdate(BDFDB.ReactUtils.findOwner(BDFDB.ReactUtils.findOwner(instance, {name:"BDFDB_SettingsPanel", up:true}), {name:"BDFDB_Select", all:true, noCopies:true}));
|
BDFDB.ReactUtils.forceUpdate(BDFDB.ReactUtils.findOwner(BDFDB.ReactUtils.findOwner(instance, {name: "BDFDB_SettingsPanel", up: true}), {name: "BDFDB_Select", all: true, noCopies: true}));
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
}));
|
}));
|
||||||
|
@ -137,7 +137,7 @@ module.exports = (_ => {
|
||||||
label: this.defaults.choices[key].description,
|
label: this.defaults.choices[key].description,
|
||||||
basis: "70%",
|
basis: "70%",
|
||||||
value: choices[key],
|
value: choices[key],
|
||||||
options: BDFDB.ObjectUtils.toArray(BDFDB.ObjectUtils.map(languages, (lang, id) => {return {value:id, label:lang.name}})),
|
options: BDFDB.ObjectUtils.toArray(BDFDB.ObjectUtils.map(languages, (lang, id) => {return {value: id, label: lang.name}})),
|
||||||
searchable: true,
|
searchable: true,
|
||||||
optionRenderer: lang => {
|
optionRenderer: lang => {
|
||||||
return BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Flex, {
|
return BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Flex, {
|
||||||
|
@ -187,7 +187,7 @@ module.exports = (_ => {
|
||||||
value: formats[key],
|
value: formats[key],
|
||||||
onChange: (value, instance) => {
|
onChange: (value, instance) => {
|
||||||
formats[key] = value;
|
formats[key] = value;
|
||||||
BDFDB.ReactUtils.forceUpdate(BDFDB.ReactUtils.findOwner(BDFDB.ReactUtils.findOwner(instance, {name:"BDFDB_SettingsPanel", up:true}), {name:"BDFDB_Select", all:true, noCopies:true}));
|
BDFDB.ReactUtils.forceUpdate(BDFDB.ReactUtils.findOwner(BDFDB.ReactUtils.findOwner(instance, {name: "BDFDB_SettingsPanel", up: true}), {name: "BDFDB_Select", all: true, noCopies: true}));
|
||||||
}
|
}
|
||||||
}))).concat(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormDivider, {
|
}))).concat(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormDivider, {
|
||||||
className: BDFDB.disCN.marginbottom8
|
className: BDFDB.disCN.marginbottom8
|
||||||
|
@ -255,14 +255,14 @@ module.exports = (_ => {
|
||||||
processMessage (e) {
|
processMessage (e) {
|
||||||
if (settings.changeForChat && BDFDB.ObjectUtils.get(e, "instance.props.childrenHeader.type.type.displayName") == "MessageTimestamp") {
|
if (settings.changeForChat && BDFDB.ObjectUtils.get(e, "instance.props.childrenHeader.type.type.displayName") == "MessageTimestamp") {
|
||||||
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {name: e.instance.props.childrenHeader.type});
|
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {name: e.instance.props.childrenHeader.type});
|
||||||
if (index > -1) this.changeTimestamp(children, index, {child:false, tooltip:true});
|
if (index > -1) this.changeTimestamp(children, index, {child: false, tooltip: true});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
processMessageHeader (e) {
|
processMessageHeader (e) {
|
||||||
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {name: "MessageTimestamp"});
|
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {name: "MessageTimestamp"});
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
this.changeTimestamp(children, index, {child:settings.showInChat, tooltip:settings.changeForChat});
|
this.changeTimestamp(children, index, {child: settings.showInChat, tooltip: settings.changeForChat});
|
||||||
this.setMaxWidth(children[index], e.instance.props.compact);
|
this.setMaxWidth(children[index], e.instance.props.compact);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -270,14 +270,14 @@ module.exports = (_ => {
|
||||||
processMessageContent (e) {
|
processMessageContent (e) {
|
||||||
if (e.instance.props.message.editedTimestamp && settings.changeForEdit) {
|
if (e.instance.props.message.editedTimestamp && settings.changeForEdit) {
|
||||||
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {name: "SuffixEdited"});
|
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {name: "SuffixEdited"});
|
||||||
if (index > -1) this.changeTimestamp(children, index, {child:false, tooltip:true});
|
if (index > -1) this.changeTimestamp(children, index, {child: false, tooltip: true});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
processEmbed (e) {
|
processEmbed (e) {
|
||||||
if (e.instance.props.embed.timestamp && settings.showInEmbed) {
|
if (e.instance.props.embed.timestamp && settings.showInEmbed) {
|
||||||
let process = returnvalue => {
|
let process = returnvalue => {
|
||||||
let [children, index] = BDFDB.ReactUtils.findParent(returnvalue, {props:[["className", BDFDB.disCN.embedfootertext]]});
|
let [children, index] = BDFDB.ReactUtils.findParent(returnvalue, {props: [["className", BDFDB.disCN.embedfootertext]]});
|
||||||
if (index > -1 && BDFDB.ArrayUtils.is(children[index].props.children)) children[index].props.children.splice(children[index].props.children.length - 1, 1, this.getTimestamp(languages[choices.timestampLang].id, e.instance.props.embed.timestamp._i));
|
if (index > -1 && BDFDB.ArrayUtils.is(children[index].props.children)) children[index].props.children.splice(children[index].props.children.length - 1, 1, this.getTimestamp(languages[choices.timestampLang].id, e.instance.props.embed.timestamp._i));
|
||||||
};
|
};
|
||||||
if (typeof e.returnvalue.props.children == "function") {
|
if (typeof e.returnvalue.props.children == "function") {
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
# Complete Timestamp - [![Downlad][download-badge]][download-link] [![Paypal][paypal-badge]][paypal-link] [![Patreon][patreon-badge]][patreon-link]
|
# Complete Timestamp - [![Downlad][download-badge]][download-link] [![Paypal][paypal-badge]][paypal-link] [![Patreon][patreon-badge]][patreon-link]
|
||||||
|
|
||||||
[download-badge]: https://img.shields.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+fOJJ/9dX7SRe1LR68kXv13fc5Nm1t379TfU75/4mHeY7En+59lvhB5efB1/lv5dxc+NH0y/fzq64Lv4T8Ffp360/rP8f9/AA0ADzT6lvFdAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAF1SURBVHja7JihTgNBEIb/K1WkBtEEAsESBKEvgEKRAhLHOxAMfQ9cHwEMBoFA1/ACBEGgzbkmUAwI+BENubTs9WZmLz1CZtZd9v7/u9vMZGdAGFabA05Hn3sWrYQwRB9rwafreikbQN5LiV6qhorDARzAARzAARzAARzAARzAARygGOAQ6a+GLr9jmlwpDuJbsxQrER+YYrXaI2D8EZyAEfangj2Fq0NrnBWry8YI5yb7rkRbBrDAK7X9NevlAYCL7Kns79iQKcunOU0+iO0fuSzV1QyUNjkU2b9wS66qm2nt8L3Q/oO7Gk3tWO2InzPtv3isU9RP9jqxmR8LMKsqdPVqFoC8qiDM/HiAcFUQZ34IYDr0VUGW+QEfK8BkVZBmfqkAWVWQZ37JAOA+n/nEtnh/wGd8JWP81Nt0P0r8Wu4ADvAHAOq2fsaP4N8BvFXi/ZoB3FYCcJMNKDbQw9Kc7YdoYfDzB+6xjUuM5mY+wsXYHvgeABIzsPkSOM/lAAAAAElFTkSuQmCC&style=flat
|
[download-badge]: https: //img.shields.io/badge/Download-Plugin-brightgreen.svg?logo=data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAACXBIWXMAAA7EAAAOxAGVKw4bAAADGGlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjaY2BgnuDo4uTKJMDAUFBUUuQe5BgZERmlwH6egY2BmYGBgYGBITG5uMAxIMCHgYGBIS8/L5UBFTAyMHy7xsDIwMDAcFnX0cXJlYE0wJpcUFTCwMBwgIGBwSgltTiZgYHhCwMDQ3p5SUEJAwNjDAMDg0hSdkEJAwNjAQMDg0h2SJAzAwNjCwMDE09JakUJAwMDg3N+QWV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xQrER+YYrXaI2D8EZyAEfangj2Fq0NrnBWry8YI5yb7rkRbBrDAK7X9NevlAYCL7Kns79iQKcunOU0+iO0fuSzV1QyUNjkU2b9wS66qm2nt8L3Q/oO7Gk3tWO2InzPtv3isU9RP9jqxmR8LMKsqdPVqFoC8qiDM/HiAcFUQZ34IYDr0VUGW+QEfK8BkVZBmfqkAWVWQZ37JAOA+n/nEtnh/wGd8JWP81Nt0P0r8Wu4ADvAHAOq2fsaP4N8BvFXi/ZoB3FYCcJMNKDbQw9Kc7YdoYfDzB+6xjUuM5mY+wsXYHvgeABIzsPkSOM/lAAAAAElFTkSuQmCC&style=flat
|
||||||
[download-link]: https://betterdiscord.net/ghdl?url=https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/CompleteTimestamps/CompleteTimestamps.plugin.js
|
[download-link]: https: //betterdiscord.net/ghdl?url=https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/CompleteTimestamps/CompleteTimestamps.plugin.js
|
||||||
|
|
||||||
[paypal-badge]: https://img.shields.io/badge/Paypal-Donate!-%23003087.svg?logo=paypal&style=flat
|
[paypal-badge]: https: //img.shields.io/badge/Paypal-Donate!-%23003087.svg?logo=paypal&style=flat
|
||||||
[paypal-link]: https://paypal.me/MircoWittrien
|
[paypal-link]: https: //paypal.me/MircoWittrien
|
||||||
|
|
||||||
[patreon-badge]: https://img.shields.io/badge/Patreon-Support!-%23F96854.svg?logo=patreon&style=flat
|
[patreon-badge]: https: //img.shields.io/badge/Patreon-Support!-%23F96854.svg?logo=patreon&style=flat
|
||||||
[patreon-link]: https://patreon.com/MircoWittrien
|
[patreon-link]: https: //patreon.com/MircoWittrien
|
||||||
|
|
||||||
Replace all timestamps with complete timestamps
|
Replace all timestamps with complete timestamps
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
* @name CopyRawMessage
|
* @name CopyRawMessage
|
||||||
* @authorId 278543574059057154
|
* @authorId 278543574059057154
|
||||||
* @invite Jx3TjNS
|
* @invite Jx3TjNS
|
||||||
* @donate https://www.paypal.me/MircoWittrien
|
* @donate https: //www.paypal.me/MircoWittrien
|
||||||
* @patreon https://www.patreon.com/MircoWittrien
|
* @patreon https: //www.patreon.com/MircoWittrien
|
||||||
* @website https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/CopyRawMessage
|
* @website https: //github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/CopyRawMessage
|
||||||
* @source https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/CopyRawMessage/CopyRawMessage.plugin.js
|
* @source https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/CopyRawMessage/CopyRawMessage.plugin.js
|
||||||
* @updateUrl https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/CopyRawMessage/CopyRawMessage.plugin.js
|
* @updateUrl https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/CopyRawMessage/CopyRawMessage.plugin.js
|
||||||
*/
|
*/
|
||||||
|
|
||||||
module.exports = (_ => {
|
module.exports = (_ => {
|
||||||
|
@ -31,7 +31,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
@ -40,7 +40,7 @@ module.exports = (_ => {
|
||||||
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
|
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
|
||||||
onConfirm: _ => {
|
onConfirm: _ => {
|
||||||
delete window.BDFDB_Global.downloadModal;
|
delete window.BDFDB_Global.downloadModal;
|
||||||
require("request").get("https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
|
require("request").get("https: //mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
|
||||||
if (!e && b && b.indexOf(`* @name BDFDB`) > -1) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => {});
|
if (!e && b && b.indexOf(`* @name BDFDB`) > -1) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => {});
|
||||||
else BdApi.alert("Error", "Could not download BDFDB library plugin, try again some time later.");
|
else BdApi.alert("Error", "Could not download BDFDB library plugin, try again some time later.");
|
||||||
});
|
});
|
||||||
|
@ -58,7 +58,7 @@ module.exports = (_ => {
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.defaults = {
|
this.defaults = {
|
||||||
settings: {
|
settings: {
|
||||||
copyOnlySelected: {value:true, description:"Only copy selected text of a message"}
|
copyOnlySelected: {value: true, description: "Only copy selected text of a message"}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -117,14 +117,14 @@ module.exports = (_ => {
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
action: _ => {
|
action: _ => {
|
||||||
BDFDB.LibraryRequires.electron.clipboard.write({text:messageString});
|
BDFDB.LibraryRequires.electron.clipboard.write({text: messageString});
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
embedString && BDFDB.ContextMenuUtils.createItem(BDFDB.LibraryComponents.MenuItems.MenuItem, {
|
embedString && BDFDB.ContextMenuUtils.createItem(BDFDB.LibraryComponents.MenuItems.MenuItem, {
|
||||||
label: BDFDB.LanguageUtils.LanguageStrings.COPY_TEXT + " (Raw Embed)",
|
label: BDFDB.LanguageUtils.LanguageStrings.COPY_TEXT + " (Raw Embed)",
|
||||||
id: BDFDB.ContextMenuUtils.createItemId(this.name, "copy-embed"),
|
id: BDFDB.ContextMenuUtils.createItemId(this.name, "copy-embed"),
|
||||||
action: _ => {
|
action: _ => {
|
||||||
BDFDB.LibraryRequires.electron.clipboard.write({text:embedString});
|
BDFDB.LibraryRequires.electron.clipboard.write({text: embedString});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
].filter(n => n);
|
].filter(n => n);
|
||||||
|
@ -150,7 +150,7 @@ module.exports = (_ => {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
action: _ => {
|
action: _ => {
|
||||||
BDFDB.LibraryRequires.electron.clipboard.write({text:e.instance.props.message.content});
|
BDFDB.LibraryRequires.electron.clipboard.write({text: e.instance.props.message.content});
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
@ -164,7 +164,7 @@ module.exports = (_ => {
|
||||||
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Clickable, {
|
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Clickable, {
|
||||||
className: BDFDB.disCN.messagetoolbarbutton,
|
className: BDFDB.disCN.messagetoolbarbutton,
|
||||||
onClick: _ => {
|
onClick: _ => {
|
||||||
BDFDB.LibraryRequires.electron.clipboard.write({text:e.instance.props.message.content});
|
BDFDB.LibraryRequires.electron.clipboard.write({text: e.instance.props.message.content});
|
||||||
},
|
},
|
||||||
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SvgIcon, {
|
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SvgIcon, {
|
||||||
className: BDFDB.disCN.messagetoolbaricon,
|
className: BDFDB.disCN.messagetoolbaricon,
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
# Copy Raw Message - [![Downlad][download-badge]][download-link] [![Paypal][paypal-badge]][paypal-link] [![Patreon][patreon-badge]][patreon-link]
|
# Copy Raw Message - [![Downlad][download-badge]][download-link] [![Paypal][paypal-badge]][paypal-link] [![Patreon][patreon-badge]][patreon-link]
|
||||||
|
|
||||||
[download-badge]: https://img.shields.io/badge/Download-Plugin-brightgreen.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAACXBIWXMAAA7EAAAOxAGVKw4bAAADGGlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjaY2BgnuDo4uTKJMDAUFBUUuQe5BgZERmlwH6egY2BmYGBgYGBITG5uMAxIMCHgYGBIS8/L5UBFTAyMHy7xsDIwMDAcFnX0cXJlYE0wJpcUFTCwMBwgIGBwSgltTiZgYHhCwMDQ3p5SUEJAwNjDAMDg0hSdkEJAwNjAQMDg0h2SJAzAwNjCwMDE09JakUJAwMDg3N+QWVRZnpGiYKhpaWlgmNKflKqQnBlcUlqbrGCZ15yflFBflFiSWoKAwMD1A4GBgYGXpf8EgX3xMw8BSMDVQYqg4jIKAUICxE+CDEESC4tKoMHJQODAIMCgwGDA0MAQyJDPcMChqMMbxjFGV0YSxlXMN5jEmMKYprAdIFZmDmSeSHzGxZLlg6WW6x6rK2s99gs2aaxfWMPZ9/NocTRxfGFM5HzApcj1xZuTe4FPFI8U3mFeCfxCfNN45fhXyygI7BD0FXwilCq0A/hXhEVkb2i4aJfxCaJG4lfkaiQlJM8JpUvLS19QqZMVl32llyfvIv8H4WtioVKekpvldeqFKiaqP5UO6jepRGqqaT5QeuA9iSdVF0rPUG9V/pHDBYY1hrFGNuayJsym740u2C+02KJ5QSrOutcmzjbQDtXe2sHY0cdJzVnJRcFV3k3BXdlD3VPXS8Tbxsfd99gvwT//ID6wIlBS4N3hVwMfRnOFCEXaRUVEV0RMzN2T9yDBLZE3aSw5IaUNak30zkyLDIzs+ZmX8xlz7PPryjYVPiuWLskq3RV2ZsK/cqSql01jLVedVPrHzbqNdU0n22VaytsP9op3VXUfbpXta+x/+5Em0mzJ/+dGj/t8AyNmf2zvs9JmHt6vvmCpYtEFrcu+bYsc/m9lSGrTq9xWbtvveWGbZtMNm/ZarJt+w6rnft3u+45uy9s/4ODOYd+Hmk/Jn58xUnrU+fOJJ/9dX7SRe1LR68kXv13fc5Nm1t379TfU75/4mHeY7En+59lvhB5efB1/lv5dxc+NH0y/fzq64Lv4T8Ffp360/rP8f9/AA0ADzT6lvFdAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAF1SURBVHja7JihTgNBEIb/K1WkBtEEAsESBKEvgEKRAhLHOxAMfQ9cHwEMBoFA1/ACBEGgzbkmUAwI+BENubTs9WZmLz1CZtZd9v7/u9vMZGdAGFabA05Hn3sWrYQwRB9rwafreikbQN5LiV6qhorDARzAARzAARzAARzAARzAARygGOAQ6a+GLr9jmlwpDuJbsxQrER+YYrXaI2D8EZyAEfangj2Fq0NrnBWry8YI5yb7rkRbBrDAK7X9NevlAYCL7Kns79iQKcunOU0+iO0fuSzV1QyUNjkU2b9wS66qm2nt8L3Q/oO7Gk3tWO2InzPtv3isU9RP9jqxmR8LMKsqdPVqFoC8qiDM/HiAcFUQZ34IYDr0VUGW+QEfK8BkVZBmfqkAWVWQZ37JAOA+n/nEtnh/wGd8JWP81Nt0P0r8Wu4ADvAHAOq2fsaP4N8BvFXi/ZoB3FYCcJMNKDbQw9Kc7YdoYfDzB+6xjUuM5mY+wsXYHvgeABIzsPkSOM/lAAAAAElFTkSuQmCC&style=flat
|
[download-badge]: https: //img.shields.io/badge/Download-Plugin-brightgreen.svg?logo=data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAACXBIWXMAAA7EAAAOxAGVKw4bAAADGGlDQ1BQaG90b3Nob3AgSUNDIHByb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B1MAAA6mAAADqYAAAXb5JfxUYAAAF1SURBVHja7JihTgNBEIb/K1WkBtEEAsESBKEvgEKRAhLHOxAMfQ9cHwEMBoFA1/ACBEGgzbkmUAwI+BENubTs9WZmLz1CZtZd9v7/u9vMZGdAGFabA05Hn3sWrYQwRB9rwafreikbQN5LiV6qhorDARzAARzAARzAARzAARzAARygGOAQ6a+GLr9jmlwpDuJbsxQrER+YYrXaI2D8EZyAEfangj2Fq0NrnBWry8YI5yb7rkRbBrDAK7X9NevlAYCL7Kns79iQKcunOU0+iO0fuSzV1QyUNjkU2b9wS66qm2nt8L3Q/oO7Gk3tWO2InzPtv3isU9RP9jqxmR8LMKsqdPVqFoC8qiDM/HiAcFUQZ34IYDr0VUGW+QEfK8BkVZBmfqkAWVWQZ37JAOA+n/nEtnh/wGd8JWP81Nt0P0r8Wu4ADvAHAOq2fsaP4N8BvFXi/ZoB3FYCcJMNKDbQw9Kc7YdoYfDzB+6xjUuM5mY+wsXYHvgeABIzsPkSOM/lAAAAAElFTkSuQmCC&style=flat
|
||||||
[download-link]: https://betterdiscord.net/ghdl?url=https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/CopyRawMessage/CopyRawMessage.plugin.js
|
[download-link]: https: //betterdiscord.net/ghdl?url=https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/CopyRawMessage/CopyRawMessage.plugin.js
|
||||||
|
|
||||||
[paypal-badge]: https://img.shields.io/badge/Paypal-Donate!-%23003087.svg?logo=paypal&style=flat
|
[paypal-badge]: https: //img.shields.io/badge/Paypal-Donate!-%23003087.svg?logo=paypal&style=flat
|
||||||
[paypal-link]: https://paypal.me/MircoWittrien
|
[paypal-link]: https: //paypal.me/MircoWittrien
|
||||||
|
|
||||||
[patreon-badge]: https://img.shields.io/badge/Patreon-Support!-%23F96854.svg?logo=patreon&style=flat
|
[patreon-badge]: https: //img.shields.io/badge/Patreon-Support!-%23F96854.svg?logo=patreon&style=flat
|
||||||
[patreon-link]: https://patreon.com/MircoWittrien
|
[patreon-link]: https: //patreon.com/MircoWittrien
|
||||||
|
|
||||||
Add a entry in the contextmenu when you right click a message that allows you to copy the raw contents of a message
|
Add a entry in the contextmenu when you right click a message that allows you to copy the raw contents of a message
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
* @name CreationDate
|
* @name CreationDate
|
||||||
* @authorId 278543574059057154
|
* @authorId 278543574059057154
|
||||||
* @invite Jx3TjNS
|
* @invite Jx3TjNS
|
||||||
* @donate https://www.paypal.me/MircoWittrien
|
* @donate https: //www.paypal.me/MircoWittrien
|
||||||
* @patreon https://www.patreon.com/MircoWittrien
|
* @patreon https: //www.patreon.com/MircoWittrien
|
||||||
* @website https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/CreationDate
|
* @website https: //github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/CreationDate
|
||||||
* @source https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/CreationDate/CreationDate.plugin.js
|
* @source https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/CreationDate/CreationDate.plugin.js
|
||||||
* @updateUrl https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/CreationDate/CreationDate.plugin.js
|
* @updateUrl https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/CreationDate/CreationDate.plugin.js
|
||||||
*/
|
*/
|
||||||
|
|
||||||
module.exports = (_ => {
|
module.exports = (_ => {
|
||||||
|
@ -31,7 +31,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
@ -40,7 +40,7 @@ module.exports = (_ => {
|
||||||
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
|
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
|
||||||
onConfirm: _ => {
|
onConfirm: _ => {
|
||||||
delete window.BDFDB_Global.downloadModal;
|
delete window.BDFDB_Global.downloadModal;
|
||||||
require("request").get("https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
|
require("request").get("https: //mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
|
||||||
if (!e && b && b.indexOf(`* @name BDFDB`) > -1) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => {});
|
if (!e && b && b.indexOf(`* @name BDFDB`) > -1) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => {});
|
||||||
else BdApi.alert("Error", "Could not download BDFDB library plugin, try again some time later.");
|
else BdApi.alert("Error", "Could not download BDFDB library plugin, try again some time later.");
|
||||||
});
|
});
|
||||||
|
@ -59,23 +59,23 @@ module.exports = (_ => {
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.defaults = {
|
this.defaults = {
|
||||||
settings: {
|
settings: {
|
||||||
addInUserPopout: {value:true, description:"Add in User Popouts"},
|
addInUserPopout: {value: true, description: "Add in User Popouts"},
|
||||||
addInUserProfil: {value:true, description:"Add in User Profile Modal"},
|
addInUserProfil: {value: true, description: "Add in User Profile Modal"},
|
||||||
displayText: {value:true, description:"Display 'Created on' text in the timestamp"},
|
displayText: {value: true, description: "Display 'Created on' text in the timestamp"},
|
||||||
displayTime: {value:true, description:"Display the time in the timestamp"},
|
displayTime: {value: true, description: "Display the time in the timestamp"},
|
||||||
displayDate: {value:true, description:"Display the date in the timestamp"},
|
displayDate: {value: true, description: "Display the date in the timestamp"},
|
||||||
cutSeconds: {value:false, description:"Cut off seconds of the time"},
|
cutSeconds: {value: false, description: "Cut off seconds of the time"},
|
||||||
forceZeros: {value:false, description:"Force leading zeros"},
|
forceZeros: {value: false, description: "Force leading zeros"},
|
||||||
otherOrder: {value:false, description:"Show the time before the date"}
|
otherOrder: {value: false, description: "Show the time before the date"}
|
||||||
},
|
},
|
||||||
choices: {
|
choices: {
|
||||||
creationDateLang: {value:"$discord", description:"Creation Date Format"}
|
creationDateLang: {value: "$discord", description: "Creation Date Format"}
|
||||||
},
|
},
|
||||||
formats: {
|
formats: {
|
||||||
ownFormat: {value:"$hour:$minute:$second, $day.$month.$year", description:"Own Format"}
|
ownFormat: {value: "$hour: $minute: $second, $day.$month.$year", description: "Own Format"}
|
||||||
},
|
},
|
||||||
amounts: {
|
amounts: {
|
||||||
maxDaysAgo: {value:0, min:0, description:"Maximum count of days displayed in the $daysago placeholder", note:"0 equals no limit"}
|
maxDaysAgo: {value: 0, min: 0, description: "Maximum count of days displayed in the $daysago placeholder", note: "0 equals no limit"}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ module.exports = (_ => {
|
||||||
value: settings[key],
|
value: settings[key],
|
||||||
onChange: (value, instance) => {
|
onChange: (value, instance) => {
|
||||||
settings[key] = value;
|
settings[key] = value;
|
||||||
BDFDB.ReactUtils.forceUpdate(BDFDB.ReactUtils.findOwner(BDFDB.ReactUtils.findOwner(instance, {name:"BDFDB_SettingsPanel", up:true}), {name:"BDFDB_Select", all:true, noCopies:true}));
|
BDFDB.ReactUtils.forceUpdate(BDFDB.ReactUtils.findOwner(BDFDB.ReactUtils.findOwner(instance, {name: "BDFDB_SettingsPanel", up: true}), {name: "BDFDB_Select", all: true, noCopies: true}));
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
}));
|
}));
|
||||||
|
@ -132,7 +132,7 @@ module.exports = (_ => {
|
||||||
label: this.defaults.choices[key].description,
|
label: this.defaults.choices[key].description,
|
||||||
basis: "70%",
|
basis: "70%",
|
||||||
value: choices[key],
|
value: choices[key],
|
||||||
options: BDFDB.ObjectUtils.toArray(BDFDB.ObjectUtils.map(languages, (lang, id) => {return {value:id, label:lang.name}})),
|
options: BDFDB.ObjectUtils.toArray(BDFDB.ObjectUtils.map(languages, (lang, id) => {return {value: id, label: lang.name}})),
|
||||||
searchable: true,
|
searchable: true,
|
||||||
optionRenderer: lang => {
|
optionRenderer: lang => {
|
||||||
return BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Flex, {
|
return BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Flex, {
|
||||||
|
@ -182,7 +182,7 @@ module.exports = (_ => {
|
||||||
value: formats[key],
|
value: formats[key],
|
||||||
onChange: (value, instance) => {
|
onChange: (value, instance) => {
|
||||||
formats[key] = value;
|
formats[key] = value;
|
||||||
BDFDB.ReactUtils.forceUpdate(BDFDB.ReactUtils.findOwner(BDFDB.ReactUtils.findOwner(instance, {name:"BDFDB_SettingsPanel", up:true}), {name:"BDFDB_Select", all:true, noCopies:true}));
|
BDFDB.ReactUtils.forceUpdate(BDFDB.ReactUtils.findOwner(BDFDB.ReactUtils.findOwner(instance, {name: "BDFDB_SettingsPanel", up: true}), {name: "BDFDB_Select", all: true, noCopies: true}));
|
||||||
}
|
}
|
||||||
}))).concat(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormDivider, {
|
}))).concat(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormDivider, {
|
||||||
className: BDFDB.disCN.marginbottom8
|
className: BDFDB.disCN.marginbottom8
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
# Creation Date - [![Downlad][download-badge]][download-link] [![Paypal][paypal-badge]][paypal-link] [![Patreon][patreon-badge]][patreon-link]
|
# Creation Date - [![Downlad][download-badge]][download-link] [![Paypal][paypal-badge]][paypal-link] [![Patreon][patreon-badge]][patreon-link]
|
||||||
|
|
||||||
[download-badge]: https://img.shields.io/badge/Download-Plugin-brightgreen.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAACXBIWXMAAA7EAAAOxAGVKw4bAAADGGlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjaY2BgnuDo4uTKJMDAUFBUUuQe5BgZERmlwH6egY2BmYGBgYGBITG5uMAxIMCHgYGBIS8/L5UBFTAyMHy7xsDIwMDAcFnX0cXJlYE0wJpcUFTCwMBwgIGBwSgltTiZgYHhCwMDQ3p5SUEJAwNjDAMDg0hSdkEJAwNjAQMDg0h2SJAzAwNjCwMDE09JakUJAwMDg3N+QWVRZnpGiYKhpaWlgmNKflKqQnBlcUlqbrGCZ15yflFBflFiSWoKAwMD1A4GBgYGXpf8EgX3xMw8BSMDVQYqg4jIKAUICxE+CDEESC4tKoMHJQODAIMCgwGDA0MAQyJDPcMChqMMbxjFGV0YSxlXMN5jEmMKYprAdIFZmDmSeSHzGxZLlg6WW6x6rK2s99gs2aaxfWMPZ9/NocTRxfGFM5HzApcj1xZuTe4FPFI8U3mFeCfxCfNN45fhXyygI7BD0FXwilCq0A/hXhEVkb2i4aJfxCaJG4lfkaiQlJM8JpUvLS19QqZMVl32llyfvIv8H4WtioVKekpvldeqFKiaqP5UO6jepRGqqaT5QeuA9iSdVF0rPUG9V/pHDBYY1hrFGNuayJsym740u2C+02KJ5QSrOutcmzjbQDtXe2sHY0cdJzVnJRcFV3k3BXdlD3VPXS8Tbxsfd99gvwT//ID6wIlBS4N3hVwMfRnOFCEXaRUVEV0RMzN2T9yDBLZE3aSw5IaUNak30zkyLDIzs+ZmX8xlz7PPryjYVPiuWLskq3RV2ZsK/cqSql01jLVedVPrHzbqNdU0n22VaytsP9op3VXUfbpXta+x/+5Em0mzJ/+dGj/t8AyNmf2zvs9JmHt6vvmCpYtEFrcu+bYsc/m9lSGrTq9xWbtvveWGbZtMNm/ZarJt+w6rnft3u+45uy9s/4ODOYd+Hmk/Jn58xUnrU+fOJJ/9dX7SRe1LR68kXv13fc5Nm1t379TfU75/4mHeY7En+59lvhB5efB1/lv5dxc+NH0y/fzq64Lv4T8Ffp360/rP8f9/AA0ADzT6lvFdAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAF1SURBVHja7JihTgNBEIb/K1WkBtEEAsESBKEvgEKRAhLHOxAMfQ9cHwEMBoFA1/ACBEGgzbkmUAwI+BENubTs9WZmLz1CZtZd9v7/u9vMZGdAGFabA05Hn3sWrYQwRB9rwafreikbQN5LiV6qhorDARzAARzAARzAARzAARzAARygGOAQ6a+GLr9jmlwpDuJbsxQrER+YYrXaI2D8EZyAEfangj2Fq0NrnBWry8YI5yb7rkRbBrDAK7X9NevlAYCL7Kns79iQKcunOU0+iO0fuSzV1QyUNjkU2b9wS66qm2nt8L3Q/oO7Gk3tWO2InzPtv3isU9RP9jqxmR8LMKsqdPVqFoC8qiDM/HiAcFUQZ34IYDr0VUGW+QEfK8BkVZBmfqkAWVWQZ37JAOA+n/nEtnh/wGd8JWP81Nt0P0r8Wu4ADvAHAOq2fsaP4N8BvFXi/ZoB3FYCcJMNKDbQw9Kc7YdoYfDzB+6xjUuM5mY+wsXYHvgeABIzsPkSOM/lAAAAAElFTkSuQmCC&style=flat
|
[download-badge]: https: //img.shields.io/badge/Download-Plugin-brightgreen.svg?logo=data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAACXBIWXMAAA7EAAAOxAGVKw4bAAADGGlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjaY2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AAXb5JfxUYAAAF1SURBVHja7JihTgNBEIb/K1WkBtEEAsESBKEvgEKRAhLHOxAMfQ9cHwEMBoFA1/ACBEGgzbkmUAwI+BENubTs9WZmLz1CZtZd9v7/u9vMZGdAGFabA05Hn3sWrYQwRB9rwafreikbQN5LiV6qhorDARzAARzAARzAARzAARzAARygGOAQ6a+GLr9jmlwpDuJbsxQrER+YYrXaI2D8EZyAEfangj2Fq0NrnBWry8YI5yb7rkRbBrDAK7X9NevlAYCL7Kns79iQKcunOU0+iO0fuSzV1QyUNjkU2b9wS66qm2nt8L3Q/oO7Gk3tWO2InzPtv3isU9RP9jqxmR8LMKsqdPVqFoC8qiDM/HiAcFUQZ34IYDr0VUGW+QEfK8BkVZBmfqkAWVWQZ37JAOA+n/nEtnh/wGd8JWP81Nt0P0r8Wu4ADvAHAOq2fsaP4N8BvFXi/ZoB3FYCcJMNKDbQw9Kc7YdoYfDzB+6xjUuM5mY+wsXYHvgeABIzsPkSOM/lAAAAAElFTkSuQmCC&style=flat
|
||||||
[download-link]: https://betterdiscord.net/ghdl?url=https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/CreationDate/CreationDate.plugin.js
|
[download-link]: https: //betterdiscord.net/ghdl?url=https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/CreationDate/CreationDate.plugin.js
|
||||||
|
|
||||||
[paypal-badge]: https://img.shields.io/badge/Paypal-Donate!-%23003087.svg?logo=paypal&style=flat
|
[paypal-badge]: https: //img.shields.io/badge/Paypal-Donate!-%23003087.svg?logo=paypal&style=flat
|
||||||
[paypal-link]: https://paypal.me/MircoWittrien
|
[paypal-link]: https: //paypal.me/MircoWittrien
|
||||||
|
|
||||||
[patreon-badge]: https://img.shields.io/badge/Patreon-Support!-%23F96854.svg?logo=patreon&style=flat
|
[patreon-badge]: https: //img.shields.io/badge/Patreon-Support!-%23F96854.svg?logo=patreon&style=flat
|
||||||
[patreon-link]: https://patreon.com/MircoWittrien
|
[patreon-link]: https: //patreon.com/MircoWittrien
|
||||||
|
|
||||||
Display the Creation Date of an Account in the UserPopout and UserModal
|
Display the Creation Date of an Account in the UserPopout and UserModal
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
* @name CustomQuoter
|
* @name CustomQuoter
|
||||||
* @authorId 278543574059057154
|
* @authorId 278543574059057154
|
||||||
* @invite Jx3TjNS
|
* @invite Jx3TjNS
|
||||||
* @donate https://www.paypal.me/MircoWittrien
|
* @donate https: //www.paypal.me/MircoWittrien
|
||||||
* @patreon https://www.patreon.com/MircoWittrien
|
* @patreon https: //www.patreon.com/MircoWittrien
|
||||||
* @website https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/CustomQuoter
|
* @website https: //github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/CustomQuoter
|
||||||
* @source https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/CustomQuoter/CustomQuoter.plugin.js
|
* @source https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/CustomQuoter/CustomQuoter.plugin.js
|
||||||
* @updateUrl https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/CustomQuoter/CustomQuoter.plugin.js
|
* @updateUrl https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/CustomQuoter/CustomQuoter.plugin.js
|
||||||
*/
|
*/
|
||||||
|
|
||||||
module.exports = (_ => {
|
module.exports = (_ => {
|
||||||
|
@ -31,7 +31,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
@ -40,7 +40,7 @@ module.exports = (_ => {
|
||||||
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
|
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
|
||||||
onConfirm: _ => {
|
onConfirm: _ => {
|
||||||
delete window.BDFDB_Global.downloadModal;
|
delete window.BDFDB_Global.downloadModal;
|
||||||
require("request").get("https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
|
require("request").get("https: //mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
|
||||||
if (!e && b && b.indexOf(`* @name BDFDB`) > -1) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => {});
|
if (!e && b && b.indexOf(`* @name BDFDB`) > -1) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => {});
|
||||||
else BdApi.alert("Error", "Could not download BDFDB library plugin, try again some time later.");
|
else BdApi.alert("Error", "Could not download BDFDB library plugin, try again some time later.");
|
||||||
});
|
});
|
||||||
|
@ -93,10 +93,10 @@ module.exports = (_ => {
|
||||||
|
|
||||||
this.defaults = {
|
this.defaults = {
|
||||||
settings: {
|
settings: {
|
||||||
quoteOnlySelected: {value:true, description:"Only insert selected text in a quoted message"},
|
quoteOnlySelected: {value: true, description: "Only insert selected text in a quoted message"},
|
||||||
alwaysCopy: {value:false, description:"Always copy quote to clipboard without holding shift"},
|
alwaysCopy: {value: false, description: "Always copy quote to clipboard without holding shift"},
|
||||||
ignoreMentionInDM: {value:true, description:"Do not add a mention in DM channels"},
|
ignoreMentionInDM: {value: true, description: "Do not add a mention in DM channels"},
|
||||||
forceZeros: {value:false, description:"Force leading Zeros"}
|
forceZeros: {value: false, description: "Force leading Zeros"}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -139,7 +139,7 @@ module.exports = (_ => {
|
||||||
children: [
|
children: [
|
||||||
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Flex.Child, {
|
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Flex.Child, {
|
||||||
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormItem, {
|
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormItem, {
|
||||||
title: "Name:",
|
title: "Name: ",
|
||||||
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TextInput, {
|
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TextInput, {
|
||||||
className: "input-newquote input-name",
|
className: "input-newquote input-name",
|
||||||
value: "",
|
value: "",
|
||||||
|
@ -149,7 +149,7 @@ module.exports = (_ => {
|
||||||
}),
|
}),
|
||||||
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Flex.Child, {
|
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Flex.Child, {
|
||||||
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormItem, {
|
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormItem, {
|
||||||
title: "Quote:",
|
title: "Quote: ",
|
||||||
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TextInput, {
|
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TextInput, {
|
||||||
className: "input-newquote input-quote",
|
className: "input-newquote input-quote",
|
||||||
value: "",
|
value: "",
|
||||||
|
@ -160,10 +160,10 @@ module.exports = (_ => {
|
||||||
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Button, {
|
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Button, {
|
||||||
style: {marginBottom: 1},
|
style: {marginBottom: 1},
|
||||||
onClick: _ => {
|
onClick: _ => {
|
||||||
for (let input of settingsPanel.querySelectorAll(".input-newquote " + BDFDB.dotCN.input)) if (!input.value || input.value.length == 0 || input.value.trim().length == 0) return BDFDB.NotificationUtils.toast("Fill out all fields to add a new quote.", {type:"danger"});
|
for (let input of settingsPanel.querySelectorAll(".input-newquote " + BDFDB.dotCN.input)) if (!input.value || input.value.length == 0 || input.value.trim().length == 0) return BDFDB.NotificationUtils.toast("Fill out all fields to add a new quote.", {type: "danger"});
|
||||||
let key = settingsPanel.querySelector(".input-name " + BDFDB.dotCN.input).value.trim();
|
let key = settingsPanel.querySelector(".input-name " + BDFDB.dotCN.input).value.trim();
|
||||||
let quote = settingsPanel.querySelector(".input-quote " + BDFDB.dotCN.input).value.trim();
|
let quote = settingsPanel.querySelector(".input-quote " + BDFDB.dotCN.input).value.trim();
|
||||||
if (formats[key]) return BDFDB.NotificationUtils.toast("A quote with the choosen name already exists, please choose another name", {type:"danger"});
|
if (formats[key]) return BDFDB.NotificationUtils.toast("A quote with the choosen name already exists, please choose another name", {type: "danger"});
|
||||||
else {
|
else {
|
||||||
formats[key] = quote;
|
formats[key] = quote;
|
||||||
BDFDB.DataUtils.save(formats, this, "formats");
|
BDFDB.DataUtils.save(formats, this, "formats");
|
||||||
|
@ -263,8 +263,8 @@ module.exports = (_ => {
|
||||||
let item = null, action = (choice, shift) => {
|
let item = null, action = (choice, shift) => {
|
||||||
format = choice;
|
format = choice;
|
||||||
if (shift && !settings.alwaysCopy || !shift && settings.alwaysCopy || !BDFDB.LibraryModules.QuoteUtils.canQuote(e.instance.props.message, e.instance.props.channel)) {
|
if (shift && !settings.alwaysCopy || !shift && settings.alwaysCopy || !BDFDB.LibraryModules.QuoteUtils.canQuote(e.instance.props.message, e.instance.props.channel)) {
|
||||||
BDFDB.LibraryRequires.electron.clipboard.write({text:this.parseQuote(e.instance.props.message, e.instance.props.channel)});
|
BDFDB.LibraryRequires.electron.clipboard.write({text: this.parseQuote(e.instance.props.message, e.instance.props.channel)});
|
||||||
BDFDB.NotificationUtils.toast("Quote has been copied to clipboard", {type:"success"});
|
BDFDB.NotificationUtils.toast("Quote has been copied to clipboard", {type: "success"});
|
||||||
}
|
}
|
||||||
else BDFDB.LibraryModules.MessageManageUtils.quoteMessage(e.instance.props.channel, e.instance.props.message);
|
else BDFDB.LibraryModules.MessageManageUtils.quoteMessage(e.instance.props.channel, e.instance.props.message);
|
||||||
format = null;
|
format = null;
|
||||||
|
@ -330,7 +330,7 @@ module.exports = (_ => {
|
||||||
|
|
||||||
return BDFDB.StringUtils.insertNRST(quoteFormat)
|
return BDFDB.StringUtils.insertNRST(quoteFormat)
|
||||||
.replace("$mention", settings.ignoreMentionInDM && channel.isDM() ? "" : `<@!${message.author.id}>`)
|
.replace("$mention", settings.ignoreMentionInDM && channel.isDM() ? "" : `<@!${message.author.id}>`)
|
||||||
.replace("$link", `<https://discordapp.com/channels/${guild.id}/${channel.id}/${message.id}>`)
|
.replace("$link", `<https: //discordapp.com/channels/${guild.id}/${channel.id}/${message.id}>`)
|
||||||
.replace("$authorName", member && member.nick || message.author.username || "")
|
.replace("$authorName", member && member.nick || message.author.username || "")
|
||||||
.replace("$authorAccount", `${message.author.username}#${message.author.discriminator}`)
|
.replace("$authorAccount", `${message.author.username}#${message.author.discriminator}`)
|
||||||
.replace("$authorId", message.author.id || "")
|
.replace("$authorId", message.author.id || "")
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
# Custom Quoter - [![Downlad][download-badge]][download-link] [![Paypal][paypal-badge]][paypal-link] [![Patreon][patreon-badge]][patreon-link]
|
# Custom Quoter - [![Downlad][download-badge]][download-link] [![Paypal][paypal-badge]][paypal-link] [![Patreon][patreon-badge]][patreon-link]
|
||||||
|
|
||||||
[download-badge]: https://img.shields.io/badge/Download-Plugin-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e1LR68kXv13fc5Nm1t379TfU75/4mHeY7En+59lvhB5efB1/lv5dxc+NH0y/fzq64Lv4T8Ffp360/rP8f9/AA0ADzT6lvFdAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAF1SURBVHja7JihTgNBEIb/K1WkBtEEAsESBKEvgEKRAhLHOxAMfQ9cHwEMBoFA1/ACBEGgzbkmUAwI+BENubTs9WZmLz1CZtZd9v7/u9vMZGdAGFabA05Hn3sWrYQwRB9rwafreikbQN5LiV6qhorDARzAARzAARzAARzAARzAARygGOAQ6a+GLr9jmlwpDuJbsxQrER+YYrXaI2D8EZyAEfangj2Fq0NrnBWry8YI5yb7rkRbBrDAK7X9NevlAYCL7Kns79iQKcunOU0+iO0fuSzV1QyUNjkU2b9wS66qm2nt8L3Q/oO7Gk3tWO2InzPtv3isU9RP9jqxmR8LMKsqdPVqFoC8qiDM/HiAcFUQZ34IYDr0VUGW+QEfK8BkVZBmfqkAWVWQZ37JAOA+n/nEtnh/wGd8JWP81Nt0P0r8Wu4ADvAHAOq2fsaP4N8BvFXi/ZoB3FYCcJMNKDbQw9Kc7YdoYfDzB+6xjUuM5mY+wsXYHvgeABIzsPkSOM/lAAAAAElFTkSuQmCC&style=flat
|
[download-badge]: https: //img.shields.io/badge/Download-Plugin-brightgreen.svg?logo=data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAACXBIWXMAAA7EAAAOxAGVKw4bAAADGGlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjaY2BgnuDo4uTKJMDAUFBUUuQe5BgZERmlwH6egY2BmYGBgYGBITG5uMAxIMCHgYGBIS8/L5UBFTAyMHy7xsDIwMDAcFnX0cXJlYE0wJpcUFTCwMBwgIGBwSgltTiZgYHhCwMDQ3p5SUEJAwNjDAMDg0hSdkEJAwNjAQMDg0h2SJAzAwNjCwMDE09JakUJAwMDg3N+QWVRZnpGiYKhpaWl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8EZyAEfangj2Fq0NrnBWry8YI5yb7rkRbBrDAK7X9NevlAYCL7Kns79iQKcunOU0+iO0fuSzV1QyUNjkU2b9wS66qm2nt8L3Q/oO7Gk3tWO2InzPtv3isU9RP9jqxmR8LMKsqdPVqFoC8qiDM/HiAcFUQZ34IYDr0VUGW+QEfK8BkVZBmfqkAWVWQZ37JAOA+n/nEtnh/wGd8JWP81Nt0P0r8Wu4ADvAHAOq2fsaP4N8BvFXi/ZoB3FYCcJMNKDbQw9Kc7YdoYfDzB+6xjUuM5mY+wsXYHvgeABIzsPkSOM/lAAAAAElFTkSuQmCC&style=flat
|
||||||
[download-link]: https://betterdiscord.net/ghdl?url=https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/CustomQuoter/CustomQuoter.plugin.js
|
[download-link]: https: //betterdiscord.net/ghdl?url=https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/CustomQuoter/CustomQuoter.plugin.js
|
||||||
|
|
||||||
[paypal-badge]: https://img.shields.io/badge/Paypal-Donate!-%23003087.svg?logo=paypal&style=flat
|
[paypal-badge]: https: //img.shields.io/badge/Paypal-Donate!-%23003087.svg?logo=paypal&style=flat
|
||||||
[paypal-link]: https://paypal.me/MircoWittrien
|
[paypal-link]: https: //paypal.me/MircoWittrien
|
||||||
|
|
||||||
[patreon-badge]: https://img.shields.io/badge/Patreon-Support!-%23F96854.svg?logo=patreon&style=flat
|
[patreon-badge]: https: //img.shields.io/badge/Patreon-Support!-%23F96854.svg?logo=patreon&style=flat
|
||||||
[patreon-link]: https://patreon.com/MircoWittrien
|
[patreon-link]: https: //patreon.com/MircoWittrien
|
||||||
|
|
||||||
Let's you customize the output of the native quote feature of Discord
|
Let's you customize the output of the native quote feature of Discord
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
* @name DisplayLargeMessages
|
* @name DisplayLargeMessages
|
||||||
* @authorId 278543574059057154
|
* @authorId 278543574059057154
|
||||||
* @invite Jx3TjNS
|
* @invite Jx3TjNS
|
||||||
* @donate https://www.paypal.me/MircoWittrien
|
* @donate https: //www.paypal.me/MircoWittrien
|
||||||
* @patreon https://www.patreon.com/MircoWittrien
|
* @patreon https: //www.patreon.com/MircoWittrien
|
||||||
* @website https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/DisplayLargeMessages
|
* @website https: //github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/DisplayLargeMessages
|
||||||
* @source https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/DisplayLargeMessages/DisplayLargeMessages.plugin.js
|
* @source https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/DisplayLargeMessages/DisplayLargeMessages.plugin.js
|
||||||
* @updateUrl https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/DisplayLargeMessages/DisplayLargeMessages.plugin.js
|
* @updateUrl https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/DisplayLargeMessages/DisplayLargeMessages.plugin.js
|
||||||
*/
|
*/
|
||||||
|
|
||||||
module.exports = (_ => {
|
module.exports = (_ => {
|
||||||
|
@ -26,7 +26,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
@ -35,7 +35,7 @@ module.exports = (_ => {
|
||||||
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
|
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
|
||||||
onConfirm: _ => {
|
onConfirm: _ => {
|
||||||
delete window.BDFDB_Global.downloadModal;
|
delete window.BDFDB_Global.downloadModal;
|
||||||
require("request").get("https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
|
require("request").get("https: //mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
|
||||||
if (!e && b && b.indexOf(`* @name BDFDB`) > -1) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => {});
|
if (!e && b && b.indexOf(`* @name BDFDB`) > -1) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => {});
|
||||||
else BdApi.alert("Error", "Could not download BDFDB library plugin, try again some time later.");
|
else BdApi.alert("Error", "Could not download BDFDB library plugin, try again some time later.");
|
||||||
});
|
});
|
||||||
|
@ -54,10 +54,10 @@ module.exports = (_ => {
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.defaults = {
|
this.defaults = {
|
||||||
settings: {
|
settings: {
|
||||||
onDemand: {value:false, description:"Inject the content of 'message.txt' on demand instead of automatically"}
|
onDemand: {value: false, description: "Inject the content of 'message.txt' on demand instead of automatically"}
|
||||||
},
|
},
|
||||||
amounts: {
|
amounts: {
|
||||||
maxFileSize: {value:10, min:0, description:"Max Filesize a fill will be read automatically", note: "in KB / 0 = inject all / ignored in On-Demand"}
|
maxFileSize: {value: 10, min: 0, description: "Max Filesize a fill will be read automatically", note: "in KB / 0 = inject all / ignored in On-Demand"}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
# Display Large Messages - [![Downlad][download-badge]][download-link] [![Paypal][paypal-badge]][paypal-link] [![Patreon][patreon-badge]][patreon-link]
|
# Display Large Messages - [![Downlad][download-badge]][download-link] [![Paypal][paypal-badge]][paypal-link] [![Patreon][patreon-badge]][patreon-link]
|
||||||
|
|
||||||
[download-badge]: https://img.shields.io/badge/Download-Plugin-brightgreen.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAACXBIWXMAAA7EAAAOxAGVKw4bAAADGGlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjaY2BgnuDo4uTKJMDAUFBUUuQe5BgZERmlwH6egY2BmYGBgYGBITG5uMAxIMCHgYGBIS8/L5UBFTAyMHy7xsDIwMDAcFnX0cXJlYE0wJpcUFTCwMBwgIGBwSgltTiZgYHhCwMDQ3p5SUEJAwNjDAMDg0hSdkEJAwNjAQMDg0h2SJAzAwNjCwMDE09JakUJAwMDg3N+QWVRZnpGiYKhpaWlgmNKflKqQnBlcUlqbrGCZ15yflFBflFiSWoKAwMD1A4GBgYGXpf8EgX3xMw8BSMDVQYqg4jIKAUICxE+CDEESC4tKoMHJQODAIMCgwGDA0MAQyJDPcMChqMMbxjFGV0YSxlXMN5jEmMKYprAdIFZmDmSeSHzGxZLlg6WW6x6rK2s99gs2aaxfWMPZ9/NocTRxfGFM5HzApcj1xZuTe4FPFI8U3mFeCfxCfNN45fhXyygI7BD0FXwilCq0A/hXhEVkb2i4aJfxCaJG4lfkaiQlJM8JpUvLS19QqZMVl32llyfvIv8H4WtioVKekpvldeqFKiaqP5UO6jepRGqqaT5QeuA9iSdVF0rPUG9V/pHDBYY1hrFGNuayJsym740u2C+02KJ5QSrOutcmzjbQDtXe2sHY0cdJzVnJRcFV3k3BXdlD3VPXS8Tbxsfd99gvwT//ID6wIlBS4N3hVwMfRnOFCEXaRUVEV0RMzN2T9yDBLZE3aSw5IaUNak30zkyLDIzs+ZmX8xlz7PPryjYVPiuWLskq3RV2ZsK/cqSql01jLVedVPrHzbqNdU0n22VaytsP9op3VXUfbpXta+x/+5Em0mzJ/+dGj/t8AyNmf2zvs9JmHt6vvmCpYtEFrcu+bYsc/m9lSGrTq9xWbtvveWGbZtMNm/ZarJt+w6rnft3u+45uy9s/4ODOYd+Hmk/Jn58xUnrU+fOJJ/9dX7SRe1LR68kXv13fc5Nm1t379TfU75/4mHeY7En+59lvhB5efB1/lv5dxc+NH0y/fzq64Lv4T8Ffp360/rP8f9/AA0ADzT6lvFdAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAF1SURBVHja7JihTgNBEIb/K1WkBtEEAsESBKEvgEKRAhLHOxAMfQ9cHwEMBoFA1/ACBEGgzbkmUAwI+BENubTs9WZmLz1CZtZd9v7/u9vMZGdAGFabA05Hn3sWrYQwRB9rwafreikbQN5LiV6qhorDARzAARzAARzAARzAARzAARygGOAQ6a+GLr9jmlwpDuJbsxQrER+YYrXaI2D8EZyAEfangj2Fq0NrnBWry8YI5yb7rkRbBrDAK7X9NevlAYCL7Kns79iQKcunOU0+iO0fuSzV1QyUNjkU2b9wS66qm2nt8L3Q/oO7Gk3tWO2InzPtv3isU9RP9jqxmR8LMKsqdPVqFoC8qiDM/HiAcFUQZ34IYDr0VUGW+QEfK8BkVZBmfqkAWVWQZ37JAOA+n/nEtnh/wGd8JWP81Nt0P0r8Wu4ADvAHAOq2fsaP4N8BvFXi/ZoB3FYCcJMNKDbQw9Kc7YdoYfDzB+6xjUuM5mY+wsXYHvgeABIzsPkSOM/lAAAAAElFTkSuQmCC&style=flat
|
[download-badge]: https: //img.shields.io/badge/Download-Plugin-brightgreen.svg?logo=data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAACXBIWXMAAA7EAAAOxAGVKw4bAAADGGlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjaY2BgnuDo4uTKJMDAUFBUUuQe5BgZERmlwH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/K1WkBtEEAsESBKEvgEKRAhLHOxAMfQ9cHwEMBoFA1/ACBEGgzbkmUAwI+BENubTs9WZmLz1CZtZd9v7/u9vMZGdAGFabA05Hn3sWrYQwRB9rwafreikbQN5LiV6qhorDARzAARzAARzAARzAARzAARygGOAQ6a+GLr9jmlwpDuJbsxQrER+YYrXaI2D8EZyAEfangj2Fq0NrnBWry8YI5yb7rkRbBrDAK7X9NevlAYCL7Kns79iQKcunOU0+iO0fuSzV1QyUNjkU2b9wS66qm2nt8L3Q/oO7Gk3tWO2InzPtv3isU9RP9jqxmR8LMKsqdPVqFoC8qiDM/HiAcFUQZ34IYDr0VUGW+QEfK8BkVZBmfqkAWVWQZ37JAOA+n/nEtnh/wGd8JWP81Nt0P0r8Wu4ADvAHAOq2fsaP4N8BvFXi/ZoB3FYCcJMNKDbQw9Kc7YdoYfDzB+6xjUuM5mY+wsXYHvgeABIzsPkSOM/lAAAAAElFTkSuQmCC&style=flat
|
||||||
[download-link]: https://betterdiscord.net/ghdl?url=https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/DisplayLargeMessages/DisplayLargeMessages.plugin.js
|
[download-link]: https: //betterdiscord.net/ghdl?url=https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/DisplayLargeMessages/DisplayLargeMessages.plugin.js
|
||||||
|
|
||||||
[paypal-badge]: https://img.shields.io/badge/Paypal-Donate!-%23003087.svg?logo=paypal&style=flat
|
[paypal-badge]: https: //img.shields.io/badge/Paypal-Donate!-%23003087.svg?logo=paypal&style=flat
|
||||||
[paypal-link]: https://paypal.me/MircoWittrien
|
[paypal-link]: https: //paypal.me/MircoWittrien
|
||||||
|
|
||||||
[patreon-badge]: https://img.shields.io/badge/Patreon-Support!-%23F96854.svg?logo=patreon&style=flat
|
[patreon-badge]: https: //img.shields.io/badge/Patreon-Support!-%23F96854.svg?logo=patreon&style=flat
|
||||||
[patreon-link]: https://patreon.com/MircoWittrien
|
[patreon-link]: https: //patreon.com/MircoWittrien
|
||||||
|
|
||||||
Inject the contents of large messages that were sent by discord via 'message.txt'
|
Inject the contents of large messages that were sent by discord via 'message.txt'
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
* @name DisplayServersAsChannels
|
* @name DisplayServersAsChannels
|
||||||
* @authorId 278543574059057154
|
* @authorId 278543574059057154
|
||||||
* @invite Jx3TjNS
|
* @invite Jx3TjNS
|
||||||
* @donate https://www.paypal.me/MircoWittrien
|
* @donate https: //www.paypal.me/MircoWittrien
|
||||||
* @patreon https://www.patreon.com/MircoWittrien
|
* @patreon https: //www.patreon.com/MircoWittrien
|
||||||
* @website https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/DisplayServersAsChannels
|
* @website https: //github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/DisplayServersAsChannels
|
||||||
* @source https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/DisplayServersAsChannels/DisplayServersAsChannels.plugin.js
|
* @source https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/DisplayServersAsChannels/DisplayServersAsChannels.plugin.js
|
||||||
*/
|
*/
|
||||||
|
|
||||||
module.exports = (_ => {
|
module.exports = (_ => {
|
||||||
|
@ -29,7 +29,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
@ -38,7 +38,7 @@ module.exports = (_ => {
|
||||||
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
|
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
|
||||||
onConfirm: _ => {
|
onConfirm: _ => {
|
||||||
delete window.BDFDB_Global.downloadModal;
|
delete window.BDFDB_Global.downloadModal;
|
||||||
require("request").get("https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
|
require("request").get("https: //mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
|
||||||
if (!e && b && b.indexOf(`* @name BDFDB`) > -1) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => {});
|
if (!e && b && b.indexOf(`* @name BDFDB`) > -1) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => {});
|
||||||
else BdApi.alert("Error", "Could not download BDFDB library plugin, try again some time later.");
|
else BdApi.alert("Error", "Could not download BDFDB library plugin, try again some time later.");
|
||||||
});
|
});
|
||||||
|
@ -56,11 +56,11 @@ module.exports = (_ => {
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.defaults = {
|
this.defaults = {
|
||||||
settings: {
|
settings: {
|
||||||
showGuildIcon: {value:true, description:"Show a icon for servers"},
|
showGuildIcon: {value: true, description: "Show a icon for servers"},
|
||||||
},
|
},
|
||||||
amounts: {
|
amounts: {
|
||||||
serverListWidth: {value:240, min:45, description:"Server list width in px:"},
|
serverListWidth: {value: 240, min: 45, description: "Server list width in px: "},
|
||||||
serverElementHeight: {value:32, min:16, description:"Server element height in px:"}
|
serverElementHeight: {value: 32, min: 16, description: "Server element height in px: "}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ module.exports = (_ => {
|
||||||
BDFDB.DOMUtils.addClass(document.body, BDFDB.disCN._displayserversaschannelsstyled);
|
BDFDB.DOMUtils.addClass(document.body, BDFDB.disCN._displayserversaschannelsstyled);
|
||||||
|
|
||||||
BDFDB.PatchUtils.patch(this, BDFDB.LibraryComponents.GuildComponents.Guild.prototype, "render", {after: e => {
|
BDFDB.PatchUtils.patch(this, BDFDB.LibraryComponents.GuildComponents.Guild.prototype, "render", {after: e => {
|
||||||
if (e.thisObject.props.list) this.processGuild({instance:e.thisObject, returnvalue:e.returnValue, methodname:"render"});
|
if (e.thisObject.props.list) this.processGuild({instance: e.thisObject, returnvalue: e.returnValue, methodname: "render"});
|
||||||
}});
|
}});
|
||||||
|
|
||||||
this.forceUpdateAll();
|
this.forceUpdateAll();
|
||||||
|
@ -158,7 +158,7 @@ module.exports = (_ => {
|
||||||
if (errorIndex > -1) errorChildren[errorIndex] = BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.GuildComponents.Items.UnavailableGuildsButton, {
|
if (errorIndex > -1) errorChildren[errorIndex] = BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.GuildComponents.Items.UnavailableGuildsButton, {
|
||||||
unavailableGuilds: BDFDB.LibraryModules.GuildUnavailableStore.totalUnavailableGuilds
|
unavailableGuilds: BDFDB.LibraryModules.GuildUnavailableStore.totalUnavailableGuilds
|
||||||
});
|
});
|
||||||
let scroller = BDFDB.ReactUtils.findChild(returnvalue, {props:[["className", BDFDB.disCN.guildsscroller]]});
|
let scroller = BDFDB.ReactUtils.findChild(returnvalue, {props: [["className", BDFDB.disCN.guildsscroller]]});
|
||||||
if (scroller) {
|
if (scroller) {
|
||||||
scroller.props.fade = true;
|
scroller.props.fade = true;
|
||||||
scroller.type = BDFDB.LibraryComponents.Scrollers.Thin;
|
scroller.type = BDFDB.LibraryComponents.Scrollers.Thin;
|
||||||
|
@ -526,7 +526,7 @@ module.exports = (_ => {
|
||||||
width: ${amounts.serverElementHeight/32 * 20}px;
|
width: ${amounts.serverElementHeight/32 * 20}px;
|
||||||
height: ${amounts.serverElementHeight/32 * 20}px;
|
height: ${amounts.serverElementHeight/32 * 20}px;
|
||||||
background: var(--text-normal);
|
background: var(--text-normal);
|
||||||
-webkit-mask: url('data:image/svg+xml;base64,PHN2ZyB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAxOCAxOCI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBmaWxsPSJ3aGl0ZSIgZD0iTTMuNjAwOTE0ODEsNy4yMDI5NzMxMyBDMy42MDA5MTQ4MSw1LjIwOTgzNDE5IDUuMjA5ODM0MTksMy42MDA5MTQ4MSA3LjIwMjk3MzEzLDMuNjAwOTE0ODEgQzkuMTk2MTEyMDYsMy42MDA5MTQ4MSAxMC44MDUwMzE0LDUuMjA5ODM0MTkgMTAuODA1MDMxNCw3LjIwMjk3MzEzIEMxMC44MDUwMzE0LDkuMTk2MTEyMDYgOS4xOTYxMTIwNiwxMC44MDUwMzE0IDcuMjAyOTczMTMsMTAuODA1MDMxNCBDNS4yMDk4MzQxOSwxMC44MDUwMzE0IDMuNjAwOTE0ODEsOS4xOTYxMTIwNiAzLjYwMDkxNDgxLDcuMjAyOTczMTMgWiBNMTIuMDA1NzE3NiwxMC44MDUwMzE0IEwxMS4zNzMzNTYyLDEwLjgwNTAzMTQgTDExLjE0OTIyODEsMTAuNTg4OTA3OSBDMTEuOTMzNjc2NCw5LjY3NjM4NjUxIDEyLjQwNTk0NjMsOC40OTE3MDk1NSAxMi40MDU5NDYzLDcuMjAyOTczMTMgQzEyLjQwNTk0NjMsNC4zMjkzMzEwNSAxMC4wNzY2MTUyLDIgNy4yMDI5NzMxMywyIEM0LjMyOT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YwMDkxNDgxLDcuMjAyOTczMTMgWiBNMTIuMDA1NzE3NiwxMC44MDUwMzE0IEwxMS4zNzMzNTYyLDEwLjgwNTAzMTQgTDExLjE0OTIyODEsMTAuNTg4OTA3OSBDMTEuOTMzNjc2NCw5LjY3NjM4NjUxIDEyLjQwNTk0NjMsOC40OTE3MDk1NSAxMi40MDU5NDYzLDcuMjAyOTczMTMgQzEyLjQwNTk0NjMsNC4zMjkzMzEwNSAxMC4wNzY2MTUyLDIgNy4yMDI5NzMxMywyIEM0LjMyOTMzMTA1LDIgMiw0LjMyOTMzMTA1IDIsNy4yMDI5NzMxMyBDMiwxMC4wNzY2MTUyIDQuMzI5MzMxMDUsMTIuNDA1OTQ2MyA3LjIwMjk3MzEzLDEyLjQwNTk0NjMgQzguNDkxNzA5NTUsMTIuNDA1OTQ2MyA5LjY3NjM4NjUxLDExLjkzMzY3NjQgMTAuNTg4OTA3OSwxMS4xNDkyMjgxIEwxMC44MDUwMzE0LDExLjM3MzM1NjIgTDEwLjgwNTAzMTQsMTIuMDA1NzE3NiBMMTQuODA3MzE4NSwxNiBMMTYsMTQuODA3MzE4NSBMMTIuMjEwMjUzOCwxMS4wMDk5Nzc2IEwxMi4wMDU3MTc2LDEwLjgwNTAzMTQgWiI+PC9wYXRoPjwvZz48L3N2Zz4=') center/cover no-repeat;
|
||||||
}
|
}
|
||||||
#server-search ${BDFDB.dotCN.guildbuttonpill},
|
#server-search ${BDFDB.dotCN.guildbuttonpill},
|
||||||
#server-search ${BDFDB.dotCN.guildsvg} {
|
#server-search ${BDFDB.dotCN.guildsvg} {
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
# Display Servers As Channels - [![Downlad][download-badge]][download-link] [![Paypal][paypal-badge]][paypal-link] [![Patreon][patreon-badge]][patreon-link]
|
# Display Servers As Channels - [![Downlad][download-badge]][download-link] [![Paypal][paypal-badge]][paypal-link] [![Patreon][patreon-badge]][patreon-link]
|
||||||
|
|
||||||
[download-badge]: https://img.shields.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+fOJJ/9dX7SRe1LR68kXv13fc5Nm1t379TfU75/4mHeY7En+59lvhB5efB1/lv5dxc+NH0y/fzq64Lv4T8Ffp360/rP8f9/AA0ADzT6lvFdAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAF1SURBVHja7JihTgNBEIb/K1WkBtEEAsESBKEvgEKRAhLHOxAMfQ9cHwEMBoFA1/ACBEGgzbkmUAwI+BENubTs9WZmLz1CZtZd9v7/u9vMZGdAGFabA05Hn3sWrYQwRB9rwafreikbQN5LiV6qhorDARzAARzAARzAARzAARzAARygGOAQ6a+GLr9jmlwpDuJbsxQrER+YYrXaI2D8EZyAEfangj2Fq0NrnBWry8YI5yb7rkRbBrDAK7X9NevlAYCL7Kns79iQKcunOU0+iO0fuSzV1QyUNjkU2b9wS66qm2nt8L3Q/oO7Gk3tWO2InzPtv3isU9RP9jqxmR8LMKsqdPVqFoC8qiDM/HiAcFUQZ34IYDr0VUGW+QEfK8BkVZBmfqkAWVWQZ37JAOA+n/nEtnh/wGd8JWP81Nt0P0r8Wu4ADvAHAOq2fsaP4N8BvFXi/ZoB3FYCcJMNKDbQw9Kc7YdoYfDzB+6xjUuM5mY+wsXYHvgeABIzsPkSOM/lAAAAAElFTkSuQmCC&style=flat
|
[download-badge]: https: //img.shields.io/badge/Download-Plugin-brightgreen.svg?logo=data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAACXBIWXMAAA7EAAAOxAGVKw4bAAADGGlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjaY2BgnuDo4uTKJMDAUFBUUuQe5BgZERmlwH6egY2BmYGBgYGBITG5uMAxIMCHgYGBIS8/L5UBFTAyMHy7xsDIwMDAcFnX0cXJlYE0wJpcUFTCwMBwgIGBwSgltTiZgYHhCwMDQ3p5SUEJAwNjDAMDg0hSdkEJAwNjAQMDg0h2SJAzAwNjCwMDE09JakUJAwMDg3N+QWV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xQrER+YYrXaI2D8EZyAEfangj2Fq0NrnBWry8YI5yb7rkRbBrDAK7X9NevlAYCL7Kns79iQKcunOU0+iO0fuSzV1QyUNjkU2b9wS66qm2nt8L3Q/oO7Gk3tWO2InzPtv3isU9RP9jqxmR8LMKsqdPVqFoC8qiDM/HiAcFUQZ34IYDr0VUGW+QEfK8BkVZBmfqkAWVWQZ37JAOA+n/nEtnh/wGd8JWP81Nt0P0r8Wu4ADvAHAOq2fsaP4N8BvFXi/ZoB3FYCcJMNKDbQw9Kc7YdoYfDzB+6xjUuM5mY+wsXYHvgeABIzsPkSOM/lAAAAAElFTkSuQmCC&style=flat
|
||||||
[download-link]: https://betterdiscord.net/ghdl?url=https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/DisplayServersAsChannels/DisplayServersAsChannels.plugin.js
|
[download-link]: https: //betterdiscord.net/ghdl?url=https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/DisplayServersAsChannels/DisplayServersAsChannels.plugin.js
|
||||||
|
|
||||||
[paypal-badge]: https://img.shields.io/badge/Paypal-Donate!-%23003087.svg?logo=paypal&style=flat
|
[paypal-badge]: https: //img.shields.io/badge/Paypal-Donate!-%23003087.svg?logo=paypal&style=flat
|
||||||
[paypal-link]: https://paypal.me/MircoWittrien
|
[paypal-link]: https: //paypal.me/MircoWittrien
|
||||||
|
|
||||||
[patreon-badge]: https://img.shields.io/badge/Patreon-Support!-%23F96854.svg?logo=patreon&style=flat
|
[patreon-badge]: https: //img.shields.io/badge/Patreon-Support!-%23F96854.svg?logo=patreon&style=flat
|
||||||
[patreon-link]: https://patreon.com/MircoWittrien
|
[patreon-link]: https: //patreon.com/MircoWittrien
|
||||||
|
|
||||||
Display servers in a similar way as channels
|
Display servers in a similar way as channels
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
* @name EditChannels
|
* @name EditChannels
|
||||||
* @authorId 278543574059057154
|
* @authorId 278543574059057154
|
||||||
* @invite Jx3TjNS
|
* @invite Jx3TjNS
|
||||||
* @donate https://www.paypal.me/MircoWittrien
|
* @donate https: //www.paypal.me/MircoWittrien
|
||||||
* @patreon https://www.patreon.com/MircoWittrien
|
* @patreon https: //www.patreon.com/MircoWittrien
|
||||||
* @website https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/EditChannels
|
* @website https: //github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/EditChannels
|
||||||
* @source https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/EditChannels/EditChannels.plugin.js
|
* @source https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/EditChannels/EditChannels.plugin.js
|
||||||
* @updateUrl https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/EditChannels/EditChannels.plugin.js
|
* @updateUrl https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/EditChannels/EditChannels.plugin.js
|
||||||
*/
|
*/
|
||||||
|
|
||||||
module.exports = (_ => {
|
module.exports = (_ => {
|
||||||
|
@ -31,7 +31,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
@ -40,7 +40,7 @@ module.exports = (_ => {
|
||||||
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
|
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
|
||||||
onConfirm: _ => {
|
onConfirm: _ => {
|
||||||
delete window.BDFDB_Global.downloadModal;
|
delete window.BDFDB_Global.downloadModal;
|
||||||
require("request").get("https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
|
require("request").get("https: //mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
|
||||||
if (!e && b && b.indexOf(`* @name BDFDB`) > -1) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => {});
|
if (!e && b && b.indexOf(`* @name BDFDB`) > -1) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => {});
|
||||||
else BdApi.alert("Error", "Could not download BDFDB library plugin, try again some time later.");
|
else BdApi.alert("Error", "Could not download BDFDB library plugin, try again some time later.");
|
||||||
});
|
});
|
||||||
|
@ -58,16 +58,16 @@ module.exports = (_ => {
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.defaults = {
|
this.defaults = {
|
||||||
settings: {
|
settings: {
|
||||||
changeChannelIcon: {value:true, inner:false, description:"Change color of Channel Icon"},
|
changeChannelIcon: {value: true, inner: false, description: "Change color of Channel Icon"},
|
||||||
changeInChatTextarea: {value:true, inner:true, description:"Chat Textarea"},
|
changeInChatTextarea: {value: true, inner: true, description: "Chat Textarea"},
|
||||||
changeInMentions: {value:true, inner:true, description:"Mentions"},
|
changeInMentions: {value: true, inner: true, description: "Mentions"},
|
||||||
changeInChannelList: {value:true, inner:true, description:"Channel List"},
|
changeInChannelList: {value: true, inner: true, description: "Channel List"},
|
||||||
changeInChannelHeader: {value:true, inner:true, description:"Channel Header"},
|
changeInChannelHeader: {value: true, inner: true, description: "Channel Header"},
|
||||||
changeInRecentMentions: {value:true, inner:true, description:"Recent Mentions Popout"},
|
changeInRecentMentions: {value: true, inner: true, description: "Recent Mentions Popout"},
|
||||||
changeInAutoComplete: {value:true, inner:true, description:"Autocomplete Menu"},
|
changeInAutoComplete: {value: true, inner: true, description: "Autocomplete Menu"},
|
||||||
changeInAuditLog: {value:true, inner:true, description:"Audit Log"},
|
changeInAuditLog: {value: true, inner: true, description: "Audit Log"},
|
||||||
changeInInviteLog: {value:true, inner:true, description:"Invite Log"},
|
changeInInviteLog: {value: true, inner: true, description: "Invite Log"},
|
||||||
changeInQuickSwitcher: {value:true, inner:true, description:"Quick Switcher"}
|
changeInQuickSwitcher: {value: true, inner: true, description: "Quick Switcher"}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ module.exports = (_ => {
|
||||||
|
|
||||||
onStart() {
|
onStart() {
|
||||||
let observer = new MutationObserver(_ => {this.changeAppTitle();});
|
let observer = new MutationObserver(_ => {this.changeAppTitle();});
|
||||||
BDFDB.ObserverUtils.connect(this, document.head.querySelector("title"), {name:"appTitleObserver",instance:observer}, {childList:true});
|
BDFDB.ObserverUtils.connect(this, document.head.querySelector("title"), {name: "appTitleObserver",instance: observer}, {childList: true});
|
||||||
|
|
||||||
if (BDFDB.LibraryModules.AutocompleteOptions && BDFDB.LibraryModules.AutocompleteOptions.AUTOCOMPLETE_OPTIONS) BDFDB.PatchUtils.patch(this, BDFDB.LibraryModules.AutocompleteOptions.AUTOCOMPLETE_OPTIONS.CHANNELS, "queryResults", {after: e => {
|
if (BDFDB.LibraryModules.AutocompleteOptions && BDFDB.LibraryModules.AutocompleteOptions.AUTOCOMPLETE_OPTIONS) BDFDB.PatchUtils.patch(this, BDFDB.LibraryModules.AutocompleteOptions.AUTOCOMPLETE_OPTIONS.CHANNELS, "queryResults", {after: e => {
|
||||||
let channelArray = [];
|
let channelArray = [];
|
||||||
|
@ -143,7 +143,7 @@ module.exports = (_ => {
|
||||||
value: settings[key]
|
value: settings[key]
|
||||||
}));
|
}));
|
||||||
settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsPanelInner, {
|
settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsPanelInner, {
|
||||||
title: "Change Channels in:",
|
title: "Change Channels in: ",
|
||||||
first: settingsItems.length == 0,
|
first: settingsItems.length == 0,
|
||||||
children: Object.keys(settings).map(key => this.defaults.settings[key].inner && BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
|
children: Object.keys(settings).map(key => this.defaults.settings[key].inner && BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
|
||||||
type: "Switch",
|
type: "Switch",
|
||||||
|
@ -183,7 +183,7 @@ module.exports = (_ => {
|
||||||
this.changeAppTitle();
|
this.changeAppTitle();
|
||||||
BDFDB.PatchUtils.forceAllUpdates(this);
|
BDFDB.PatchUtils.forceAllUpdates(this);
|
||||||
BDFDB.ChannelUtils.rerenderAll(instant);
|
BDFDB.ChannelUtils.rerenderAll(instant);
|
||||||
BDFDB.ReactUtils.forceUpdate(BDFDB.ReactUtils.findOwner(document.querySelector(BDFDB.dotCN.app), {name:"Channel", unlimited:true}));
|
BDFDB.ReactUtils.forceUpdate(BDFDB.ReactUtils.findOwner(document.querySelector(BDFDB.dotCN.app), {name: "Channel", unlimited: true}));
|
||||||
}
|
}
|
||||||
|
|
||||||
onChannelContextMenu (e) {
|
onChannelContextMenu (e) {
|
||||||
|
@ -232,12 +232,12 @@ module.exports = (_ => {
|
||||||
if (e.instance.props.category) e.instance.props.category = this.getChannelData(e.instance.props.category.id);
|
if (e.instance.props.category) e.instance.props.category = this.getChannelData(e.instance.props.category.id);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
let channelName = BDFDB.ReactUtils.findChild(e.returnvalue, {props:[["className", BDFDB.disCN.marginleft4]]});
|
let channelName = BDFDB.ReactUtils.findChild(e.returnvalue, {props: [["className", BDFDB.disCN.marginleft4]]});
|
||||||
if (channelName) this.changeChannelColor(channelName, e.instance.props.channel.id);
|
if (channelName) this.changeChannelColor(channelName, e.instance.props.channel.id);
|
||||||
let channelIcon = BDFDB.ReactUtils.findChild(e.returnvalue, {props:[["className", BDFDB.disCN.autocompleteicon]]});
|
let channelIcon = BDFDB.ReactUtils.findChild(e.returnvalue, {props: [["className", BDFDB.disCN.autocompleteicon]]});
|
||||||
if (channelIcon) this.changeChannelIconColor(channelIcon, e.instance.props.channel.id, {alpha: 0.6});
|
if (channelIcon) this.changeChannelIconColor(channelIcon, e.instance.props.channel.id, {alpha: 0.6});
|
||||||
if (e.instance.props.category) {
|
if (e.instance.props.category) {
|
||||||
let categoryName = BDFDB.ReactUtils.findChild(e.returnvalue, {props:[["className", BDFDB.disCN.autocompletedescription]]});
|
let categoryName = BDFDB.ReactUtils.findChild(e.returnvalue, {props: [["className", BDFDB.disCN.autocompletedescription]]});
|
||||||
if (categoryName) this.changeChannelColor(categoryName, e.instance.props.category.id);
|
if (categoryName) this.changeChannelColor(categoryName, e.instance.props.category.id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -249,7 +249,7 @@ module.exports = (_ => {
|
||||||
if (channel && settings.changeInAuditLog) {
|
if (channel && settings.changeInAuditLog) {
|
||||||
if (!e.returnvalue) e.instance.props.log.options.channel = this.getChannelData(channel.id);
|
if (!e.returnvalue) e.instance.props.log.options.channel = this.getChannelData(channel.id);
|
||||||
else {
|
else {
|
||||||
let channelName = BDFDB.ReactUtils.findChild(e.returnvalue, {props:[["children", [["#" + channel.name]]]]});
|
let channelName = BDFDB.ReactUtils.findChild(e.returnvalue, {props: [["children", [["#" + channel.name]]]]});
|
||||||
if (channelName) this.changeChannelColor(channelName, channel.id);
|
if (channelName) this.changeChannelColor(channelName, channel.id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -294,9 +294,9 @@ module.exports = (_ => {
|
||||||
if (dataListId) {
|
if (dataListId) {
|
||||||
let channelId = dataListId.split("_").pop();
|
let channelId = dataListId.split("_").pop();
|
||||||
let modify = {muted: BDFDB.LibraryModules.MutedUtils.isGuildOrCategoryOrChannelMuted(BDFDB.LibraryModules.LastGuildStore.getGuildId(), channelId)};
|
let modify = {muted: BDFDB.LibraryModules.MutedUtils.isGuildOrCategoryOrChannelMuted(BDFDB.LibraryModules.LastGuildStore.getGuildId(), channelId)};
|
||||||
let categoryName = BDFDB.ReactUtils.findChild(e.returnvalue, {props:[["className", BDFDB.disCN.categoryname]]});
|
let categoryName = BDFDB.ReactUtils.findChild(e.returnvalue, {props: [["className", BDFDB.disCN.categoryname]]});
|
||||||
if (categoryName) this.changeChannelColor(categoryName, channelId, modify);
|
if (categoryName) this.changeChannelColor(categoryName, channelId, modify);
|
||||||
let categoryIcon = BDFDB.ReactUtils.findChild(e.returnvalue, {props:[["className", BDFDB.disCN.categoryicon]]});
|
let categoryIcon = BDFDB.ReactUtils.findChild(e.returnvalue, {props: [["className", BDFDB.disCN.categoryicon]]});
|
||||||
if (categoryIcon) this.changeChannelIconColor(categoryIcon, channelId, Object.assign({alpha: 0.6}, modify));
|
if (categoryIcon) this.changeChannelIconColor(categoryIcon, channelId, Object.assign({alpha: 0.6}, modify));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -311,9 +311,9 @@ module.exports = (_ => {
|
||||||
if (!e.returnvalue) e.instance.props.channel = this.getChannelData(e.instance.props.channel.id);
|
if (!e.returnvalue) e.instance.props.channel = this.getChannelData(e.instance.props.channel.id);
|
||||||
else {
|
else {
|
||||||
let modify = BDFDB.ObjectUtils.extract(Object.assign({}, e.instance.props, e.instance.state), "muted", "locked", "selected", "unread", "connected", "hovered");
|
let modify = BDFDB.ObjectUtils.extract(Object.assign({}, e.instance.props, e.instance.state), "muted", "locked", "selected", "unread", "connected", "hovered");
|
||||||
let channelName = BDFDB.ReactUtils.findChild(e.returnvalue, {props:[["className", BDFDB.disCN.channelname]]});
|
let channelName = BDFDB.ReactUtils.findChild(e.returnvalue, {props: [["className", BDFDB.disCN.channelname]]});
|
||||||
if (channelName) this.changeChannelColor(channelName, e.instance.props.channel.id, modify);
|
if (channelName) this.changeChannelColor(channelName, e.instance.props.channel.id, modify);
|
||||||
let channelIcon = BDFDB.ReactUtils.findChild(e.returnvalue, {props:[["className", BDFDB.disCN.channelicon]]});
|
let channelIcon = BDFDB.ReactUtils.findChild(e.returnvalue, {props: [["className", BDFDB.disCN.channelicon]]});
|
||||||
if (channelIcon) this.changeChannelIconColor(channelIcon, e.instance.props.channel.id, Object.assign({alpha: 0.6}, modify));
|
if (channelIcon) this.changeChannelIconColor(channelIcon, e.instance.props.channel.id, Object.assign({alpha: 0.6}, modify));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -327,12 +327,12 @@ module.exports = (_ => {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
let modify = BDFDB.ObjectUtils.extract(e.instance.props, "focused", "unread", "mentions");
|
let modify = BDFDB.ObjectUtils.extract(e.instance.props, "focused", "unread", "mentions");
|
||||||
let channelName = BDFDB.ReactUtils.findChild(e.returnvalue, {props:[["className", BDFDB.disCN.quickswitchresultmatch]]});
|
let channelName = BDFDB.ReactUtils.findChild(e.returnvalue, {props: [["className", BDFDB.disCN.quickswitchresultmatch]]});
|
||||||
if (channelName) this.changeChannelColor(channelName, e.instance.props.channel.id, modify);
|
if (channelName) this.changeChannelColor(channelName, e.instance.props.channel.id, modify);
|
||||||
let channelIcon = BDFDB.ReactUtils.findChild(e.returnvalue, {props:[["className", BDFDB.disCN.quickswitchresulticon]]});
|
let channelIcon = BDFDB.ReactUtils.findChild(e.returnvalue, {props: [["className", BDFDB.disCN.quickswitchresulticon]]});
|
||||||
if (channelIcon) this.changeChannelIconColor(channelIcon, e.instance.props.channel.id, Object.assign({alpha: 0.6}, modify));
|
if (channelIcon) this.changeChannelIconColor(channelIcon, e.instance.props.channel.id, Object.assign({alpha: 0.6}, modify));
|
||||||
if (e.instance.props.category) {
|
if (e.instance.props.category) {
|
||||||
let categoryName = BDFDB.ReactUtils.findChild(e.returnvalue, {props:[["className", BDFDB.disCN.quickswitchresultnote]]});
|
let categoryName = BDFDB.ReactUtils.findChild(e.returnvalue, {props: [["className", BDFDB.disCN.quickswitchresultnote]]});
|
||||||
if (categoryName) this.changeChannelColor(categoryName, e.instance.props.category.id);
|
if (categoryName) this.changeChannelColor(categoryName, e.instance.props.category.id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -346,7 +346,7 @@ module.exports = (_ => {
|
||||||
let oldType = child.type;
|
let oldType = child.type;
|
||||||
child.type = (...args) => {
|
child.type = (...args) => {
|
||||||
let instance = oldType(...args);
|
let instance = oldType(...args);
|
||||||
let channelName = BDFDB.ReactUtils.findChild(instance, {props:[["className", BDFDB.disCN.recentmentionschannelname]]});
|
let channelName = BDFDB.ReactUtils.findChild(instance, {props: [["className", BDFDB.disCN.recentmentionschannelname]]});
|
||||||
if (channelName) this.changeChannelColor(channelName, child.props.channel.id);
|
if (channelName) this.changeChannelColor(channelName, child.props.channel.id);
|
||||||
return instance;
|
return instance;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
# Edit Channels - [![Downlad][download-badge]][download-link] [![Paypal][paypal-badge]][paypal-link] [![Patreon][patreon-badge]][patreon-link]
|
# Edit Channels - [![Downlad][download-badge]][download-link] [![Paypal][paypal-badge]][paypal-link] [![Patreon][patreon-badge]][patreon-link]
|
||||||
|
|
||||||
[download-badge]: https://img.shields.io/badge/Download-Plugin-brightgreen.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAACXBIWXMAAA7EAAAOxAGVKw4bAAADGGlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjaY2BgnuDo4uTKJMDAUFBUUuQe5BgZERmlwH6egY2BmYGBgYGBITG5uMAxIMCHgYGBIS8/L5UBFTAyMHy7xsDIwMDAcFnX0cXJlYE0wJpc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z1CZtZd9v7/u9vMZGdAGFabA05Hn3sWrYQwRB9rwafreikbQN5LiV6qhorDARzAARzAARzAARzAARzAARygGOAQ6a+GLr9jmlwpDuJbsxQrER+YYrXaI2D8EZyAEfangj2Fq0NrnBWry8YI5yb7rkRbBrDAK7X9NevlAYCL7Kns79iQKcunOU0+iO0fuSzV1QyUNjkU2b9wS66qm2nt8L3Q/oO7Gk3tWO2InzPtv3isU9RP9jqxmR8LMKsqdPVqFoC8qiDM/HiAcFUQZ34IYDr0VUGW+QEfK8BkVZBmfqkAWVWQZ37JAOA+n/nEtnh/wGd8JWP81Nt0P0r8Wu4ADvAHAOq2fsaP4N8BvFXi/ZoB3FYCcJMNKDbQw9Kc7YdoYfDzB+6xjUuM5mY+wsXYHvgeABIzsPkSOM/lAAAAAElFTkSuQmCC&style=flat
|
[download-badge]: https: //img.shields.io/badge/Download-Plugin-brightgreen.svg?logo=data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAACXBIWXMAAA7EAAAOxAGVKw4bAAADGGlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjaY2BgnuDo4uTKJMDAUFBUUuQe5BgZERmlwH6egY2BmYGBgYGBITG5uMAxIMCHgYGBIS8/L5UBFTAyMHy7xsDIwMDAcFnX0cXJlYE0wJpcUFTCwMBwgIGBwSgltTiZgYHhCwMDQ3p5SUEJAwNjDAMDg0hSdkEJAwNjAQMDg0h2SJAzAwNjCwMDE09JakUJAwMDg3N+QWVRZnpGiYKhpaWlgmNKflKqQnBlcUlqbrGCZ15yflFBflFiSWoKAwMD1A4GBgYGXpf8EgX3xMw8BSMDVQYqg4jIKAUICxE+CDEESC4tKoMHJQODAIMCgwGDA0MAQyJDPcMChqMMbxjFGV0YSxlXMN5jEmMKYprAdIFZmDmSeSHzGxZLlg6WW6x6rK2s99gs2aaxfWMPZ9/NocTRxfGFM5HzApcj1xZuTe4FPFI8U3mFeCfxCfNN45fhXyygI7BD0FXw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vFXi/ZoB3FYCcJMNKDbQw9Kc7YdoYfDzB+6xjUuM5mY+wsXYHvgeABIzsPkSOM/lAAAAAElFTkSuQmCC&style=flat
|
||||||
[download-link]: https://betterdiscord.net/ghdl?url=https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/EditChannels/EditChannels.plugin.js
|
[download-link]: https: //betterdiscord.net/ghdl?url=https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/EditChannels/EditChannels.plugin.js
|
||||||
|
|
||||||
[paypal-badge]: https://img.shields.io/badge/Paypal-Donate!-%23003087.svg?logo=paypal&style=flat
|
[paypal-badge]: https: //img.shields.io/badge/Paypal-Donate!-%23003087.svg?logo=paypal&style=flat
|
||||||
[paypal-link]: https://paypal.me/MircoWittrien
|
[paypal-link]: https: //paypal.me/MircoWittrien
|
||||||
|
|
||||||
[patreon-badge]: https://img.shields.io/badge/Patreon-Support!-%23F96854.svg?logo=patreon&style=flat
|
[patreon-badge]: https: //img.shields.io/badge/Patreon-Support!-%23F96854.svg?logo=patreon&style=flat
|
||||||
[patreon-link]: https://patreon.com/MircoWittrien
|
[patreon-link]: https: //patreon.com/MircoWittrien
|
||||||
|
|
||||||
Allow the user to locally change the name and color of channels
|
Allow the user to locally change the name and color of channels
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
* @name EditServers
|
* @name EditServers
|
||||||
* @authorId 278543574059057154
|
* @authorId 278543574059057154
|
||||||
* @invite Jx3TjNS
|
* @invite Jx3TjNS
|
||||||
* @donate https://www.paypal.me/MircoWittrien
|
* @donate https: //www.paypal.me/MircoWittrien
|
||||||
* @patreon https://www.patreon.com/MircoWittrien
|
* @patreon https: //www.patreon.com/MircoWittrien
|
||||||
* @website https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/EditServers
|
* @website https: //github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/EditServers
|
||||||
* @source https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/EditServers/EditServers.plugin.js
|
* @source https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/EditServers/EditServers.plugin.js
|
||||||
* @updateUrl https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/EditServers/EditServers.plugin.js
|
* @updateUrl https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/EditServers/EditServers.plugin.js
|
||||||
*/
|
*/
|
||||||
|
|
||||||
module.exports = (_ => {
|
module.exports = (_ => {
|
||||||
|
@ -31,7 +31,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
@ -40,7 +40,7 @@ module.exports = (_ => {
|
||||||
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
|
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
|
||||||
onConfirm: _ => {
|
onConfirm: _ => {
|
||||||
delete window.BDFDB_Global.downloadModal;
|
delete window.BDFDB_Global.downloadModal;
|
||||||
require("request").get("https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
|
require("request").get("https: //mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
|
||||||
if (!e && b && b.indexOf(`* @name BDFDB`) > -1) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => {});
|
if (!e && b && b.indexOf(`* @name BDFDB`) > -1) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => {});
|
||||||
else BdApi.alert("Error", "Could not download BDFDB library plugin, try again some time later.");
|
else BdApi.alert("Error", "Could not download BDFDB library plugin, try again some time later.");
|
||||||
});
|
});
|
||||||
|
@ -58,14 +58,14 @@ module.exports = (_ => {
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.defaults = {
|
this.defaults = {
|
||||||
settings: {
|
settings: {
|
||||||
addOriginalTooltip: {value:true, inner:false, description:"Hovering over a changed Server Header shows the original Name as Tooltip"},
|
addOriginalTooltip: {value: true, inner: false, description: "Hovering over a changed Server Header shows the original Name as Tooltip"},
|
||||||
changeInGuildList: {value:true, inner:true, description:"Server List"},
|
changeInGuildList: {value: true, inner: true, description: "Server List"},
|
||||||
changeInGuildHeader: {value:true, inner:true, description:"Server Header"},
|
changeInGuildHeader: {value: true, inner: true, description: "Server Header"},
|
||||||
changeInGuildInvites: {value:true, inner:true, description:"Server Invites"},
|
changeInGuildInvites: {value: true, inner: true, description: "Server Invites"},
|
||||||
changeInChat: {value:true, inner:true, description:"Chat (Welcome Message, etc.)"},
|
changeInChat: {value: true, inner: true, description: "Chat (Welcome Message, etc.)"},
|
||||||
changeInMutualGuilds: {value:true, inner:true, description:"Mutual Servers"},
|
changeInMutualGuilds: {value: true, inner: true, description: "Mutual Servers"},
|
||||||
changeInRecentMentions: {value:true, inner:true, description:"Recent Mentions Popout"},
|
changeInRecentMentions: {value: true, inner: true, description: "Recent Mentions Popout"},
|
||||||
changeInQuickSwitcher: {value:true, inner:true, description:"Quick Switcher"}
|
changeInQuickSwitcher: {value: true, inner: true, description: "Quick Switcher"}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ module.exports = (_ => {
|
||||||
}
|
}
|
||||||
|
|
||||||
onStart() {
|
onStart() {
|
||||||
BDFDB.PatchUtils.patch(this, BDFDB.LibraryModules.IconUtils, "getGuildBannerURL", {instead:e => {
|
BDFDB.PatchUtils.patch(this, BDFDB.LibraryModules.IconUtils, "getGuildBannerURL", {instead: e => {
|
||||||
let guild = BDFDB.LibraryModules.GuildStore.getGuild(e.methodArguments[0].id);
|
let guild = BDFDB.LibraryModules.GuildStore.getGuild(e.methodArguments[0].id);
|
||||||
if (guild) {
|
if (guild) {
|
||||||
if (e.methodArguments[0].id == "410787888507256842") return guild.banner;
|
if (e.methodArguments[0].id == "410787888507256842") return guild.banner;
|
||||||
|
@ -106,13 +106,13 @@ module.exports = (_ => {
|
||||||
}});
|
}});
|
||||||
|
|
||||||
BDFDB.PatchUtils.patch(this, BDFDB.LibraryComponents.GuildComponents.Guild.prototype, "render", {
|
BDFDB.PatchUtils.patch(this, BDFDB.LibraryComponents.GuildComponents.Guild.prototype, "render", {
|
||||||
before: e => {this.processGuild({instance:e.thisObject, returnvalue:e.returnValue, methodname:"render"});},
|
before: e => {this.processGuild({instance: e.thisObject, returnvalue: e.returnValue, methodname: "render"});},
|
||||||
after: e => {this.processGuild({instance:e.thisObject, returnvalue:e.returnValue, methodname:"render"});}
|
after: e => {this.processGuild({instance: e.thisObject, returnvalue: e.returnValue, methodname: "render"});}
|
||||||
});
|
});
|
||||||
|
|
||||||
BDFDB.PatchUtils.patch(this, BDFDB.LibraryComponents.Connectors.Link.prototype, "render", {
|
BDFDB.PatchUtils.patch(this, BDFDB.LibraryComponents.Connectors.Link.prototype, "render", {
|
||||||
after: e => {
|
after: e => {
|
||||||
if (e.thisObject.props.className && e.thisObject.props.className.indexOf(BDFDB.disCN.guildiconwrapper) > -1) this.processGuildAcronym({instance:e.thisObject, returnvalue:e.returnValue, methodname:"render"});
|
if (e.thisObject.props.className && e.thisObject.props.className.indexOf(BDFDB.disCN.guildiconwrapper) > -1) this.processGuildAcronym({instance: e.thisObject, returnvalue: e.returnValue, methodname: "render"});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ module.exports = (_ => {
|
||||||
value: settings[key]
|
value: settings[key]
|
||||||
}));
|
}));
|
||||||
settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsPanelInner, {
|
settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsPanelInner, {
|
||||||
title: "Change Servers in:",
|
title: "Change Servers in: ",
|
||||||
first: settingsItems.length == 0,
|
first: settingsItems.length == 0,
|
||||||
children: Object.keys(settings).map(key => this.defaults.settings[key].inner && BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
|
children: Object.keys(settings).map(key => this.defaults.settings[key].inner && BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
|
||||||
type: "Switch",
|
type: "Switch",
|
||||||
|
@ -253,7 +253,7 @@ module.exports = (_ => {
|
||||||
let renderChildren = e.returnvalue.props.children;
|
let renderChildren = e.returnvalue.props.children;
|
||||||
e.returnvalue.props.children = (...args) => {
|
e.returnvalue.props.children = (...args) => {
|
||||||
let renderedChildren = renderChildren(...args);
|
let renderedChildren = renderChildren(...args);
|
||||||
let guildAcronym = BDFDB.ReactUtils.findChild(renderedChildren, {props:[["className", BDFDB.disCN.guildiconacronym]]});
|
let guildAcronym = BDFDB.ReactUtils.findChild(renderedChildren, {props: [["className", BDFDB.disCN.guildiconacronym]]});
|
||||||
if (guildAcronym) {
|
if (guildAcronym) {
|
||||||
let fontGradient = BDFDB.ObjectUtils.is(data.color2);
|
let fontGradient = BDFDB.ObjectUtils.is(data.color2);
|
||||||
guildAcronym.props.style = Object.assign({}, guildAcronym.props.style, {
|
guildAcronym.props.style = Object.assign({}, guildAcronym.props.style, {
|
||||||
|
@ -310,7 +310,7 @@ module.exports = (_ => {
|
||||||
let oldType = child.type;
|
let oldType = child.type;
|
||||||
child.type = (...args) => {
|
child.type = (...args) => {
|
||||||
let instance = oldType(...args);
|
let instance = oldType(...args);
|
||||||
let guildName = BDFDB.ReactUtils.findChild(instance, {props:[["className", BDFDB.disCN.recentmentionsguildname]]});
|
let guildName = BDFDB.ReactUtils.findChild(instance, {props: [["className", BDFDB.disCN.recentmentionsguildname]]});
|
||||||
if (guildName) guildName.props.children = (this.getGuildData(e.instance.props.channel.guild_id) || {}).name || guildName.props.children;
|
if (guildName) guildName.props.children = (this.getGuildData(e.instance.props.channel.guild_id) || {}).name || guildName.props.children;
|
||||||
return instance;
|
return instance;
|
||||||
};
|
};
|
||||||
|
@ -352,7 +352,7 @@ module.exports = (_ => {
|
||||||
processWelcomeArea (e) {
|
processWelcomeArea (e) {
|
||||||
if (e.instance.props.channel && settings.changeInChat) {
|
if (e.instance.props.channel && settings.changeInChat) {
|
||||||
let name = (BDFDB.LibraryModules.GuildStore.getGuild(e.instance.props.channel.guild_id) || {}).name;
|
let name = (BDFDB.LibraryModules.GuildStore.getGuild(e.instance.props.channel.guild_id) || {}).name;
|
||||||
let guildName = name && BDFDB.ReactUtils.findChild(e.returnvalue, {props:[["className", "titleName-3-Lp3Z"]]});
|
let guildName = name && BDFDB.ReactUtils.findChild(e.returnvalue, {props: [["className", "titleName-3-Lp3Z"]]});
|
||||||
if (guildName && guildName.props && BDFDB.ArrayUtils.is(guildName.props.children)) {
|
if (guildName && guildName.props && BDFDB.ArrayUtils.is(guildName.props.children)) {
|
||||||
for (let child of guildName.props.children) if (child && child.props && BDFDB.ArrayUtils.is(child.props.children) && child.props.children[0] == name) {
|
for (let child of guildName.props.children) if (child && child.props && BDFDB.ArrayUtils.is(child.props.children) && child.props.children[0] == name) {
|
||||||
child.props.children = [(this.getGuildData(e.instance.props.channel.guild_id) || {}).name || name];
|
child.props.children = [(this.getGuildData(e.instance.props.channel.guild_id) || {}).name || name];
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
# Edit Servers - [![Downlad][download-badge]][download-link] [![Paypal][paypal-badge]][paypal-link] [![Patreon][patreon-badge]][patreon-link]
|
# Edit Servers - [![Downlad][download-badge]][download-link] [![Paypal][paypal-badge]][paypal-link] [![Patreon][patreon-badge]][patreon-link]
|
||||||
|
|
||||||
[download-badge]: https://img.shields.io/badge/Download-Plugin-brightgreen.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAACXBIWXMAAA7EAAAOxAGVKw4bAAADGGlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjaY2BgnuDo4uTKJMDAUFBUUuQe5BgZERmlwH6egY2BmYGBgYGBITG5uMAxIMCHgYGBIS8/L5UBFTAyMHy7xsDIwMDAcFnX0cXJlYE0wJpcUFTCwMBwgIGBwSgltTiZgYHhCwMDQ3p5SUEJAwNjDAMDg0hSdkEJAwNjAQMDg0h2SJAzAwNjCwMDE09JakUJAwMDg3N+QWVRZnpGiYKhpaWlgmNKflKqQnBlcUlqbrGCZ15yflFBflFiSWoKAwMD1A4GBgYGXpf8EgX3xMw8BSMDVQYqg4jIKAUICxE+CDEESC4tKoMHJQODAIMCgwGDA0MAQyJDPcMChqMMbxjFGV0YSxlXMN5jEmMKYprAdIFZmDmSeSHzGxZLlg6WW6x6rK2s99gs2aaxfWMPZ9/NocTRxfGFM5HzApcj1xZuTe4FPFI8U3mFeCfxCfNN45fhXyygI7BD0FXwilCq0A/hXhEVkb2i4aJfxCaJG4lfkaiQlJM8JpUvLS19QqZMVl32llyfvIv8H4WtioVKekpvldeqFKiaqP5UO6jepRGqqaT5QeuA9iSdVF0rPUG9V/pHDBYY1hrFGNuayJsym740u2C+02KJ5QSrOutcmzjbQDtXe2sHY0cdJzVnJRcFV3k3BXdlD3VPXS8Tbxsfd99gvwT//ID6wIlBS4N3hVwMfRnOFCEXaRUVEV0RMzN2T9yDBLZE3aSw5IaUNak30zkyLDIzs+ZmX8xlz7PPryjYVPiuWLskq3RV2ZsK/cqSql01jLVedVPrHzbqNdU0n22VaytsP9op3VXUfbpXta+x/+5Em0mzJ/+dGj/t8AyNmf2zvs9JmHt6vvmCpYtEFrcu+bYsc/m9lSGrTq9xWbtvveWGbZtMNm/ZarJt+w6rnft3u+45uy9s/4ODOYd+Hmk/Jn58xUnrU+fOJJ/9dX7SRe1LR68kXv13fc5Nm1t379TfU75/4mHeY7En+59lvhB5efB1/lv5dxc+NH0y/fzq64Lv4T8Ffp360/rP8f9/AA0ADzT6lvFdAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAF1SURBVHja7JihTgNBEIb/K1WkBtEEAsESBKEvgEKRAhLHOxAMfQ9cHwEMBoFA1/ACBEGgzbkmUAwI+BENubTs9WZmLz1CZtZd9v7/u9vMZGdAGFabA05Hn3sWrYQwRB9rwafreikbQN5LiV6qhorDARzAARzAARzAARzAARzAARygGOAQ6a+GLr9jmlwpDuJbsxQrER+YYrXaI2D8EZyAEfangj2Fq0NrnBWry8YI5yb7rkRbBrDAK7X9NevlAYCL7Kns79iQKcunOU0+iO0fuSzV1QyUNjkU2b9wS66qm2nt8L3Q/oO7Gk3tWO2InzPtv3isU9RP9jqxmR8LMKsqdPVqFoC8qiDM/HiAcFUQZ34IYDr0VUGW+QEfK8BkVZBmfqkAWVWQZ37JAOA+n/nEtnh/wGd8JWP81Nt0P0r8Wu4ADvAHAOq2fsaP4N8BvFXi/ZoB3FYCcJMNKDbQw9Kc7YdoYfDzB+6xjUuM5mY+wsXYHvgeABIzsPkSOM/lAAAAAElFTkSuQmCC&style=flat
|
[download-badge]: https: //img.shields.io/badge/Download-Plugin-brightgreen.svg?logo=data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAACXBIWXMAAA7EAAAOxAGVKw4bAAADGGlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjaY2BgnuDo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fxUYAAAF1SURBVHja7JihTgNBEIb/K1WkBtEEAsESBKEvgEKRAhLHOxAMfQ9cHwEMBoFA1/ACBEGgzbkmUAwI+BENubTs9WZmLz1CZtZd9v7/u9vMZGdAGFabA05Hn3sWrYQwRB9rwafreikbQN5LiV6qhorDARzAARzAARzAARzAARzAARygGOAQ6a+GLr9jmlwpDuJbsxQrER+YYrXaI2D8EZyAEfangj2Fq0NrnBWry8YI5yb7rkRbBrDAK7X9NevlAYCL7Kns79iQKcunOU0+iO0fuSzV1QyUNjkU2b9wS66qm2nt8L3Q/oO7Gk3tWO2InzPtv3isU9RP9jqxmR8LMKsqdPVqFoC8qiDM/HiAcFUQZ34IYDr0VUGW+QEfK8BkVZBmfqkAWVWQZ37JAOA+n/nEtnh/wGd8JWP81Nt0P0r8Wu4ADvAHAOq2fsaP4N8BvFXi/ZoB3FYCcJMNKDbQw9Kc7YdoYfDzB+6xjUuM5mY+wsXYHvgeABIzsPkSOM/lAAAAAElFTkSuQmCC&style=flat
|
||||||
[download-link]: https://betterdiscord.net/ghdl?url=https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/EditServers/EditServers.plugin.js
|
[download-link]: https: //betterdiscord.net/ghdl?url=https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/EditServers/EditServers.plugin.js
|
||||||
|
|
||||||
[paypal-badge]: https://img.shields.io/badge/Paypal-Donate!-%23003087.svg?logo=paypal&style=flat
|
[paypal-badge]: https: //img.shields.io/badge/Paypal-Donate!-%23003087.svg?logo=paypal&style=flat
|
||||||
[paypal-link]: https://paypal.me/MircoWittrien
|
[paypal-link]: https: //paypal.me/MircoWittrien
|
||||||
|
|
||||||
[patreon-badge]: https://img.shields.io/badge/Patreon-Support!-%23F96854.svg?logo=patreon&style=flat
|
[patreon-badge]: https: //img.shields.io/badge/Patreon-Support!-%23F96854.svg?logo=patreon&style=flat
|
||||||
[patreon-link]: https://patreon.com/MircoWittrien
|
[patreon-link]: https: //patreon.com/MircoWittrien
|
||||||
|
|
||||||
Add two options on your server context menu
|
Add two options on your server context menu
|
||||||
|
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
* @name EditUsers
|
* @name EditUsers
|
||||||
* @authorId 278543574059057154
|
* @authorId 278543574059057154
|
||||||
* @invite Jx3TjNS
|
* @invite Jx3TjNS
|
||||||
* @donate https://www.paypal.me/MircoWittrien
|
* @donate https: //www.paypal.me/MircoWittrien
|
||||||
* @patreon https://www.patreon.com/MircoWittrien
|
* @patreon https: //www.patreon.com/MircoWittrien
|
||||||
* @website https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/EditUsers
|
* @website https: //github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/EditUsers
|
||||||
* @source https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/EditUsers/EditUsers.plugin.js
|
* @source https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/EditUsers/EditUsers.plugin.js
|
||||||
* @updateUrl https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/EditUsers/EditUsers.plugin.js
|
* @updateUrl https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/EditUsers/EditUsers.plugin.js
|
||||||
*/
|
*/
|
||||||
|
|
||||||
module.exports = (_ => {
|
module.exports = (_ => {
|
||||||
|
@ -31,7 +31,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
@ -40,7 +40,7 @@ module.exports = (_ => {
|
||||||
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
|
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
|
||||||
onConfirm: _ => {
|
onConfirm: _ => {
|
||||||
delete window.BDFDB_Global.downloadModal;
|
delete window.BDFDB_Global.downloadModal;
|
||||||
require("request").get("https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
|
require("request").get("https: //mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
|
||||||
if (!e && b && b.indexOf(`* @name BDFDB`) > -1) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => {});
|
if (!e && b && b.indexOf(`* @name BDFDB`) > -1) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => {});
|
||||||
else BdApi.alert("Error", "Could not download BDFDB library plugin, try again some time later.");
|
else BdApi.alert("Error", "Could not download BDFDB library plugin, try again some time later.");
|
||||||
});
|
});
|
||||||
|
@ -58,31 +58,31 @@ module.exports = (_ => {
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.defaults = {
|
this.defaults = {
|
||||||
settings: {
|
settings: {
|
||||||
changeInContextMenu: {value:true, inner:true, description:"User ContextMenu"},
|
changeInContextMenu: {value: true, inner: true, description: "User ContextMenu"},
|
||||||
changeInChatTextarea: {value:true, inner:true, description:"Chat Textarea"},
|
changeInChatTextarea: {value: true, inner: true, description: "Chat Textarea"},
|
||||||
changeInChatWindow: {value:true, inner:true, description:"Messages"},
|
changeInChatWindow: {value: true, inner: true, description: "Messages"},
|
||||||
changeInReactions: {value:true, inner:true, description:"Reactions"},
|
changeInReactions: {value: true, inner: true, description: "Reactions"},
|
||||||
changeInMentions: {value:true, inner:true, description:"Mentions"},
|
changeInMentions: {value: true, inner: true, description: "Mentions"},
|
||||||
changeInVoiceChat: {value:true, inner:true, description:"Voice Channels"},
|
changeInVoiceChat: {value: true, inner: true, description: "Voice Channels"},
|
||||||
changeInMemberList: {value:true, inner:true, description:"Member List"},
|
changeInMemberList: {value: true, inner: true, description: "Member List"},
|
||||||
changeInRecentDms: {value:true, inner:true, description:"Direct Message Notifications"},
|
changeInRecentDms: {value: true, inner: true, description: "Direct Message Notifications"},
|
||||||
changeInDmsList: {value:true, inner:true, description:"Direct Message List"},
|
changeInDmsList: {value: true, inner: true, description: "Direct Message List"},
|
||||||
changeInDmHeader: {value:true, inner:true, description:"Direct Message Header"},
|
changeInDmHeader: {value: true, inner: true, description: "Direct Message Header"},
|
||||||
changeInDmCalls: {value:true, inner:true, description:"Calls/ScreenShares"},
|
changeInDmCalls: {value: true, inner: true, description: "Calls/ScreenShares"},
|
||||||
changeInTyping: {value:true, inner:true, description:"Typing List"},
|
changeInTyping: {value: true, inner: true, description: "Typing List"},
|
||||||
changeInFriendList: {value:true, inner:true, description:"Friend List"},
|
changeInFriendList: {value: true, inner: true, description: "Friend List"},
|
||||||
changeInInviteList: {value:true, inner:true, description:"Invite List"},
|
changeInInviteList: {value: true, inner: true, description: "Invite List"},
|
||||||
changeInActivity: {value:true, inner:true, description:"Activity Page"},
|
changeInActivity: {value: true, inner: true, description: "Activity Page"},
|
||||||
changeInUserPopout: {value:true, inner:true, description:"User Popouts"},
|
changeInUserPopout: {value: true, inner: true, description: "User Popouts"},
|
||||||
changeInUserProfile: {value:true, inner:true, description:"User Profile Modal"},
|
changeInUserProfile: {value: true, inner: true, description: "User Profile Modal"},
|
||||||
changeInAutoComplete: {value:true, inner:true, description:"Autocomplete Menu"},
|
changeInAutoComplete: {value: true, inner: true, description: "Autocomplete Menu"},
|
||||||
changeInAuditLog: {value:true, inner:true, description:"Audit Log"},
|
changeInAuditLog: {value: true, inner: true, description: "Audit Log"},
|
||||||
changeInEmojiLog: {value:true, inner:true, description:"Emoji Upload Log"},
|
changeInEmojiLog: {value: true, inner: true, description: "Emoji Upload Log"},
|
||||||
changeInMemberLog: {value:true, inner:true, description:"Member Log"},
|
changeInMemberLog: {value: true, inner: true, description: "Member Log"},
|
||||||
changeInQuickSwitcher: {value:true, inner:true, description:"Quick Switcher"},
|
changeInQuickSwitcher: {value: true, inner: true, description: "Quick Switcher"},
|
||||||
changeInSearchPopout: {value:true, inner:true, description:"Search Popout"},
|
changeInSearchPopout: {value: true, inner: true, description: "Search Popout"},
|
||||||
changeInUserAccount: {value:true, inner:true, description:"Your Account Information"},
|
changeInUserAccount: {value: true, inner: true, description: "Your Account Information"},
|
||||||
changeInAppTitle: {value:true, inner:true, description:"Discord App Title (DMs)"}
|
changeInAppTitle: {value: true, inner: true, description: "Discord App Title (DMs)"}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -175,7 +175,7 @@ module.exports = (_ => {
|
||||||
|
|
||||||
onStart() {
|
onStart() {
|
||||||
let observer = new MutationObserver(_ => {this.changeAppTitle();});
|
let observer = new MutationObserver(_ => {this.changeAppTitle();});
|
||||||
BDFDB.ObserverUtils.connect(this, document.head.querySelector("title"), {name:"appTitleObserver", instance:observer}, {childList:true});
|
BDFDB.ObserverUtils.connect(this, document.head.querySelector("title"), {name: "appTitleObserver", instance: observer}, {childList: true});
|
||||||
|
|
||||||
let searchGroupData = BDFDB.ObjectUtils.get(BDFDB.ModuleUtils.findByName("SearchPopoutComponent", false), "exports.GroupData");
|
let searchGroupData = BDFDB.ObjectUtils.get(BDFDB.ModuleUtils.findByName("SearchPopoutComponent", false), "exports.GroupData");
|
||||||
if (BDFDB.ObjectUtils.is(searchGroupData)) {
|
if (BDFDB.ObjectUtils.is(searchGroupData)) {
|
||||||
|
@ -231,7 +231,7 @@ module.exports = (_ => {
|
||||||
value: settings[key]
|
value: settings[key]
|
||||||
}));
|
}));
|
||||||
settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsPanelInner, {
|
settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsPanelInner, {
|
||||||
title: "Change Users in:",
|
title: "Change Users in: ",
|
||||||
first: settingsItems.length == 0,
|
first: settingsItems.length == 0,
|
||||||
children: Object.keys(settings).map(key => this.defaults.settings[key].inner && BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
|
children: Object.keys(settings).map(key => this.defaults.settings[key].inner && BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
|
||||||
type: "Switch",
|
type: "Switch",
|
||||||
|
@ -333,7 +333,7 @@ module.exports = (_ => {
|
||||||
if (data && data.name) e.instance.props.nick = data.name;
|
if (data && data.name) e.instance.props.nick = data.name;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
let userName = BDFDB.ReactUtils.findChild(e.returnvalue, {props:[["className", BDFDB.disCN.marginleft8]]});
|
let userName = BDFDB.ReactUtils.findChild(e.returnvalue, {props: [["className", BDFDB.disCN.marginleft8]]});
|
||||||
if (userName) this.changeUserColor(userName, e.instance.props.user.id);
|
if (userName) this.changeUserColor(userName, e.instance.props.user.id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -398,7 +398,7 @@ module.exports = (_ => {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (change) {
|
if (change) {
|
||||||
let userName = BDFDB.ReactUtils.findChild(e.returnvalue, {props:[["className", BDFDB.disCN.username]]});
|
let userName = BDFDB.ReactUtils.findChild(e.returnvalue, {props: [["className", BDFDB.disCN.username]]});
|
||||||
if (userName) this.changeUserColor(userName, e.instance.props.user.id, {
|
if (userName) this.changeUserColor(userName, e.instance.props.user.id, {
|
||||||
changeBackground: changeBackground
|
changeBackground: changeBackground
|
||||||
});
|
});
|
||||||
|
@ -428,7 +428,7 @@ module.exports = (_ => {
|
||||||
if (data && (data.color1 || data.color2 || data.tag)) {
|
if (data && (data.color1 || data.color2 || data.tag)) {
|
||||||
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {props: [["className", BDFDB.disCN.userpopoutheadernickname]]});
|
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {props: [["className", BDFDB.disCN.userpopoutheadernickname]]});
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
this.changeUserColor(children[index], e.instance.props.user.id, {changeBackground:true});
|
this.changeUserColor(children[index], e.instance.props.user.id, {changeBackground: true});
|
||||||
this.injectBadge(children, e.instance.props.user.id, BDFDB.LibraryModules.LastGuildStore.getGuildId(), 2, {
|
this.injectBadge(children, e.instance.props.user.id, BDFDB.LibraryModules.LastGuildStore.getGuildId(), 2, {
|
||||||
tagClass: BDFDB.disCN.bottagnametag,
|
tagClass: BDFDB.disCN.bottagnametag,
|
||||||
inverted: typeof e.instance.getMode == "function" && e.instance.getMode() !== "Normal"
|
inverted: typeof e.instance.getMode == "function" && e.instance.getMode() !== "Normal"
|
||||||
|
@ -722,7 +722,7 @@ module.exports = (_ => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.changeUserColor(e.returnvalue.props.name, e.instance.props.user.id, {changeBackground: true, guildId:e.instance.props.channel.guild_id});
|
this.changeUserColor(e.returnvalue.props.name, e.instance.props.user.id, {changeBackground: true, guildId: e.instance.props.channel.guild_id});
|
||||||
this.injectBadge(BDFDB.ObjectUtils.get(e.returnvalue, "props.decorators.props.children"), e.instance.props.user.id, BDFDB.LibraryModules.LastGuildStore.getGuildId(), 2, {
|
this.injectBadge(BDFDB.ObjectUtils.get(e.returnvalue, "props.decorators.props.children"), e.instance.props.user.id, BDFDB.LibraryModules.LastGuildStore.getGuildId(), 2, {
|
||||||
tagClass: BDFDB.disCN.bottagmember
|
tagClass: BDFDB.disCN.bottagmember
|
||||||
});
|
});
|
||||||
|
@ -849,7 +849,7 @@ module.exports = (_ => {
|
||||||
if (e.instance.props.user && settings.changeInQuickSwitcher) {
|
if (e.instance.props.user && settings.changeInQuickSwitcher) {
|
||||||
if (!e.returnvalue) e.instance.props.user = this.getUserData(e.instance.props.user.id);
|
if (!e.returnvalue) e.instance.props.user = this.getUserData(e.instance.props.user.id);
|
||||||
else {
|
else {
|
||||||
let userName = BDFDB.ReactUtils.findChild(e.returnvalue, {props:[["className", BDFDB.disCN.quickswitchresultmatch]]});
|
let userName = BDFDB.ReactUtils.findChild(e.returnvalue, {props: [["className", BDFDB.disCN.quickswitchresultmatch]]});
|
||||||
if (userName) {
|
if (userName) {
|
||||||
let data = changedUsers[e.instance.props.user.id];
|
let data = changedUsers[e.instance.props.user.id];
|
||||||
if (data && data.name) userName.props.children = data.name;
|
if (data && data.name) userName.props.children = data.name;
|
||||||
|
@ -867,7 +867,7 @@ module.exports = (_ => {
|
||||||
|
|
||||||
processSearchPopoutUserResult (e) {
|
processSearchPopoutUserResult (e) {
|
||||||
if (e.instance.props.result && e.instance.props.result.user && settings.changeInSearchPopout) {
|
if (e.instance.props.result && e.instance.props.result.user && settings.changeInSearchPopout) {
|
||||||
let userName = BDFDB.ReactUtils.findChild(e.returnvalue, {props:[["className", BDFDB.disCN.searchpopoutdisplayednick]]});
|
let userName = BDFDB.ReactUtils.findChild(e.returnvalue, {props: [["className", BDFDB.disCN.searchpopoutdisplayednick]]});
|
||||||
if (userName) {
|
if (userName) {
|
||||||
let data = changedUsers[e.instance.props.result.user.id];
|
let data = changedUsers[e.instance.props.result.user.id];
|
||||||
if (data && data.name) userName.props.children = data.name;
|
if (data && data.name) userName.props.children = data.name;
|
||||||
|
@ -884,13 +884,13 @@ module.exports = (_ => {
|
||||||
if (channel && channel.type == BDFDB.DiscordConstants.ChannelTypes.DM) user = BDFDB.LibraryModules.UserStore.getUser(channel.recipients[0]);
|
if (channel && channel.type == BDFDB.DiscordConstants.ChannelTypes.DM) user = BDFDB.LibraryModules.UserStore.getUser(channel.recipients[0]);
|
||||||
}
|
}
|
||||||
if (user) {
|
if (user) {
|
||||||
let userName = BDFDB.ReactUtils.findChild(e.returnvalue, {props:[["className", BDFDB.disCN.callincomingtitle]]});
|
let userName = BDFDB.ReactUtils.findChild(e.returnvalue, {props: [["className", BDFDB.disCN.callincomingtitle]]});
|
||||||
if (userName) {
|
if (userName) {
|
||||||
let data = changedUsers[user.id];
|
let data = changedUsers[user.id];
|
||||||
if (data && data.name) userName.props.children = data.name;
|
if (data && data.name) userName.props.children = data.name;
|
||||||
this.changeUserColor(userName, user.id);
|
this.changeUserColor(userName, user.id);
|
||||||
}
|
}
|
||||||
let avatar = BDFDB.ReactUtils.findChild(e.returnvalue, {props:[["className", BDFDB.disCN.callincomingicon]]});
|
let avatar = BDFDB.ReactUtils.findChild(e.returnvalue, {props: [["className", BDFDB.disCN.callincomingicon]]});
|
||||||
if (avatar) avatar.props.src = this.getUserAvatar(user.id);
|
if (avatar) avatar.props.src = this.getUserAvatar(user.id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1275,8 +1275,8 @@ module.exports = (_ => {
|
||||||
tag: BDFDB.LibraryComponents.FormComponents.FormTitle.Tags.H5,
|
tag: BDFDB.LibraryComponents.FormComponents.FormTitle.Tags.H5,
|
||||||
value: data.ignoreTagColor,
|
value: data.ignoreTagColor,
|
||||||
onChange: (value, instance) => {
|
onChange: (value, instance) => {
|
||||||
let colorpicker3ins = BDFDB.ReactUtils.findOwner(instance._reactInternalFiber.return, {props:[["number",3]]});
|
let colorpicker3ins = BDFDB.ReactUtils.findOwner(instance._reactInternalFiber.return, {props: [["number",3]]});
|
||||||
let colorpicker4ins = BDFDB.ReactUtils.findOwner(instance._reactInternalFiber.return, {props:[["number",4]]});
|
let colorpicker4ins = BDFDB.ReactUtils.findOwner(instance._reactInternalFiber.return, {props: [["number",4]]});
|
||||||
if (colorpicker3ins) colorpicker3ins.setState({disabled: value});
|
if (colorpicker3ins) colorpicker3ins.setState({disabled: value});
|
||||||
if (colorpicker4ins) colorpicker4ins.setState({disabled: value});
|
if (colorpicker4ins) colorpicker4ins.setState({disabled: value});
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
# Edit Users - [![Downlad][download-badge]][download-link] [![Paypal][paypal-badge]][paypal-link] [![Patreon][patreon-badge]][patreon-link]
|
# Edit Users - [![Downlad][download-badge]][download-link] [![Paypal][paypal-badge]][paypal-link] [![Patreon][patreon-badge]][patreon-link]
|
||||||
|
|
||||||
[download-badge]: https://img.shields.io/badge/Download-Plugin-brightgreen.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAACXBIWXMAAA7EAAAOxAGVKw4bAAADGGlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjaY2BgnuDo4uTKJMDAUFBUUuQe5BgZERmlwH6egY2BmYGBgYGBITG5uMAxIMCHgYGBIS8/L5UBFTAyMHy7xsDIwMDAcFnX0cXJlYE0wJpcUFTCwMBwgIGBwSgltTiZgYHhCwMDQ3p5SUEJAwNjDAMDg0hSdkEJAwNjAQMDg0h2SJAzAwNjCwMDE09JakUJAwMDg3N+QWVRZnpGiYKhpaWlgmNKflKqQnBlcUlqbrGCZ15yflFBflFiSWoKAwMD1A4GBgYGXpf8EgX3xMw8BSMDVQYqg4jIKAUICxE+CDEESC4tKoMHJQODAIMCgwGDA0MAQyJDPcMChqMMbxjFGV0YSxlXMN5jEmMKYprAdIFZmDmSeSHzGxZLlg6WW6x6rK2s99gs2aaxfWMPZ9/NocTRxfGFM5HzApcj1xZuTe4FPFI8U3mFeCfxCfNN45fhXyygI7BD0FXwilCq0A/hXhEVkb2i4aJfxCaJG4lfkaiQlJM8JpUvLS19QqZMVl32llyfvIv8H4WtioVKekpvldeqFKiaqP5UO6jepRGqqaT5QeuA9iSdVF0rPUG9V/pHDBYY1hrFGNuayJsym740u2C+02KJ5QSrOutcmzjbQDtXe2sHY0cdJzVnJRcFV3k3BXdlD3VPXS8Tbxsfd99gvwT//ID6wIlBS4N3hVwMfRnOFCEXaRUVEV0RMzN2T9yDBLZE3aSw5IaUNak30zkyLDIzs+ZmX8xlz7PPryjYVPiuWLskq3RV2ZsK/cqSql01jLVedVPrHzbqNdU0n22VaytsP9op3VXUfbpXta+x/+5Em0mzJ/+dGj/t8AyNmf2zvs9JmHt6vvmCpYtEFrcu+bYsc/m9lSGrTq9xWbtvveWGbZtMNm/ZarJt+w6rnft3u+45uy9s/4ODOYd+Hmk/Jn58xUnrU+fOJJ/9dX7SRe1LR68kXv13fc5Nm1t379TfU75/4mHeY7En+59lvhB5efB1/lv5dxc+NH0y/fzq64Lv4T8Ffp360/rP8f9/AA0ADzT6lvFdAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAF1SURBVHja7JihTgNBEIb/K1WkBtEEAsESBKEvgEKRAhLHOxAMfQ9cHwEMBoFA1/ACBEGgzbkmUAwI+BENubTs9WZmLz1CZtZd9v7/u9vMZGdAGFabA05Hn3sWrYQwRB9rwafreikbQN5LiV6qhorDARzAARzAARzAARzAARzAARygGOAQ6a+GLr9jmlwpDuJbsxQrER+YYrXaI2D8EZyAEfangj2Fq0NrnBWry8YI5yb7rkRbBrDAK7X9NevlAYCL7Kns79iQKcunOU0+iO0fuSzV1QyUNjkU2b9wS66qm2nt8L3Q/oO7Gk3tWO2InzPtv3isU9RP9jqxmR8LMKsqdPVqFoC8qiDM/HiAcFUQZ34IYDr0VUGW+QEfK8BkVZBmfqkAWVWQZ37JAOA+n/nEtnh/wGd8JWP81Nt0P0r8Wu4ADvAHAOq2fsaP4N8BvFXi/ZoB3FYCcJMNKDbQw9Kc7YdoYfDzB+6xjUuM5mY+wsXYHvgeABIzsPkSOM/lAAAAAElFTkSuQmCC&style=flat
|
[download-badge]: https: //img.shields.io/badge/Download-Plugin-brightgreen.svg?logo=data: image/png;base64,i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/4mHeY7En+59lvhB5efB1/lv5dxc+NH0y/fzq64Lv4T8Ffp360/rP8f9/AA0ADzT6lvFdAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAF1SURBVHja7JihTgNBEIb/K1WkBtEEAsESBKEvgEKRAhLHOxAMfQ9cHwEMBoFA1/ACBEGgzbkmUAwI+BENubTs9WZmLz1CZtZd9v7/u9vMZGdAGFabA05Hn3sWrYQwRB9rwafreikbQN5LiV6qhorDARzAARzAARzAARzAARzAARygGOAQ6a+GLr9jmlwpDuJbsxQrER+YYrXaI2D8EZyAEfangj2Fq0NrnBWry8YI5yb7rkRbBrDAK7X9NevlAYCL7Kns79iQKcunOU0+iO0fuSzV1QyUNjkU2b9wS66qm2nt8L3Q/oO7Gk3tWO2InzPtv3isU9RP9jqxmR8LMKsqdPVqFoC8qiDM/HiAcFUQZ34IYDr0VUGW+QEfK8BkVZBmfqkAWVWQZ37JAOA+n/nEtnh/wGd8JWP81Nt0P0r8Wu4ADvAHAOq2fsaP4N8BvFXi/ZoB3FYCcJMNKDbQw9Kc7YdoYfDzB+6xjUuM5mY+wsXYHvgeABIzsPkSOM/lAAAAAElFTkSuQmCC&style=flat
|
||||||
[download-link]: https://betterdiscord.net/ghdl?url=https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/EditUsers/EditUsers.plugin.js
|
[download-link]: https: //betterdiscord.net/ghdl?url=https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/EditUsers/EditUsers.plugin.js
|
||||||
|
|
||||||
[paypal-badge]: https://img.shields.io/badge/Paypal-Donate!-%23003087.svg?logo=paypal&style=flat
|
[paypal-badge]: https: //img.shields.io/badge/Paypal-Donate!-%23003087.svg?logo=paypal&style=flat
|
||||||
[paypal-link]: https://paypal.me/MircoWittrien
|
[paypal-link]: https: //paypal.me/MircoWittrien
|
||||||
|
|
||||||
[patreon-badge]: https://img.shields.io/badge/Patreon-Support!-%23F96854.svg?logo=patreon&style=flat
|
[patreon-badge]: https: //img.shields.io/badge/Patreon-Support!-%23F96854.svg?logo=patreon&style=flat
|
||||||
[patreon-link]: https://patreon.com/MircoWittrien
|
[patreon-link]: https: //patreon.com/MircoWittrien
|
||||||
|
|
||||||
Allow you to change the icon, name, tag and color of users
|
Allow you to change the icon, name, tag and color of users
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
* @name EmojiStatistics
|
* @name EmojiStatistics
|
||||||
* @authorId 278543574059057154
|
* @authorId 278543574059057154
|
||||||
* @invite Jx3TjNS
|
* @invite Jx3TjNS
|
||||||
* @donate https://www.paypal.me/MircoWittrien
|
* @donate https: //www.paypal.me/MircoWittrien
|
||||||
* @patreon https://www.patreon.com/MircoWittrien
|
* @patreon https: //www.patreon.com/MircoWittrien
|
||||||
* @website https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/EmojiStatistics
|
* @website https: //github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/EmojiStatistics
|
||||||
* @source https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/EmojiStatistics/EmojiStatistics.plugin.js
|
* @source https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/EmojiStatistics/EmojiStatistics.plugin.js
|
||||||
* @updateUrl https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/EmojiStatistics/EmojiStatistics.plugin.js
|
* @updateUrl https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/EmojiStatistics/EmojiStatistics.plugin.js
|
||||||
*/
|
*/
|
||||||
|
|
||||||
module.exports = (_ => {
|
module.exports = (_ => {
|
||||||
|
@ -26,7 +26,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
@ -35,7 +35,7 @@ module.exports = (_ => {
|
||||||
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
|
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
|
||||||
onConfirm: _ => {
|
onConfirm: _ => {
|
||||||
delete window.BDFDB_Global.downloadModal;
|
delete window.BDFDB_Global.downloadModal;
|
||||||
require("request").get("https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
|
require("request").get("https: //mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
|
||||||
if (!e && b && b.indexOf(`* @name BDFDB`) > -1) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => {});
|
if (!e && b && b.indexOf(`* @name BDFDB`) > -1) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => {});
|
||||||
else BdApi.alert("Error", "Could not download BDFDB library plugin, try again some time later.");
|
else BdApi.alert("Error", "Could not download BDFDB library plugin, try again some time later.");
|
||||||
});
|
});
|
||||||
|
@ -91,7 +91,7 @@ module.exports = (_ => {
|
||||||
|
|
||||||
processEmojiPicker (e) {
|
processEmojiPicker (e) {
|
||||||
this.loadEmojiList();
|
this.loadEmojiList();
|
||||||
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {name:"DiversitySelector"});
|
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {name: "DiversitySelector"});
|
||||||
if (index > -1) children.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TooltipContainer, {
|
if (index > -1) children.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TooltipContainer, {
|
||||||
text: "Emoji Statistics",
|
text: "Emoji Statistics",
|
||||||
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Clickable, {
|
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Clickable, {
|
||||||
|
@ -126,7 +126,7 @@ module.exports = (_ => {
|
||||||
className: `${this.name}-table`,
|
className: `${this.name}-table`,
|
||||||
stickyHeader: true,
|
stickyHeader: true,
|
||||||
sortData: false,
|
sortData: false,
|
||||||
columns: [{key:"icon", sortkey:"index", cell:"icon"}, {key:"name", cell:"name"}, {key:"total", cell:"amount", reverse:true}, {key:"global", cell:"amount", reverse:true}, {key:"local", cell:"amount", reverse:true}, {key:"copies", cell:"amount", reverse:true}].map(data => {return {
|
columns: [{key: "icon", sortkey: "index", cell: "icon"}, {key: "name", cell: "name"}, {key: "total", cell: "amount", reverse: true}, {key: "global", cell: "amount", reverse: true}, {key: "local", cell: "amount", reverse: true}, {key: "copies", cell: "amount", reverse: true}].map(data => {return {
|
||||||
key: data.sortkey || data.key,
|
key: data.sortkey || data.key,
|
||||||
sort: true,
|
sort: true,
|
||||||
reverse: data.reverse,
|
reverse: data.reverse,
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
# Emoji Statistics - [![Downlad][download-badge]][download-link] [![Paypal][paypal-badge]][paypal-link] [![Patreon][patreon-badge]][patreon-link]
|
# Emoji Statistics - [![Downlad][download-badge]][download-link] [![Paypal][paypal-badge]][paypal-link] [![Patreon][patreon-badge]][patreon-link]
|
||||||
|
|
||||||
[download-badge]: https://img.shields.io/badge/Download-Plugin-brightgreen.svg?logo=data:image/png;base64,iVBORw0KGgoA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lvhB5efB1/lv5dxc+NH0y/fzq64Lv4T8Ffp360/rP8f9/AA0ADzT6lvFdAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAF1SURBVHja7JihTgNBEIb/K1WkBtEEAsESBKEvgEKRAhLHOxAMfQ9cHwEMBoFA1/ACBEGgzbkmUAwI+BENubTs9WZmLz1CZtZd9v7/u9vMZGdAGFabA05Hn3sWrYQwRB9rwafreikbQN5LiV6qhorDARzAARzAARzAARzAARzAARygGOAQ6a+GLr9jmlwpDuJbsxQrER+YYrXaI2D8EZyAEfangj2Fq0NrnBWry8YI5yb7rkRbBrDAK7X9NevlAYCL7Kns79iQKcunOU0+iO0fuSzV1QyUNjkU2b9wS66qm2nt8L3Q/oO7Gk3tWO2InzPtv3isU9RP9jqxmR8LMKsqdPVqFoC8qiDM/HiAcFUQZ34IYDr0VUGW+QEfK8BkVZBmfqkAWVWQZ37JAOA+n/nEtnh/wGd8JWP81Nt0P0r8Wu4ADvAHAOq2fsaP4N8BvFXi/ZoB3FYCcJMNKDbQw9Kc7YdoYfDzB+6xjUuM5mY+wsXYHvgeABIzsPkSOM/lAAAAAElFTkSuQmCC&style=flat
|
[download-badge]: https: //img.shields.io/badge/Download-Plugin-brightgreen.svg?logo=data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAACXBIWXMAAA7EAAAOxAGVKw4bAAADGGlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjaY2BgnuDo4uTKJMDAUFBUUuQe5BgZERmlwH6egY2BmYGBgYGBITG5uMAxIMCHgYGBIS8/L5UBFTAyMHy7xsDIwMDAcFnX0cXJlYE0wJpcUFTCwMBwgIGBwSgltTiZgYHhCwMDQ3p5SUEJAwNjDAMDg0hSdkEJAwNjAQMDg0h2SJAzAwNjCwMDE09JakUJAwMDg3N+QWVRZnpGiYKhpaWlgmNKflKqQnBlcUlqbrGCZ15yflFBflFiSWo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rDAK7X9NevlAYCL7Kns79iQKcunOU0+iO0fuSzV1QyUNjkU2b9wS66qm2nt8L3Q/oO7Gk3tWO2InzPtv3isU9RP9jqxmR8LMKsqdPVqFoC8qiDM/HiAcFUQZ34IYDr0VUGW+QEfK8BkVZBmfqkAWVWQZ37JAOA+n/nEtnh/wGd8JWP81Nt0P0r8Wu4ADvAHAOq2fsaP4N8BvFXi/ZoB3FYCcJMNKDbQw9Kc7YdoYfDzB+6xjUuM5mY+wsXYHvgeABIzsPkSOM/lAAAAAElFTkSuQmCC&style=flat
|
||||||
[download-link]: https://betterdiscord.net/ghdl?url=https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/EmojiStatistics/EmojiStatistics.plugin.js
|
[download-link]: https: //betterdiscord.net/ghdl?url=https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/EmojiStatistics/EmojiStatistics.plugin.js
|
||||||
|
|
||||||
[paypal-badge]: https://img.shields.io/badge/Paypal-Donate!-%23003087.svg?logo=paypal&style=flat
|
[paypal-badge]: https: //img.shields.io/badge/Paypal-Donate!-%23003087.svg?logo=paypal&style=flat
|
||||||
[paypal-link]: https://paypal.me/MircoWittrien
|
[paypal-link]: https: //paypal.me/MircoWittrien
|
||||||
|
|
||||||
[patreon-badge]: https://img.shields.io/badge/Patreon-Support!-%23F96854.svg?logo=patreon&style=flat
|
[patreon-badge]: https: //img.shields.io/badge/Patreon-Support!-%23F96854.svg?logo=patreon&style=flat
|
||||||
[patreon-link]: https://patreon.com/MircoWittrien
|
[patreon-link]: https: //patreon.com/MircoWittrien
|
||||||
|
|
||||||
Add some helpful options to show you more information about emojis and emojiservers
|
Add some helpful options to show you more information about emojis and emojiservers
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
* @name ForceImagePreviews
|
* @name ForceImagePreviews
|
||||||
* @authorId 278543574059057154
|
* @authorId 278543574059057154
|
||||||
* @invite Jx3TjNS
|
* @invite Jx3TjNS
|
||||||
* @donate https://www.paypal.me/MircoWittrien
|
* @donate https: //www.paypal.me/MircoWittrien
|
||||||
* @patreon https://www.patreon.com/MircoWittrien
|
* @patreon https: //www.patreon.com/MircoWittrien
|
||||||
* @website https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/ForceImagePreviews
|
* @website https: //github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/ForceImagePreviews
|
||||||
* @source https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/ForceImagePreviews/ForceImagePreviews.plugin.js
|
* @source https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/ForceImagePreviews/ForceImagePreviews.plugin.js
|
||||||
* @updateUrl https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/ForceImagePreviews/ForceImagePreviews.plugin.js
|
* @updateUrl https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/ForceImagePreviews/ForceImagePreviews.plugin.js
|
||||||
*/
|
*/
|
||||||
|
|
||||||
module.exports = (_ => {
|
module.exports = (_ => {
|
||||||
|
@ -26,7 +26,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
@ -35,7 +35,7 @@ module.exports = (_ => {
|
||||||
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
|
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
|
||||||
onConfirm: _ => {
|
onConfirm: _ => {
|
||||||
delete window.BDFDB_Global.downloadModal;
|
delete window.BDFDB_Global.downloadModal;
|
||||||
require("request").get("https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
|
require("request").get("https: //mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
|
||||||
if (!e && b && b.indexOf(`* @name BDFDB`) > -1) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => {});
|
if (!e && b && b.indexOf(`* @name BDFDB`) > -1) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => {});
|
||||||
else BdApi.alert("Error", "Could not download BDFDB library plugin, try again some time later.");
|
else BdApi.alert("Error", "Could not download BDFDB library plugin, try again some time later.");
|
||||||
});
|
});
|
||||||
|
@ -74,7 +74,7 @@ module.exports = (_ => {
|
||||||
processSimpleMessageAccessories (e) {
|
processSimpleMessageAccessories (e) {
|
||||||
if (e.instance.props.message && e.instance.props.message.content) {
|
if (e.instance.props.message && e.instance.props.message.content) {
|
||||||
let message = new BDFDB.DiscordObjects.Message(e.instance.props.message);
|
let message = new BDFDB.DiscordObjects.Message(e.instance.props.message);
|
||||||
for (let link of e.instance.props.message.content.split(/\n|\s|\r|\t|\0/g)) if (link.indexOf("https://") > -1 || link.indexOf("http://") > -1) {
|
for (let link of e.instance.props.message.content.split(/\n|\s|\r|\t|\0/g)) if (link.indexOf("https: //") > -1 || link.indexOf("http: //") > -1) {
|
||||||
link = link.indexOf("<") == 0 && link.indexOf(">") == link.length - 1 ? link.slice(1, -1) : link;
|
link = link.indexOf("<") == 0 && link.indexOf(">") == link.length - 1 ? link.slice(1, -1) : link;
|
||||||
if (!this.isEmbedded(message.embeds, link)) {
|
if (!this.isEmbedded(message.embeds, link)) {
|
||||||
if (!requestedEmbeds.includes(link)) {
|
if (!requestedEmbeds.includes(link)) {
|
||||||
|
@ -109,15 +109,15 @@ module.exports = (_ => {
|
||||||
loadedEmbeds[link] = {
|
loadedEmbeds[link] = {
|
||||||
author: {
|
author: {
|
||||||
name: result.split(new RegExp(BDFDB.StringUtils.regEscape('<div class="yt-user-info"><a href="'), "i"))[1].split('>')[1].split('<')[0],
|
name: result.split(new RegExp(BDFDB.StringUtils.regEscape('<div class="yt-user-info"><a href="'), "i"))[1].split('>')[1].split('<')[0],
|
||||||
url: `https://www.youtube.com${result.split(new RegExp(BDFDB.StringUtils.regEscape('<div class="yt-user-info"><a href="'), "i"))[1].split('"')[0]}`
|
url: `https: //www.youtube.com${result.split(new RegExp(BDFDB.StringUtils.regEscape('<div class="yt-user-info"><a href="'), "i"))[1].split('"')[0]}`
|
||||||
},
|
},
|
||||||
color: "#ff0000",
|
color: "#ff0000",
|
||||||
provider: {
|
provider: {
|
||||||
name: "YouTube",
|
name: "YouTube",
|
||||||
url: "https://www.youtube.com/"
|
url: "https: //www.youtube.com/"
|
||||||
},
|
},
|
||||||
rawDescription: result.split(new RegExp(BDFDB.StringUtils.regEscape('<meta property="og:description" content="'), "i"))[1].split('"')[0],
|
rawDescription: result.split(new RegExp(BDFDB.StringUtils.regEscape('<meta property="og: description" content="'), "i"))[1].split('"')[0],
|
||||||
rawTitle: result.split(new RegExp(BDFDB.StringUtils.regEscape('<meta property="og:title" content="'), "i"))[1].split('"')[0],
|
rawTitle: result.split(new RegExp(BDFDB.StringUtils.regEscape('<meta property="og: title" content="'), "i"))[1].split('"')[0],
|
||||||
thumbnail: {
|
thumbnail: {
|
||||||
url: thumbnail,
|
url: thumbnail,
|
||||||
proxyURL: thumbnail,
|
proxyURL: thumbnail,
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
# Force Image Previews - [![Downlad][download-badge]][download-link] [![Paypal][paypal-badge]][paypal-link] [![Patreon][patreon-badge]][patreon-link]
|
# Force Image Previews - [![Downlad][download-badge]][download-link] [![Paypal][paypal-badge]][paypal-link] [![Patreon][patreon-badge]][patreon-link]
|
||||||
|
|
||||||
[download-badge]: https://img.shields.io/badge/Download-Plugin-brightgreen.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAACXBIWXMAAA7EAAAOxAGVKw4bAAADGGlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjaY2BgnuDo4uTKJMDAUFBUUuQe5BgZERmlwH6egY2BmYGBgYGBITG5uMAxIMCHgYGBIS8/L5UBFTAyMHy7xsDIwMDAcFnX0cXJlYE0wJpcUFTCwMBwgIGBwSgltTiZgYHhCwMDQ3p5SUEJAwNjDAMDg0hSdkEJAwNjAQMDg0h2SJAzAwNjCwMDE09JakUJAwMDg3N+QWVRZnpGiYKhpaWlgmNKflKqQnBlcUlqbrGCZ15yflFBflFiSWoKAwMD1A4GBgYGXpf8EgX3xMw8BSMDVQYqg4jIKAUICxE+CDEESC4tKoMHJQODAIMCgwGDA0MAQyJDPcMChqMMbxjFGV0YSxlXMN5jEmMKYprAdIFZmDmSeSHzGxZLlg6WW6x6rK2s99gs2aaxfWMPZ9/NocTRxfGFM5HzApcj1xZuTe4FPFI8U3mFeCfxCfNN45fhXyygI7BD0FXwilCq0A/hXhEVkb2i4aJfxCaJG4lfkaiQlJM8JpUvLS19QqZMVl32llyfvIv8H4WtioVKekpvldeqFKiaqP5UO6jepRGqqaT5QeuA9iSdVF0rPUG9V/pHDBYY1hrFGNuayJsym740u2C+02KJ5QSrOutcmzjbQDtXe2sHY0cdJzVnJRcFV3k3BXdlD3VPXS8Tbxsfd99gvwT//ID6wIlBS4N3hVwMfRnOFCEXaRUVEV0RMzN2T9yDBLZE3aSw5IaUNak30zkyLDIzs+ZmX8xlz7PPryjYVPiuWLskq3RV2ZsK/cqSql01jLVedVPrHzbqNdU0n22VaytsP9op3VXUfbpXta+x/+5Em0mzJ/+dGj/t8AyNmf2zvs9JmHt6vvmCpYtEFrcu+bYsc/m9lSGrTq9xWbtvveWGbZtMNm/ZarJt+w6rnft3u+45uy9s/4ODOYd+Hmk/Jn58xUnrU+fOJJ/9dX7SRe1LR68kXv13fc5Nm1t379TfU75/4mHeY7En+59lvhB5efB1/lv5dxc+NH0y/fzq64Lv4T8Ffp360/rP8f9/AA0ADzT6lvFdAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAF1SURBVHja7JihTgNBEIb/K1WkBtEEAsESBKEvgEKRAhLHOxAMfQ9cHwEMBoFA1/ACBEGgzbkmUAwI+BENubTs9WZmLz1CZtZd9v7/u9vMZGdAGFabA05Hn3sWrYQwRB9rwafreikbQN5LiV6qhorDARzAARzAARzAARzAARzAARygGOAQ6a+GLr9jmlwpDuJbsxQrER+YYrXaI2D8EZyAEfangj2Fq0NrnBWry8YI5yb7rkRbBrDAK7X9NevlAYCL7Kns79iQKcunOU0+iO0fuSzV1QyUNjkU2b9wS66qm2nt8L3Q/oO7Gk3tWO2InzPtv3isU9RP9jqxmR8LMKsqdPVqFoC8qiDM/HiAcFUQZ34IYDr0VUGW+QEfK8BkVZBmfqkAWVWQZ37JAOA+n/nEtnh/wGd8JWP81Nt0P0r8Wu4ADvAHAOq2fsaP4N8BvFXi/ZoB3FYCcJMNKDbQw9Kc7YdoYfDzB+6xjUuM5mY+wsXYHvgeABIzsPkSOM/lAAAAAElFTkSuQmCC&style=flat
|
[download-badge]: https: //img.shields.io/badge/Download-Plugin-brightgreen.svg?logo=data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAACXBIWXMAAA7EAAAOxAGVKw4bAAADGGlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjaY2BgnuDo4uTKJMDAUFBUUuQe5BgZERmlwH6egY2BmYGBgYG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BKEvgEKRAhLHOxAMfQ9cHwEMBoFA1/ACBEGgzbkmUAwI+BENubTs9WZmLz1CZtZd9v7/u9vMZGdAGFabA05Hn3sWrYQwRB9rwafreikbQN5LiV6qhorDARzAARzAARzAARzAARzAARygGOAQ6a+GLr9jmlwpDuJbsxQrER+YYrXaI2D8EZyAEfangj2Fq0NrnBWry8YI5yb7rkRbBrDAK7X9NevlAYCL7Kns79iQKcunOU0+iO0fuSzV1QyUNjkU2b9wS66qm2nt8L3Q/oO7Gk3tWO2InzPtv3isU9RP9jqxmR8LMKsqdPVqFoC8qiDM/HiAcFUQZ34IYDr0VUGW+QEfK8BkVZBmfqkAWVWQZ37JAOA+n/nEtnh/wGd8JWP81Nt0P0r8Wu4ADvAHAOq2fsaP4N8BvFXi/ZoB3FYCcJMNKDbQw9Kc7YdoYfDzB+6xjUuM5mY+wsXYHvgeABIzsPkSOM/lAAAAAElFTkSuQmCC&style=flat
|
||||||
[download-link]: https://betterdiscord.net/ghdl?url=https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/ForceImagePreviews/ForceImagePreviews.plugin.js
|
[download-link]: https: //betterdiscord.net/ghdl?url=https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/ForceImagePreviews/ForceImagePreviews.plugin.js
|
||||||
|
|
||||||
[paypal-badge]: https://img.shields.io/badge/Paypal-Donate!-%23003087.svg?logo=paypal&style=flat
|
[paypal-badge]: https: //img.shields.io/badge/Paypal-Donate!-%23003087.svg?logo=paypal&style=flat
|
||||||
[paypal-link]: https://paypal.me/MircoWittrien
|
[paypal-link]: https: //paypal.me/MircoWittrien
|
||||||
|
|
||||||
[patreon-badge]: https://img.shields.io/badge/Patreon-Support!-%23F96854.svg?logo=patreon&style=flat
|
[patreon-badge]: https: //img.shields.io/badge/Patreon-Support!-%23F96854.svg?logo=patreon&style=flat
|
||||||
[patreon-link]: https://patreon.com/MircoWittrien
|
[patreon-link]: https: //patreon.com/MircoWittrien
|
||||||
|
|
||||||
Force embedded Image Previews, if Discord doesn't do it itself
|
Force embedded Image Previews, if Discord doesn't do it itself
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
* @name FriendNotifications
|
* @name FriendNotifications
|
||||||
* @authorId 278543574059057154
|
* @authorId 278543574059057154
|
||||||
* @invite Jx3TjNS
|
* @invite Jx3TjNS
|
||||||
* @donate https://www.paypal.me/MircoWittrien
|
* @donate https: //www.paypal.me/MircoWittrien
|
||||||
* @patreon https://www.patreon.com/MircoWittrien
|
* @patreon https: //www.patreon.com/MircoWittrien
|
||||||
* @website https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/FriendNotifications
|
* @website https: //github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/FriendNotifications
|
||||||
* @source https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/FriendNotifications/FriendNotifications.plugin.js
|
* @source https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/FriendNotifications/FriendNotifications.plugin.js
|
||||||
* @updateUrl https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/FriendNotifications/FriendNotifications.plugin.js
|
* @updateUrl https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/FriendNotifications/FriendNotifications.plugin.js
|
||||||
*/
|
*/
|
||||||
|
|
||||||
module.exports = (_ => {
|
module.exports = (_ => {
|
||||||
|
@ -31,7 +31,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
@ -40,7 +40,7 @@ module.exports = (_ => {
|
||||||
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
|
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
|
||||||
onConfirm: _ => {
|
onConfirm: _ => {
|
||||||
delete window.BDFDB_Global.downloadModal;
|
delete window.BDFDB_Global.downloadModal;
|
||||||
require("request").get("https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
|
require("request").get("https: //mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
|
||||||
if (!e && b && b.indexOf(`* @name BDFDB`) > -1) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => {});
|
if (!e && b && b.indexOf(`* @name BDFDB`) > -1) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => {});
|
||||||
else BdApi.alert("Error", "Could not download BDFDB library plugin, try again some time later.");
|
else BdApi.alert("Error", "Could not download BDFDB library plugin, try again some time later.");
|
||||||
});
|
});
|
||||||
|
@ -85,27 +85,27 @@ module.exports = (_ => {
|
||||||
|
|
||||||
this.defaults = {
|
this.defaults = {
|
||||||
settings: {
|
settings: {
|
||||||
addOnlineCount: {value:true, description:"Add an online friend counter to the server list (click to open logs)"},
|
addOnlineCount: {value: true, description: "Add an online friend counter to the server list (click to open logs)"},
|
||||||
showDiscriminator: {value:false, description:"Add the user discriminator"},
|
showDiscriminator: {value: false, description: "Add the user discriminator"},
|
||||||
disableForNew: {value:false, description:"Disable Notifications for newly added Friends:"},
|
disableForNew: {value: false, description: "Disable Notifications for newly added Friends: "},
|
||||||
muteOnDND: {value:false, description:"Do not notify me when I am DnD"},
|
muteOnDND: {value: false, description: "Do not notify me when I am DnD"},
|
||||||
openOnClick: {value:false, description:"Open the DM when you click a Notification"}
|
openOnClick: {value: false, description: "Open the DM when you click a Notification"}
|
||||||
},
|
},
|
||||||
notificationstrings: {
|
notificationstrings: {
|
||||||
online: {value:"$user changed status to '$status'", libString:"STATUS_ONLINE", init:true},
|
online: {value: "$user changed status to '$status'", libString: "STATUS_ONLINE", init: true},
|
||||||
mobile: {value:"$user changed status to '$status'", libString:"STATUS_ONLINE_MOBILE", init:true},
|
mobile: {value: "$user changed status to '$status'", libString: "STATUS_ONLINE_MOBILE", init: true},
|
||||||
idle: {value:"$user changed status to '$status'", libString:"STATUS_IDLE", init:false},
|
idle: {value: "$user changed status to '$status'", libString: "STATUS_IDLE", init: false},
|
||||||
dnd: {value:"$user changed status to '$status'", libString:"STATUS_DND", init:false},
|
dnd: {value: "$user changed status to '$status'", libString: "STATUS_DND", init: false},
|
||||||
playing: {value:"$user started playing '$game'", statusName:"Playing", init:false},
|
playing: {value: "$user started playing '$game'", statusName: "Playing", init: false},
|
||||||
listening: {value:"$user started listening to '$song'", statusName:"Listening", init:false},
|
listening: {value: "$user started listening to '$song'", statusName: "Listening", init: false},
|
||||||
streaming: {value:"$user started streaming '$game'", libString:"STATUS_STREAMING", init:false},
|
streaming: {value: "$user started streaming '$game'", libString: "STATUS_STREAMING", init: false},
|
||||||
offline: {value:"$user changed status to '$status'", libString:"STATUS_OFFLINE", init:true}
|
offline: {value: "$user changed status to '$status'", libString: "STATUS_OFFLINE", init: true}
|
||||||
},
|
},
|
||||||
notificationsounds: {},
|
notificationsounds: {},
|
||||||
amounts: {
|
amounts: {
|
||||||
toastTime: {value:5, min:1, description:"Amount of seconds a toast notification stays on screen:"},
|
toastTime: {value: 5, min: 1, description: "Amount of seconds a toast notification stays on screen: "},
|
||||||
desktopTime: {value:5, min:1, description:"Amount of seconds a desktop notification stays on screen:"},
|
desktopTime: {value: 5, min: 1, description: "Amount of seconds a desktop notification stays on screen: "},
|
||||||
checkInterval: {value:10, min:5, description:"Check Users every X seconds:"}
|
checkInterval: {value: 10, min: 5, description: "Check Users every X seconds: "}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -136,8 +136,8 @@ module.exports = (_ => {
|
||||||
`;
|
`;
|
||||||
|
|
||||||
for (let type in this.defaults.notificationstrings) {
|
for (let type in this.defaults.notificationstrings) {
|
||||||
this.defaults.notificationsounds["toast" + type] = {value:{url:null,song:null,mute:false}};
|
this.defaults.notificationsounds["toast" + type] = {value: {url: null,song: null,mute: false}};
|
||||||
this.defaults.notificationsounds["desktop" + type] = {value:{url:null,song:null,mute:false}};
|
this.defaults.notificationsounds["desktop" + type] = {value: {url: null,song: null,mute: false}};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -176,7 +176,7 @@ module.exports = (_ => {
|
||||||
BDFDB.PluginUtils.refreshSettingsPanel(this, settingsPanel, collapseStates);
|
BDFDB.PluginUtils.refreshSettingsPanel(this, settingsPanel, collapseStates);
|
||||||
};
|
};
|
||||||
let successSavedAudio = (type, parsedUrl, parsedData) => {
|
let successSavedAudio = (type, parsedUrl, parsedData) => {
|
||||||
if (parsedUrl && parsedData) BDFDB.NotificationUtils.toast(`Sound was saved successfully.`, {type:"success"});
|
if (parsedUrl && parsedData) BDFDB.NotificationUtils.toast(`Sound was saved successfully.`, {type: "success"});
|
||||||
notificationSounds[type].url = parsedUrl;
|
notificationSounds[type].url = parsedUrl;
|
||||||
notificationSounds[type].song = parsedData;
|
notificationSounds[type].song = parsedData;
|
||||||
BDFDB.DataUtils.save(notificationSounds[type], this, "notificationsounds", type);
|
BDFDB.DataUtils.save(notificationSounds[type], this, "notificationsounds", type);
|
||||||
|
@ -193,7 +193,7 @@ module.exports = (_ => {
|
||||||
style: {backgroundColor: BDFDB.DiscordConstants.Colors.BRAND},
|
style: {backgroundColor: BDFDB.DiscordConstants.Colors.BRAND},
|
||||||
children: "Toast"
|
children: "Toast"
|
||||||
}),
|
}),
|
||||||
"Notifications for that User:"
|
"Notifications for that User: "
|
||||||
]
|
]
|
||||||
}));
|
}));
|
||||||
if ("Notification" in window) items.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Flex, {
|
if ("Notification" in window) items.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Flex, {
|
||||||
|
@ -205,7 +205,7 @@ module.exports = (_ => {
|
||||||
style: {backgroundColor: BDFDB.DiscordConstants.Colors.STATUS_GREEN},
|
style: {backgroundColor: BDFDB.DiscordConstants.Colors.STATUS_GREEN},
|
||||||
children: "Desktop"
|
children: "Desktop"
|
||||||
}),
|
}),
|
||||||
"Notifications for that User:"
|
"Notifications for that User: "
|
||||||
]
|
]
|
||||||
}));
|
}));
|
||||||
items.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsList, {
|
items.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsList, {
|
||||||
|
@ -288,12 +288,12 @@ module.exports = (_ => {
|
||||||
nonFriendsData[id] = Object.assign({}, friendsData[id]);
|
nonFriendsData[id] = Object.assign({}, friendsData[id]);
|
||||||
delete friendsData[id];
|
delete friendsData[id];
|
||||||
}
|
}
|
||||||
else if (id != BDFDB.UserUtils.me.id) friends.push(Object.assign({}, user, friendsData[id], {key:id, className: friendsData[id].disabled ? "" : (friendsData[id].desktop ? BDFDB.disCN.cardsuccessoutline : BDFDB.disCN.cardbrandoutline)}));
|
else if (id != BDFDB.UserUtils.me.id) friends.push(Object.assign({}, user, friendsData[id], {key: id, className: friendsData[id].disabled ? "" : (friendsData[id].desktop ? BDFDB.disCN.cardsuccessoutline : BDFDB.disCN.cardbrandoutline)}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (let id in nonFriendsData) {
|
for (let id in nonFriendsData) {
|
||||||
let user = BDFDB.LibraryModules.UserStore.getUser(id);
|
let user = BDFDB.LibraryModules.UserStore.getUser(id);
|
||||||
if (user && id != BDFDB.UserUtils.me.id) nonFriends.push(Object.assign({}, user, nonFriendsData[id], {key:id, className: nonFriendsData[id].disabled ? "" : (nonFriendsData[id].desktop ? BDFDB.disCN.cardsuccessoutline : BDFDB.disCN.cardbrandoutline)}));
|
if (user && id != BDFDB.UserUtils.me.id) nonFriends.push(Object.assign({}, user, nonFriendsData[id], {key: id, className: nonFriendsData[id].disabled ? "" : (nonFriendsData[id].desktop ? BDFDB.disCN.cardsuccessoutline : BDFDB.disCN.cardbrandoutline)}));
|
||||||
}
|
}
|
||||||
|
|
||||||
BDFDB.DataUtils.save(friendsData, this, "friends");
|
BDFDB.DataUtils.save(friendsData, this, "friends");
|
||||||
|
@ -343,9 +343,9 @@ module.exports = (_ => {
|
||||||
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Button, {
|
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Button, {
|
||||||
onClick: _ => {
|
onClick: _ => {
|
||||||
let userId = settingsPanel.querySelector(`.input-newstranger ` + BDFDB.dotCN.input).value.trim();
|
let userId = settingsPanel.querySelector(`.input-newstranger ` + BDFDB.dotCN.input).value.trim();
|
||||||
if (userId == BDFDB.UserUtils.me.id) BDFDB.NotificationUtils.toast("Are you seriously trying to stalk yourself?", {type:"error"});
|
if (userId == BDFDB.UserUtils.me.id) BDFDB.NotificationUtils.toast("Are you seriously trying to stalk yourself?", {type: "error"});
|
||||||
else if (friendIds.includes(userId)) BDFDB.NotificationUtils.toast("User is already a friend of yours, please use the 'Friend-List' area to configure them", {type:"error"});
|
else if (friendIds.includes(userId)) BDFDB.NotificationUtils.toast("User is already a friend of yours, please use the 'Friend-List' area to configure them", {type: "error"});
|
||||||
else if (Object.keys(nonFriends).includes(userId)) BDFDB.NotificationUtils.toast("User is already being observed as a 'Stranger'", {type:"error"});
|
else if (Object.keys(nonFriends).includes(userId)) BDFDB.NotificationUtils.toast("User is already being observed as a 'Stranger'", {type: "error"});
|
||||||
else {
|
else {
|
||||||
let user = /.+#[0-9]{4}/.test(userId) ? BDFDB.LibraryModules.UserStore.findByTag(userId.split("#").slice(0, -1).join("#"), userId.split("#").pop()) : BDFDB.LibraryModules.UserStore.getUser(userId);
|
let user = /.+#[0-9]{4}/.test(userId) ? BDFDB.LibraryModules.UserStore.findByTag(userId.split("#").slice(0, -1).join("#"), userId.split("#").pop()) : BDFDB.LibraryModules.UserStore.getUser(userId);
|
||||||
if (user) {
|
if (user) {
|
||||||
|
@ -353,7 +353,7 @@ module.exports = (_ => {
|
||||||
BDFDB.PluginUtils.refreshSettingsPanel(this, settingsPanel, collapseStates);
|
BDFDB.PluginUtils.refreshSettingsPanel(this, settingsPanel, collapseStates);
|
||||||
this.SettingsUpdated = true;
|
this.SettingsUpdated = true;
|
||||||
}
|
}
|
||||||
else BDFDB.NotificationUtils.toast("Please enter a valid UserID of a user that has been loaded in your client", {type:"error"});
|
else BDFDB.NotificationUtils.toast("Please enter a valid UserID of a user that has been loaded in your client", {type: "error"});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
children: BDFDB.LanguageUtils.LanguageStrings.ADD
|
children: BDFDB.LanguageUtils.LanguageStrings.ADD
|
||||||
|
@ -399,7 +399,7 @@ module.exports = (_ => {
|
||||||
plugin: this,
|
plugin: this,
|
||||||
keys: ["notificationstrings", key],
|
keys: ["notificationstrings", key],
|
||||||
placeholder: this.defaults.notificationstrings[key].value,
|
placeholder: this.defaults.notificationstrings[key].value,
|
||||||
label: `${BDFDB.LibraryModules.StringUtils.upperCaseFirstChar(key)} Message:`,
|
label: `${BDFDB.LibraryModules.StringUtils.upperCaseFirstChar(key)} Message: `,
|
||||||
basis: "70%",
|
basis: "70%",
|
||||||
value: notificationStrings[key]
|
value: notificationStrings[key]
|
||||||
})))
|
})))
|
||||||
|
@ -417,13 +417,13 @@ module.exports = (_ => {
|
||||||
direction: BDFDB.LibraryComponents.Flex.Direction.HORIZONTAL,
|
direction: BDFDB.LibraryComponents.Flex.Direction.HORIZONTAL,
|
||||||
children: [
|
children: [
|
||||||
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsLabel, {
|
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsLabel, {
|
||||||
label: `${key.split(/(desktop)|(toast)/).filter(n => n).map(n => BDFDB.LibraryModules.StringUtils.upperCaseFirstChar(n)).join("-")} Notification Sound:`,
|
label: `${key.split(/(desktop)|(toast)/).filter(n => n).map(n => BDFDB.LibraryModules.StringUtils.upperCaseFirstChar(n)).join("-")} Notification Sound: `,
|
||||||
}),
|
}),
|
||||||
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, {
|
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, {
|
||||||
type: "Switch",
|
type: "Switch",
|
||||||
mini: true,
|
mini: true,
|
||||||
grow: 0,
|
grow: 0,
|
||||||
label: "Mute:",
|
label: "Mute: ",
|
||||||
value: notificationSounds[key].mute,
|
value: notificationSounds[key].mute,
|
||||||
onChange: value => {
|
onChange: value => {
|
||||||
notificationSounds[key].mute = value;
|
notificationSounds[key].mute = value;
|
||||||
|
@ -450,7 +450,7 @@ module.exports = (_ => {
|
||||||
onClick: _ => {
|
onClick: _ => {
|
||||||
let source = settingsPanel.querySelector(`.input-${key}src ` + BDFDB.dotCN.input).value.trim();
|
let source = settingsPanel.querySelector(`.input-${key}src ` + BDFDB.dotCN.input).value.trim();
|
||||||
if (!source.length) {
|
if (!source.length) {
|
||||||
BDFDB.NotificationUtils.toast(`Sound file was removed.`, {type:"warn"});
|
BDFDB.NotificationUtils.toast(`Sound file was removed.`, {type: "warn"});
|
||||||
successSavedAudio(key, source, source);
|
successSavedAudio(key, source, source);
|
||||||
}
|
}
|
||||||
else if (source.indexOf("http") == 0) BDFDB.LibraryRequires.request(source, (error, response, result) => {
|
else if (source.indexOf("http") == 0) BDFDB.LibraryRequires.request(source, (error, response, result) => {
|
||||||
|
@ -461,11 +461,11 @@ module.exports = (_ => {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BDFDB.NotificationUtils.toast("Use a valid direct link to a video or audio source, they usually end on something like .mp3, .mp4 or .wav", {type:"danger"});
|
BDFDB.NotificationUtils.toast("Use a valid direct link to a video or audio source, they usually end on something like .mp3, .mp4 or .wav", {type: "danger"});
|
||||||
});
|
});
|
||||||
else BDFDB.LibraryRequires.fs.readFile(source, (error, response) => {
|
else BDFDB.LibraryRequires.fs.readFile(source, (error, response) => {
|
||||||
if (error) BDFDB.NotificationUtils.toast("Could not fetch file, please make sure the file exists", {type:"danger"});
|
if (error) BDFDB.NotificationUtils.toast("Could not fetch file, please make sure the file exists", {type: "danger"});
|
||||||
else successSavedAudio(key, source, `data:audio/mpeg;base64,${response.toString("base64")}`);
|
else successSavedAudio(key, source, `data: audio/mpeg;base64,${response.toString("base64")}`);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
children: BDFDB.LanguageUtils.LanguageStrings.SAVE
|
children: BDFDB.LanguageUtils.LanguageStrings.SAVE
|
||||||
|
@ -530,12 +530,12 @@ module.exports = (_ => {
|
||||||
|
|
||||||
getStatusWithMobileAndActivity (id, config) {
|
getStatusWithMobileAndActivity (id, config) {
|
||||||
let statusName = BDFDB.UserUtils.getStatus(id);
|
let statusName = BDFDB.UserUtils.getStatus(id);
|
||||||
let status = {statusName, isActivity:false};
|
let status = {statusName, isActivity: false};
|
||||||
let activity = BDFDB.UserUtils.getActivity(id);
|
let activity = BDFDB.UserUtils.getActivity(id);
|
||||||
if (activity && BDFDB.DiscordConstants.ActivityTypes[activity.type]) {
|
if (activity && BDFDB.DiscordConstants.ActivityTypes[activity.type]) {
|
||||||
let activityName = BDFDB.DiscordConstants.ActivityTypes[activity.type].toLowerCase();
|
let activityName = BDFDB.DiscordConstants.ActivityTypes[activity.type].toLowerCase();
|
||||||
if (this.defaults.notificationstrings[activityName] && config[activityName]) {
|
if (this.defaults.notificationstrings[activityName] && config[activityName]) {
|
||||||
status = Object.assign({statusName:activityName, isActivity:true}, activity);
|
status = Object.assign({statusName: activityName, isActivity: true}, activity);
|
||||||
if (activityName == "listening" || activityName == "streaming") delete status.name;
|
if (activityName == "listening" || activityName == "streaming") delete status.name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -599,7 +599,7 @@ module.exports = (_ => {
|
||||||
};
|
};
|
||||||
if (!observedUsers[id].desktop) {
|
if (!observedUsers[id].desktop) {
|
||||||
if (!document.querySelector(`.friendnotifications-${id}-toast`)) {
|
if (!document.querySelector(`.friendnotifications-${id}-toast`)) {
|
||||||
let toast = BDFDB.NotificationUtils.toast(`<div class="toast-inner"><div class="toast-avatar" style="background-image:url(${avatar});"></div><div>${toastString}</div></div>`, {html:true, timeout:toastTime, color:BDFDB.UserUtils.getStatusColor(status.statusName), icon:false, selector:`friendnotifications-${status.statusName}-toast friendnotifications-${id}-toast`});
|
let toast = BDFDB.NotificationUtils.toast(`<div class="toast-inner"><div class="toast-avatar" style="background-image: url(${avatar});"></div><div>${toastString}</div></div>`, {html: true, timeout: toastTime, color: BDFDB.UserUtils.getStatusColor(status.statusName), icon: false, selector: `friendnotifications-${status.statusName}-toast friendnotifications-${id}-toast`});
|
||||||
toast.addEventListener("click", openChannel);
|
toast.addEventListener("click", openChannel);
|
||||||
let notificationsound = notificationSounds["toast" + status.statusName] || {};
|
let notificationsound = notificationSounds["toast" + status.statusName] || {};
|
||||||
if (!notificationsound.mute && notificationsound.song) {
|
if (!notificationsound.mute && notificationsound.song) {
|
||||||
|
@ -613,7 +613,7 @@ module.exports = (_ => {
|
||||||
let desktopString = string.replace(/\$user/g, `${name}${settings.showDiscriminator ? ("#" + user.discriminator) : ""}`).replace(/\$status/g, libString);
|
let desktopString = string.replace(/\$user/g, `${name}${settings.showDiscriminator ? ("#" + user.discriminator) : ""}`).replace(/\$status/g, libString);
|
||||||
if (status.isActivity) desktopString = desktopString.replace(/\$song|\$game/g, status.name || status.details).replace(/\$artist/g, status.state);
|
if (status.isActivity) desktopString = desktopString.replace(/\$song|\$game/g, status.name || status.details).replace(/\$artist/g, status.state);
|
||||||
let notificationsound = notificationSounds["desktop" + status.statusName] || {};
|
let notificationsound = notificationSounds["desktop" + status.statusName] || {};
|
||||||
BDFDB.NotificationUtils.desktop(desktopString, {icon:avatar, timeout:desktopTime, click:openChannel, silent:notificationsound.mute, sound:notificationsound.song});
|
BDFDB.NotificationUtils.desktop(desktopString, {icon: avatar, timeout: desktopTime, click: openChannel, silent: notificationsound.mute, sound: notificationsound.song});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
# Friend Notifications - [![Downlad][download-badge]][download-link] [![Paypal][paypal-badge]][paypal-link] [![Patreon][patreon-badge]][patreon-link]
|
# Friend Notifications - [![Downlad][download-badge]][download-link] [![Paypal][paypal-badge]][paypal-link] [![Patreon][patreon-badge]][patreon-link]
|
||||||
|
|
||||||
[download-badge]: https://img.shields.io/badge/Download-Plugin-brightgreen.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAACXBIWXMAAA7EAAAOxAGVKw4bAAADGGlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjaY2BgnuDo4uTKJMDAUFBUUuQe5BgZERmlwH6egY2BmYGBgYGBITG5uMAxIMCHgYGBIS8/L5UBFTAyMHy7xsDIwMDAcFnX0cXJlYE0wJpcUFTCwMBwgIGBwSgltTiZgYHhCwMDQ3p5SUEJAwNjDAMDg0hSdkEJAwNjAQMDg0h2SJAzAwNjCwMDE09JakUJAwMDg3N+QWVRZnpGiYKhpaWlgmNKflKqQnBlcUlqbrGCZ15yflFBflFiSWoKAwMD1A4GBgYGXpf8EgX3xMw8BSMDVQYqg4jIKAUICxE+CDEESC4tKoMHJQODAIMCgwGDA0MAQyJDPcMChqMMbxjFGV0YSxlXMN5jEmMKYprAd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ak30zkyLDIzs+ZmX8xlz7PPryjYVPiuWLskq3RV2ZsK/cqSql01jLVedVPrHzbqNdU0n22VaytsP9op3VXUfbpXta+x/+5Em0mzJ/+dGj/t8AyNmf2zvs9JmHt6vvmCpYtEFrcu+bYsc/m9lSGrTq9xWbtvveWGbZtMNm/ZarJt+w6rnft3u+45uy9s/4ODOYd+Hmk/Jn58xUnrU+fOJJ/9dX7SRe1LR68kXv13fc5Nm1t379TfU75/4mHeY7En+59lvhB5efB1/lv5dxc+NH0y/fzq64Lv4T8Ffp360/rP8f9/AA0ADzT6lvFdAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAF1SURBVHja7JihTgNBEIb/K1WkBtEEAsESBKEvgEKRAhLHOxAMfQ9cHwEMBoFA1/ACBEGgzbkmUAwI+BENubTs9WZmLz1CZtZd9v7/u9vMZGdAGFabA05Hn3sWrYQwRB9rwafreikbQN5LiV6qhorDARzAARzAARzAARzAARzAARygGOAQ6a+GLr9jmlwpDuJbsxQrER+YYrXaI2D8EZyAEfangj2Fq0NrnBWry8YI5yb7rkRbBrDAK7X9NevlAYCL7Kns79iQKcunOU0+iO0fuSzV1QyUNjkU2b9wS66qm2nt8L3Q/oO7Gk3tWO2InzPtv3isU9RP9jqxmR8LMKsqdPVqFoC8qiDM/HiAcFUQZ34IYDr0VUGW+QEfK8BkVZBmfqkAWVWQZ37JAOA+n/nEtnh/wGd8JWP81Nt0P0r8Wu4ADvAHAOq2fsaP4N8BvFXi/ZoB3FYCcJMNKDbQw9Kc7YdoYfDzB+6xjUuM5mY+wsXYHvgeABIzsPkSOM/lAAAAAElFTkSuQmCC&style=flat
|
||||||
[download-link]: https://betterdiscord.net/ghdl?url=https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/FriendNotifications/FriendNotifications.plugin.js
|
[download-link]: https: //betterdiscord.net/ghdl?url=https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/FriendNotifications/FriendNotifications.plugin.js
|
||||||
|
|
||||||
[paypal-badge]: https://img.shields.io/badge/Paypal-Donate!-%23003087.svg?logo=paypal&style=flat
|
[paypal-badge]: https: //img.shields.io/badge/Paypal-Donate!-%23003087.svg?logo=paypal&style=flat
|
||||||
[paypal-link]: https://paypal.me/MircoWittrien
|
[paypal-link]: https: //paypal.me/MircoWittrien
|
||||||
|
|
||||||
[patreon-badge]: https://img.shields.io/badge/Patreon-Support!-%23F96854.svg?logo=patreon&style=flat
|
[patreon-badge]: https: //img.shields.io/badge/Patreon-Support!-%23F96854.svg?logo=patreon&style=flat
|
||||||
[patreon-link]: https://patreon.com/MircoWittrien
|
[patreon-link]: https: //patreon.com/MircoWittrien
|
||||||
|
|
||||||
Get a notification when a Friend or a User you choose to observe changes their online status, can be configured individually in the settings
|
Get a notification when a Friend or a User you choose to observe changes their online status, can be configured individually in the settings
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
* @name GoogleSearchReplace
|
* @name GoogleSearchReplace
|
||||||
* @authorId 278543574059057154
|
* @authorId 278543574059057154
|
||||||
* @invite Jx3TjNS
|
* @invite Jx3TjNS
|
||||||
* @donate https://www.paypal.me/MircoWittrien
|
* @donate https: //www.paypal.me/MircoWittrien
|
||||||
* @patreon https://www.patreon.com/MircoWittrien
|
* @patreon https: //www.patreon.com/MircoWittrien
|
||||||
* @website https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/GoogleSearchReplace
|
* @website https: //github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/GoogleSearchReplace
|
||||||
* @source https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/GoogleSearchReplace/GoogleSearchReplace.plugin.js
|
* @source https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/GoogleSearchReplace/GoogleSearchReplace.plugin.js
|
||||||
* @updateUrl https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/GoogleSearchReplace/GoogleSearchReplace.plugin.js
|
* @updateUrl https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/GoogleSearchReplace/GoogleSearchReplace.plugin.js
|
||||||
*/
|
*/
|
||||||
|
|
||||||
module.exports = (_ => {
|
module.exports = (_ => {
|
||||||
|
@ -25,7 +25,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
@ -34,7 +34,7 @@ module.exports = (_ => {
|
||||||
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
|
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
|
||||||
onConfirm: _ => {
|
onConfirm: _ => {
|
||||||
delete window.BDFDB_Global.downloadModal;
|
delete window.BDFDB_Global.downloadModal;
|
||||||
require("request").get("https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
|
require("request").get("https: //mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
|
||||||
if (!e && b && b.indexOf(`* @name BDFDB`) > -1) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => {});
|
if (!e && b && b.indexOf(`* @name BDFDB`) > -1) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => {});
|
||||||
else BdApi.alert("Error", "Could not download BDFDB library plugin, try again some time later.");
|
else BdApi.alert("Error", "Could not download BDFDB library plugin, try again some time later.");
|
||||||
});
|
});
|
||||||
|
@ -53,24 +53,24 @@ module.exports = (_ => {
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.defaults = {
|
this.defaults = {
|
||||||
settings: {
|
settings: {
|
||||||
useChromium: {value:false, description:"Use an inbuilt browser window instead of opening your default browser"},
|
useChromium: {value: false, description: "Use an inbuilt browser window instead of opening your default browser"},
|
||||||
},
|
},
|
||||||
engines: {
|
engines: {
|
||||||
_all: {value:true, name:BDFDB.LanguageUtils.LanguageStrings.FORM_LABEL_ALL, url:null},
|
_all: {value: true, name: BDFDB.LanguageUtils.LanguageStrings.FORM_LABEL_ALL, url: null},
|
||||||
Ask: {value:true, name:"Ask", url:"https://ask.com/web?q=" + textUrlReplaceString},
|
Ask: {value: true, name: "Ask", url: "https: //ask.com/web?q=" + textUrlReplaceString},
|
||||||
Bing: {value:true, name:"Bing", url:"https://www.bing.com/search?q=" + textUrlReplaceString},
|
Bing: {value: true, name: "Bing", url: "https: //www.bing.com/search?q=" + textUrlReplaceString},
|
||||||
DogPile: {value:true, name:"DogPile", url:"http://www.dogpile.com/search/web?q=" + textUrlReplaceString},
|
DogPile: {value: true, name: "DogPile", url: "http: //www.dogpile.com/search/web?q=" + textUrlReplaceString},
|
||||||
DuckDuckGo: {value:true, name:"DuckDuckGo", url:"https://duckduckgo.com/?q=" + textUrlReplaceString},
|
DuckDuckGo: {value: true, name: "DuckDuckGo", url: "https: //duckduckgo.com/?q=" + textUrlReplaceString},
|
||||||
Google: {value:true, name:"Google", url:"https://www.google.com/search?q=" + textUrlReplaceString},
|
Google: {value: true, name: "Google", url: "https: //www.google.com/search?q=" + textUrlReplaceString},
|
||||||
GoogleScholar: {value:true, name:"Google Scholar", url:"https://scholar.google.com/scholar?q=" + textUrlReplaceString},
|
GoogleScholar: {value: true, name: "Google Scholar", url: "https: //scholar.google.com/scholar?q=" + textUrlReplaceString},
|
||||||
Quora: {value:true, name:"Quora", url:"https://www.quora.com/search?q=" + textUrlReplaceString},
|
Quora: {value: true, name: "Quora", url: "https: //www.quora.com/search?q=" + textUrlReplaceString},
|
||||||
Qwant: {value:true, name:"Qwant", url:"https://www.qwant.com/?t=all&q=" + textUrlReplaceString},
|
Qwant: {value: true, name: "Qwant", url: "https: //www.qwant.com/?t=all&q=" + textUrlReplaceString},
|
||||||
UrbanDictionary: {value:true, name:"Urban Dictionary", url:"https://www.urbandictionary.com/define.php?term=" + textUrlReplaceString},
|
UrbanDictionary: {value: true, name: "Urban Dictionary", url: "https: //www.urbandictionary.com/define.php?term=" + textUrlReplaceString},
|
||||||
Searx: {value:true, name:"Searx", url:"https://searx.info/?q=" + textUrlReplaceString},
|
Searx: {value: true, name: "Searx", url: "https: //searx.info/?q=" + textUrlReplaceString},
|
||||||
WolframAlpha: {value:true, name:"Wolfram Alpha", url:"https://www.wolframalpha.com/input/?i=" + textUrlReplaceString},
|
WolframAlpha: {value: true, name: "Wolfram Alpha", url: "https: //www.wolframalpha.com/input/?i=" + textUrlReplaceString},
|
||||||
Yandex: {value:true, name:"Yandex", url:"https://yandex.com/search/?text=" + textUrlReplaceString},
|
Yandex: {value: true, name: "Yandex", url: "https: //yandex.com/search/?text=" + textUrlReplaceString},
|
||||||
Yahoo: {value:true, name:"Yahoo", url:"https://search.yahoo.com/search?p=" + textUrlReplaceString},
|
Yahoo: {value: true, name: "Yahoo", url: "https: //search.yahoo.com/search?p=" + textUrlReplaceString},
|
||||||
YouTube: {value:true, name:"YouTube", url:"https://www.youtube.com/results?q=" + textUrlReplaceString}
|
YouTube: {value: true, name: "YouTube", url: "https: //www.youtube.com/results?q=" + textUrlReplaceString}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -92,7 +92,7 @@ module.exports = (_ => {
|
||||||
value: settings[key]
|
value: settings[key]
|
||||||
}));
|
}));
|
||||||
settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsPanelInner, {
|
settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsPanelInner, {
|
||||||
title: "Search Engines:",
|
title: "Search Engines: ",
|
||||||
first: settingsItems.length == 0,
|
first: settingsItems.length == 0,
|
||||||
last: true,
|
last: true,
|
||||||
children: Object.keys(engines).filter(n => n && n != "_all").map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
|
children: Object.keys(engines).filter(n => n && n != "_all").map(key => BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
# Google Search Replace - [![Downlad][download-badge]][download-link] [![Paypal][paypal-badge]][paypal-link] [![Patreon][patreon-badge]][patreon-link]
|
# Google Search Replace - [![Downlad][download-badge]][download-link] [![Paypal][paypal-badge]][paypal-link] [![Patreon][patreon-badge]][patreon-link]
|
||||||
|
|
||||||
[download-badge]: https://img.shields.io/badge/Download-Plugin-brightgreen.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAACXBIWXMAAA7EAAAOxAGVKw4bAAADGGlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjaY2BgnuDo4uTKJMDAUFBUUuQe5BgZERmlwH6egY2BmYGBgYGBITG5uMAxIMCHgYGBIS8/L5UBFTAyMHy7xsDIwMDAcFnX0cXJlYE0wJpcUFTCwMBwgIGBwSgltTiZgYHhCwMDQ3p5SUEJAwNjDAMDg0hSdkEJAwNjAQMDg0h2SJAzAwNjCwMDE09JakUJAwMDg3N+QWVRZnpGiYKhpaWlgmNKflKqQnBlcUlqbrGCZ15yflFBflFiSWoKAwMD1A4GBgYGXpf8EgX3xMw8BSMDVQYqg4jIK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S8Tbxsfd99gvwT//ID6wIlBS4N3hVwMfRnOFCEXaRUVEV0RMzN2T9yDBLZE3aSw5IaUNak30zkyLDIzs+ZmX8xlz7PPryjYVPiuWLskq3RV2ZsK/cqSql01jLVedVPrHzbqNdU0n22VaytsP9op3VXUfbpXta+x/+5Em0mzJ/+dGj/t8AyNmf2zvs9JmHt6vvmCpYtEFrcu+bYsc/m9lSGrTq9xWbtvveWGbZtMNm/ZarJt+w6rnft3u+45uy9s/4ODOYd+Hmk/Jn58xUnrU+fOJJ/9dX7SRe1LR68kXv13fc5Nm1t379TfU75/4mHeY7En+59lvhB5efB1/lv5dxc+NH0y/fzq64Lv4T8Ffp360/rP8f9/AA0ADzT6lvFdAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAF1SURBVHja7JihTgNBEIb/K1WkBtEEAsESBKEvgEKRAhLHOxAMfQ9cHwEMBoFA1/ACBEGgzbkmUAwI+BENubTs9WZmLz1CZtZd9v7/u9vMZGdAGFabA05Hn3sWrYQwRB9rwafreikbQN5LiV6qhorDARzAARzAARzAARzAARzAARygGOAQ6a+GLr9jmlwpDuJbsxQrER+YYrXaI2D8EZyAEfangj2Fq0NrnBWry8YI5yb7rkRbBrDAK7X9NevlAYCL7Kns79iQKcunOU0+iO0fuSzV1QyUNjkU2b9wS66qm2nt8L3Q/oO7Gk3tWO2InzPtv3isU9RP9jqxmR8LMKsqdPVqFoC8qiDM/HiAcFUQZ34IYDr0VUGW+QEfK8BkVZBmfqkAWVWQZ37JAOA+n/nEtnh/wGd8JWP81Nt0P0r8Wu4ADvAHAOq2fsaP4N8BvFXi/ZoB3FYCcJMNKDbQw9Kc7YdoYfDzB+6xjUuM5mY+wsXYHvgeABIzsPkSOM/lAAAAAElFTkSuQmCC&style=flat
|
||||||
[download-link]: https://betterdiscord.net/ghdl?url=https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/GoogleSearchReplace/GoogleSearchReplace.plugin.js
|
[download-link]: https: //betterdiscord.net/ghdl?url=https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/GoogleSearchReplace/GoogleSearchReplace.plugin.js
|
||||||
|
|
||||||
[paypal-badge]: https://img.shields.io/badge/Paypal-Donate!-%23003087.svg?logo=paypal&style=flat
|
[paypal-badge]: https: //img.shields.io/badge/Paypal-Donate!-%23003087.svg?logo=paypal&style=flat
|
||||||
[paypal-link]: https://paypal.me/MircoWittrien
|
[paypal-link]: https: //paypal.me/MircoWittrien
|
||||||
|
|
||||||
[patreon-badge]: https://img.shields.io/badge/Patreon-Support!-%23F96854.svg?logo=patreon&style=flat
|
[patreon-badge]: https: //img.shields.io/badge/Patreon-Support!-%23F96854.svg?logo=patreon&style=flat
|
||||||
[patreon-link]: https://patreon.com/MircoWittrien
|
[patreon-link]: https: //patreon.com/MircoWittrien
|
||||||
|
|
||||||
Replace the default Google Text Search with a selection menu of several search engines
|
Replace the default Google Text Search with a selection menu of several search engines
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
* @name GoogleTranslateOption
|
* @name GoogleTranslateOption
|
||||||
* @authorId 278543574059057154
|
* @authorId 278543574059057154
|
||||||
* @invite Jx3TjNS
|
* @invite Jx3TjNS
|
||||||
* @donate https://www.paypal.me/MircoWittrien
|
* @donate https: //www.paypal.me/MircoWittrien
|
||||||
* @patreon https://www.patreon.com/MircoWittrien
|
* @patreon https: //www.patreon.com/MircoWittrien
|
||||||
* @website https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/GoogleTranslateOption
|
* @website https: //github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/GoogleTranslateOption
|
||||||
* @source https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/GoogleTranslateOption/GoogleTranslateOption.plugin.js
|
* @source https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/GoogleTranslateOption/GoogleTranslateOption.plugin.js
|
||||||
* @updateUrl https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/GoogleTranslateOption/GoogleTranslateOption.plugin.js
|
* @updateUrl https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/GoogleTranslateOption/GoogleTranslateOption.plugin.js
|
||||||
*/
|
*/
|
||||||
|
|
||||||
module.exports = (_ => {
|
module.exports = (_ => {
|
||||||
|
@ -31,7 +31,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
@ -40,7 +40,7 @@ module.exports = (_ => {
|
||||||
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
|
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
|
||||||
onConfirm: _ => {
|
onConfirm: _ => {
|
||||||
delete window.BDFDB_Global.downloadModal;
|
delete window.BDFDB_Global.downloadModal;
|
||||||
require("request").get("https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
|
require("request").get("https: //mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
|
||||||
if (!e && b && b.indexOf(`* @name BDFDB`) > -1) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => {});
|
if (!e && b && b.indexOf(`* @name BDFDB`) > -1) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => {});
|
||||||
else BdApi.alert("Error", "Could not download BDFDB library plugin, try again some time later.");
|
else BdApi.alert("Error", "Could not download BDFDB library plugin, try again some time later.");
|
||||||
});
|
});
|
||||||
|
@ -67,11 +67,11 @@ module.exports = (_ => {
|
||||||
|
|
||||||
const googleLanguages = ["af","am","ar","az","be","bg","bn","bs","ca","ceb","co","cs","cy","da","de","el","en","eo","es","et","eu","fa","fi","fr","fy","ga","gd","gl","gu","ha","haw","hi","hmn","hr","ht","hu","hy","id","ig","is","it","iw","ja","jw","ka","kk","km","kn","ko","ku","ky","la","lb","lo","lt","lv","mg","mi","mk","ml","mn","mr","ms","mt","my","ne","nl","no","ny","or","pa","pl","ps","pt","ro","ru","rw","sd","si","sk","sl","sm","sn","so","sq","sr","st","su","sv","sw","ta","te","tg","th","tk","tl","tr","tt","ug","uk","ur","uz","vi","xh","yi","yo","zh-CN","zu"];
|
const googleLanguages = ["af","am","ar","az","be","bg","bn","bs","ca","ceb","co","cs","cy","da","de","el","en","eo","es","et","eu","fa","fi","fr","fy","ga","gd","gl","gu","ha","haw","hi","hmn","hr","ht","hu","hy","id","ig","is","it","iw","ja","jw","ka","kk","km","kn","ko","ku","ky","la","lb","lo","lt","lv","mg","mi","mk","ml","mn","mr","ms","mt","my","ne","nl","no","ny","or","pa","pl","ps","pt","ro","ru","rw","sd","si","sk","sl","sm","sn","so","sq","sr","st","su","sv","sw","ta","te","tg","th","tk","tl","tr","tt","ug","uk","ur","uz","vi","xh","yi","yo","zh-CN","zu"];
|
||||||
const translationEngines = {
|
const translationEngines = {
|
||||||
googleapi: {name:"GoogleApi", auto:true, funcName:"googleApiTranslate", languages: googleLanguages},
|
googleapi: {name: "GoogleApi", auto: true, funcName: "googleApiTranslate", languages: googleLanguages},
|
||||||
google: {name:"Google", auto:true, funcName:"googleTranslate", languages: googleLanguages},
|
google: {name: "Google", auto: true, funcName: "googleTranslate", languages: googleLanguages},
|
||||||
itranslate: {name:"iTranslate", auto:true, funcName:"iTranslateTranslate", languages: [...new Set(["af","ar","az","be","bg","bn","bs","ca","ceb","cs","cy","da","de","el","en","eo","es","et","eu","fa","fi","fil","fr","ga","gl","gu","ha","he","hi","hmn","hr","ht","hu","hy","id","ig","is","it","ja","jw","ka","kk","km","kn","ko","la","lo","lt","lv","mg","mi","mk","ml","mn","mr","ms","mt","my","ne","nl","no","ny","pa","pl","pt-BR","pt-PT","ro","ru","si","sk","sl","so","sq","sr","st","su","sv","sw","ta","te","tg","th","tr","uk","ur","uz","vi","we","yi","yo","zh-CN","zh-TW","zu"].concat(googleLanguages))].sort()},
|
itranslate: {name: "iTranslate", auto: true, funcName: "iTranslateTranslate", languages: [...new Set(["af","ar","az","be","bg","bn","bs","ca","ceb","cs","cy","da","de","el","en","eo","es","et","eu","fa","fi","fil","fr","ga","gl","gu","ha","he","hi","hmn","hr","ht","hu","hy","id","ig","is","it","ja","jw","ka","kk","km","kn","ko","la","lo","lt","lv","mg","mi","mk","ml","mn","mr","ms","mt","my","ne","nl","no","ny","pa","pl","pt-BR","pt-PT","ro","ru","si","sk","sl","so","sq","sr","st","su","sv","sw","ta","te","tg","th","tr","uk","ur","uz","vi","we","yi","yo","zh-CN","zh-TW","zu"].concat(googleLanguages))].sort()},
|
||||||
yandex: {name:"Yandex", auto:true, funcName:"yandexTranslate", languages: ["af","am","ar","az","ba","be","bg","bn","bs","ca","ceb","cs","cy","da","de","el","en","eo","es","et","eu","fa","fi","fr","ga","gd","gl","gu","he","hi","hr","ht","hu","hy","id","is","it","ja","jv","ka","kk","km","kn","ko","ky","la","lb","lo","lt","lv","mg","mhr","mi","mk","ml","mn","mr","ms","mt","my","ne","nl","no","pa","pap","pl","pt","ro","ru","si","sk","sl","sq","sr","su","sv","sw","ta","te","tg","th","tl","tr","tt","udm","uk","ur","uz","vi","xh","yi","zh"]},
|
yandex: {name: "Yandex", auto: true, funcName: "yandexTranslate", languages: ["af","am","ar","az","ba","be","bg","bn","bs","ca","ceb","cs","cy","da","de","el","en","eo","es","et","eu","fa","fi","fr","ga","gd","gl","gu","he","hi","hr","ht","hu","hy","id","is","it","ja","jv","ka","kk","km","kn","ko","ky","la","lb","lo","lt","lv","mg","mhr","mi","mk","ml","mn","mr","ms","mt","my","ne","nl","no","pa","pap","pl","pt","ro","ru","si","sk","sl","sq","sr","su","sv","sw","ta","te","tg","th","tl","tr","tt","udm","uk","ur","uz","vi","xh","yi","zh"]},
|
||||||
papago: {name:"Papago", auto:false, funcName:"papagoTranslate", languages: ["en","es","fr","id","ja","ko","th","vi","zh-CN","zh-TW"]}
|
papago: {name: "Papago", auto: false, funcName: "papagoTranslate", languages: ["en","es","fr","id","ja","ko","th","vi","zh-CN","zh-TW"]}
|
||||||
};
|
};
|
||||||
|
|
||||||
var languages, translating, isTranslating, translatedMessages, oldMessages;
|
var languages, translating, isTranslating, translatedMessages, oldMessages;
|
||||||
|
@ -87,21 +87,21 @@ module.exports = (_ => {
|
||||||
|
|
||||||
this.defaults = {
|
this.defaults = {
|
||||||
settings: {
|
settings: {
|
||||||
useChromium: {value:false, description:"Use an inbuilt browser window instead of opening your default browser"},
|
useChromium: {value: false, description: "Use an inbuilt browser window instead of opening your default browser"},
|
||||||
addTranslateButton: {value:true, description:"Add an translate button to the chatbar"},
|
addTranslateButton: {value: true, description: "Add an translate button to the chatbar"},
|
||||||
sendOriginalMessage: {value:false, description:"Send the original message together with the translation"}
|
sendOriginalMessage: {value: false, description: "Send the original message together with the translation"}
|
||||||
},
|
},
|
||||||
choices: {
|
choices: {
|
||||||
inputContext: {value:"auto", direction:"input", place:"Context", description:"Input Language in received Messages:"},
|
inputContext: {value: "auto", direction: "input", place: "Context", description: "Input Language in received Messages: "},
|
||||||
outputContext: {value:"$discord", direction:"output", place:"Context", description:"Output Language in received Messages:"},
|
outputContext: {value: "$discord", direction: "output", place: "Context", description: "Output Language in received Messages: "},
|
||||||
inputMessage: {value:"auto", direction:"input", place:"Message", description:"Input Language in sent Messages:"},
|
inputMessage: {value: "auto", direction: "input", place: "Message", description: "Input Language in sent Messages: "},
|
||||||
outputMessage: {value:"$discord", direction:"output", place:"Message", description:"Output Language in sent Messages:"}
|
outputMessage: {value: "$discord", direction: "output", place: "Message", description: "Output Language in sent Messages: "}
|
||||||
},
|
},
|
||||||
exceptions: {
|
exceptions: {
|
||||||
wordStart: {value:["!"], max:1, description:"Words starting with any of these will be ignored"}
|
wordStart: {value: ["!"], max: 1, description: "Words starting with any of these will be ignored"}
|
||||||
},
|
},
|
||||||
engines: {
|
engines: {
|
||||||
translator: {value:"googleapi", description:"Translation Engine:"}
|
translator: {value: "googleapi", description: "Translation Engine: "}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -244,7 +244,7 @@ module.exports = (_ => {
|
||||||
let item = BDFDB.DOMUtils.getParent(BDFDB.dotCN.menuitem, event.target);
|
let item = BDFDB.DOMUtils.getParent(BDFDB.dotCN.menuitem, event.target);
|
||||||
if (item) {
|
if (item) {
|
||||||
let createTooltip = _ => {
|
let createTooltip = _ => {
|
||||||
BDFDB.TooltipUtils.create(item, `From ${foundInput.name}:\n${text}\n\nTo ${foundOutput.name}:\n${foundTranslation}`, {type:"right", selector:"googletranslate-tooltip"});
|
BDFDB.TooltipUtils.create(item, `From ${foundInput.name}:\n${text}\n\nTo ${foundOutput.name}:\n${foundTranslation}`, {type: "right", selector: "googletranslate-tooltip"});
|
||||||
};
|
};
|
||||||
if (foundTranslation && foundInput && foundOutput) {
|
if (foundTranslation && foundInput && foundOutput) {
|
||||||
if (document.querySelector(".googletranslate-tooltip")) {
|
if (document.querySelector(".googletranslate-tooltip")) {
|
||||||
|
@ -334,7 +334,7 @@ module.exports = (_ => {
|
||||||
if (settings.addTranslateButton) {
|
if (settings.addTranslateButton) {
|
||||||
let editor = BDFDB.ReactUtils.findChild(e.returnvalue, {name: "ChannelEditorContainer"});
|
let editor = BDFDB.ReactUtils.findChild(e.returnvalue, {name: "ChannelEditorContainer"});
|
||||||
if (editor && editor.props.type == BDFDB.DiscordConstants.TextareaTypes.NORMAL && !editor.props.disabled) {
|
if (editor && editor.props.type == BDFDB.DiscordConstants.TextareaTypes.NORMAL && !editor.props.disabled) {
|
||||||
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {props:[["className", BDFDB.disCN.textareapickerbuttons]]});
|
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {props: [["className", BDFDB.disCN.textareapickerbuttons]]});
|
||||||
if (index > -1 && children[index].props && children[index].props.children) children[index].props.children.unshift(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.PopoutContainer, {
|
if (index > -1 && children[index].props && children[index].props.children) children[index].props.children.unshift(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.PopoutContainer, {
|
||||||
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ChannelTextAreaButton, {
|
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ChannelTextAreaButton, {
|
||||||
key: "translate-button",
|
key: "translate-button",
|
||||||
|
@ -485,7 +485,7 @@ module.exports = (_ => {
|
||||||
choices["output" + place] = input;
|
choices["output" + place] = input;
|
||||||
BDFDB.DataUtils.save(choices, this, "choices");
|
BDFDB.DataUtils.save(choices, this, "choices");
|
||||||
|
|
||||||
for (let selectIns of BDFDB.ReactUtils.findOwner(BDFDB.ReactUtils.findOwner(e._targetInst, {name:["BDFDB_Popout", "BDFDB_SettingsPanel"], up:true}), {name:"BDFDB_Select", all:true, noCopies:true})) if (selectIns && selectIns.props && selectIns.props.id && this.defaults.choices[selectIns.props.id] && this.defaults.choices[selectIns.props.id].place == place) {
|
for (let selectIns of BDFDB.ReactUtils.findOwner(BDFDB.ReactUtils.findOwner(e._targetInst, {name: ["BDFDB_Popout", "BDFDB_SettingsPanel"], up: true}), {name: "BDFDB_Select", all: true, noCopies: true})) if (selectIns && selectIns.props && selectIns.props.id && this.defaults.choices[selectIns.props.id] && this.defaults.choices[selectIns.props.id].place == place) {
|
||||||
selectIns.props.value = this.defaults.choices[selectIns.props.id].direction == "input" ? output : input;
|
selectIns.props.value = this.defaults.choices[selectIns.props.id].direction == "input" ? output : input;
|
||||||
BDFDB.ReactUtils.forceUpdate(selectIns);
|
BDFDB.ReactUtils.forceUpdate(selectIns);
|
||||||
}
|
}
|
||||||
|
@ -501,7 +501,7 @@ module.exports = (_ => {
|
||||||
menuPlacement: inPopout ? BDFDB.LibraryComponents.Select.MenuPlacements.TOP : BDFDB.LibraryComponents.Select.MenuPlacements.BOTTOM,
|
menuPlacement: inPopout ? BDFDB.LibraryComponents.Select.MenuPlacements.TOP : BDFDB.LibraryComponents.Select.MenuPlacements.BOTTOM,
|
||||||
value: this.getLanguageChoice(key),
|
value: this.getLanguageChoice(key),
|
||||||
id: key,
|
id: key,
|
||||||
options: BDFDB.ObjectUtils.toArray(BDFDB.ObjectUtils.map(isOutput ? BDFDB.ObjectUtils.filter(languages, lang => lang.id != "auto") : languages, (lang, id) => {return {value:id, label:this.getLanguageName(lang)}})),
|
options: BDFDB.ObjectUtils.toArray(BDFDB.ObjectUtils.map(isOutput ? BDFDB.ObjectUtils.filter(languages, lang => lang.id != "auto") : languages, (lang, id) => {return {value: id, label: this.getLanguageName(lang)}})),
|
||||||
searchable: true,
|
searchable: true,
|
||||||
optionRenderer: lang => {
|
optionRenderer: lang => {
|
||||||
return languages[lang.value] ? BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Flex, {
|
return languages[lang.value] ? BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Flex, {
|
||||||
|
@ -540,13 +540,13 @@ module.exports = (_ => {
|
||||||
menuPlacement: inPopout ? BDFDB.LibraryComponents.Select.MenuPlacements.TOP : BDFDB.LibraryComponents.Select.MenuPlacements.BOTTOM,
|
menuPlacement: inPopout ? BDFDB.LibraryComponents.Select.MenuPlacements.TOP : BDFDB.LibraryComponents.Select.MenuPlacements.BOTTOM,
|
||||||
value: engines[key],
|
value: engines[key],
|
||||||
id: key,
|
id: key,
|
||||||
options: Object.keys(translationEngines).map(engineKey => {return {value:engineKey, label:translationEngines[engineKey].name}}),
|
options: Object.keys(translationEngines).map(engineKey => {return {value: engineKey, label: translationEngines[engineKey].name}}),
|
||||||
searchable: true,
|
searchable: true,
|
||||||
onChange: (engine, instance) => {
|
onChange: (engine, instance) => {
|
||||||
engines[key] = engine.value;
|
engines[key] = engine.value;
|
||||||
BDFDB.DataUtils.save(engines, this, "engines");
|
BDFDB.DataUtils.save(engines, this, "engines");
|
||||||
this.setLanguages();
|
this.setLanguages();
|
||||||
let popoutInstance = BDFDB.ReactUtils.findOwner(instance, {name: "BDFDB_PopoutContainer", up:true});
|
let popoutInstance = BDFDB.ReactUtils.findOwner(instance, {name: "BDFDB_PopoutContainer", up: true});
|
||||||
if (popoutInstance) {
|
if (popoutInstance) {
|
||||||
popoutInstance.close();
|
popoutInstance.close();
|
||||||
popoutInstance.handleClick();
|
popoutInstance.handleClick();
|
||||||
|
@ -636,11 +636,11 @@ module.exports = (_ => {
|
||||||
let output = Object.assign({}, languages[this.getLanguageChoice("output", type)]);
|
let output = Object.assign({}, languages[this.getLanguageChoice("output", type)]);
|
||||||
if (translate) {
|
if (translate) {
|
||||||
let timer = 0;
|
let timer = 0;
|
||||||
toast = BDFDB.NotificationUtils.toast("Translating. Please wait", {timeout:0});
|
toast = BDFDB.NotificationUtils.toast("Translating. Please wait", {timeout: 0});
|
||||||
toast.interval = BDFDB.TimeUtils.interval(_ => {
|
toast.interval = BDFDB.TimeUtils.interval(_ => {
|
||||||
if (timer++ > 40) {
|
if (timer++ > 40) {
|
||||||
finishTranslation("");
|
finishTranslation("");
|
||||||
BDFDB.NotificationUtils.toast("Failed to translate text. Try another Translate Engine.", {type:"error"});
|
BDFDB.NotificationUtils.toast("Failed to translate text. Try another Translate Engine.", {type: "error"});
|
||||||
}
|
}
|
||||||
else toast.textContent = toast.textContent.indexOf(".....") > -1 ? "Translating. Please wait" : toast.textContent + ".";
|
else toast.textContent = toast.textContent.indexOf(".....") > -1 ? "Translating. Please wait" : toast.textContent + ".";
|
||||||
}, 500);
|
}, 500);
|
||||||
|
@ -664,7 +664,7 @@ module.exports = (_ => {
|
||||||
else {
|
else {
|
||||||
if (translationEngines[engines.translator] && typeof this[translationEngines[engines.translator].funcName] == "function") {
|
if (translationEngines[engines.translator] && typeof this[translationEngines[engines.translator].funcName] == "function") {
|
||||||
isTranslating = true;
|
isTranslating = true;
|
||||||
this[translationEngines[engines.translator].funcName].apply(this, [{input, output, text:newText, specialcase, engine:translationEngines[engines.translator]}, finishTranslation]);
|
this[translationEngines[engines.translator].funcName].apply(this, [{input, output, text: newText, specialcase, engine: translationEngines[engines.translator]}, finishTranslation]);
|
||||||
}
|
}
|
||||||
else finishTranslation();
|
else finishTranslation();
|
||||||
}
|
}
|
||||||
|
@ -678,7 +678,7 @@ module.exports = (_ => {
|
||||||
googleTranslateWindow.executeJavaScriptSafe(`
|
googleTranslateWindow.executeJavaScriptSafe(`
|
||||||
require("electron").ipcRenderer.sendTo(${BDFDB.LibraryRequires.electron.remote.getCurrentWindow().webContents.id}, "GTO-translation", [
|
require("electron").ipcRenderer.sendTo(${BDFDB.LibraryRequires.electron.remote.getCurrentWindow().webContents.id}, "GTO-translation", [
|
||||||
(document.querySelector(".translation") || {}).innerText,
|
(document.querySelector(".translation") || {}).innerText,
|
||||||
[(new RegExp("{code:'([^']*)',name:'" + [(new RegExp((window.source_language_detected || "").replace("%1$s", "([A-z]{2,})"), "g")).exec(document.body.innerHTML)].flat()[1] +"'}", "g")).exec(document.body.innerHTML)].flat(10)[1]
|
[(new RegExp("{code: '([^']*)',name: '" + [(new RegExp((window.source_language_detected || "").replace("%1$s", "([A-z]{2,})"), "g")).exec(document.body.innerHTML)].flat()[1] +"'}", "g")).exec(document.body.innerHTML)].flat(10)[1]
|
||||||
]);
|
]);
|
||||||
`);
|
`);
|
||||||
}
|
}
|
||||||
|
@ -695,7 +695,7 @@ module.exports = (_ => {
|
||||||
}
|
}
|
||||||
|
|
||||||
googleApiTranslate (data, callback) {
|
googleApiTranslate (data, callback) {
|
||||||
BDFDB.LibraryRequires.request(`https://translate.googleapis.com/translate_a/single?client=gtx&sl=${data.input.id}&tl=${data.output.id}&dt=t&dj=1&source=input&q=${encodeURIComponent(data.text)}`, (error, response, result) => {
|
BDFDB.LibraryRequires.request(`https: //translate.googleapis.com/translate_a/single?client=gtx&sl=${data.input.id}&tl=${data.output.id}&dt=t&dj=1&source=input&q=${encodeURIComponent(data.text)}`, (error, response, result) => {
|
||||||
if (!error && result && response.statusCode == 200) {
|
if (!error && result && response.statusCode == 200) {
|
||||||
try {
|
try {
|
||||||
result = JSON.parse(result);
|
result = JSON.parse(result);
|
||||||
|
@ -708,7 +708,7 @@ module.exports = (_ => {
|
||||||
catch (err) {callback("");}
|
catch (err) {callback("");}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
BDFDB.NotificationUtils.toast("Failed to translate text. Translation Server is down or Request Limit per Hour is reached. Try another Translate Engine.", {type:"error"});
|
BDFDB.NotificationUtils.toast("Failed to translate text. Translation Server is down or Request Limit per Hour is reached. Try another Translate Engine.", {type: "error"});
|
||||||
callback("");
|
callback("");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -718,7 +718,7 @@ module.exports = (_ => {
|
||||||
let translate = _ => {
|
let translate = _ => {
|
||||||
BDFDB.LibraryRequires.request({
|
BDFDB.LibraryRequires.request({
|
||||||
method: "POST",
|
method: "POST",
|
||||||
url: "https://web-api.itranslateapp.com/v3/texts/translate",
|
url: "https: //web-api.itranslateapp.com/v3/texts/translate",
|
||||||
headers: {
|
headers: {
|
||||||
"API-KEY": data.engine.APIkey
|
"API-KEY": data.engine.APIkey
|
||||||
},
|
},
|
||||||
|
@ -744,13 +744,13 @@ module.exports = (_ => {
|
||||||
catch (err) {callback("");}
|
catch (err) {callback("");}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
BDFDB.NotificationUtils.toast("Failed to translate text. Translation Server is down or API-key outdated. Try another Translate Engine.", {type:"error"});
|
BDFDB.NotificationUtils.toast("Failed to translate text. Translation Server is down or API-key outdated. Try another Translate Engine.", {type: "error"});
|
||||||
callback("");
|
callback("");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
if (data.engine.APIkey) translate();
|
if (data.engine.APIkey) translate();
|
||||||
else BDFDB.LibraryRequires.request("https://www.itranslate.com/js/webapp/main.js", {gzip: true}, (error, response, result) => {
|
else BDFDB.LibraryRequires.request("https: //www.itranslate.com/js/webapp/main.js", {gzip: true}, (error, response, result) => {
|
||||||
if (!error && result) {
|
if (!error && result) {
|
||||||
let APIkey = /var API_KEY = "(.+)"/.exec(result);
|
let APIkey = /var API_KEY = "(.+)"/.exec(result);
|
||||||
if (APIkey) {
|
if (APIkey) {
|
||||||
|
@ -764,7 +764,7 @@ module.exports = (_ => {
|
||||||
}
|
}
|
||||||
|
|
||||||
yandexTranslate (data, callback) {
|
yandexTranslate (data, callback) {
|
||||||
BDFDB.LibraryRequires.request(`https://translate.yandex.net/api/v1.5/tr/translate?key=trnsl.1.1.20191206T223907Z.52bd512eca953a5b.1ec123ce4dcab3ae859f312d27cdc8609ab280de&text=${encodeURIComponent(data.text)}&lang=${data.specialcase || data.input.id == "auto" ? data.output.id : (data.input.id + "-" + data.output.id)}&options=1`, (error, response, result) => {
|
BDFDB.LibraryRequires.request(`https: //translate.yandex.net/api/v1.5/tr/translate?key=trnsl.1.1.20191206T223907Z.52bd512eca953a5b.1ec123ce4dcab3ae859f312d27cdc8609ab280de&text=${encodeURIComponent(data.text)}&lang=${data.specialcase || data.input.id == "auto" ? data.output.id : (data.input.id + "-" + data.output.id)}&options=1`, (error, response, result) => {
|
||||||
if (!error && result && response.statusCode == 200) {
|
if (!error && result && response.statusCode == 200) {
|
||||||
result = BDFDB.DOMUtils.create(result);
|
result = BDFDB.DOMUtils.create(result);
|
||||||
let translation = result.querySelector("text");
|
let translation = result.querySelector("text");
|
||||||
|
@ -780,7 +780,7 @@ module.exports = (_ => {
|
||||||
else callback("");
|
else callback("");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
BDFDB.NotificationUtils.toast("Failed to translate text. Translation Server is down or API-key outdated. Try another Translate Engine.", {type:"error"});
|
BDFDB.NotificationUtils.toast("Failed to translate text. Translation Server is down or API-key outdated. Try another Translate Engine.", {type: "error"});
|
||||||
callback("");
|
callback("");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -788,7 +788,7 @@ module.exports = (_ => {
|
||||||
|
|
||||||
papagoTranslate (data, callback) {
|
papagoTranslate (data, callback) {
|
||||||
BDFDB.LibraryRequires.request.post({
|
BDFDB.LibraryRequires.request.post({
|
||||||
url: "https://openapi.naver.com/v1/papago/n2mt",
|
url: "https: //openapi.naver.com/v1/papago/n2mt",
|
||||||
form: {
|
form: {
|
||||||
source: data.input.id,
|
source: data.input.id,
|
||||||
target: data.output.id,
|
target: data.output.id,
|
||||||
|
@ -808,7 +808,7 @@ module.exports = (_ => {
|
||||||
catch (err) {callback("");}
|
catch (err) {callback("");}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
BDFDB.NotificationUtils.toast("Failed to translate text. Translation Server is down, daily limited reached or API-key outdated. Try another Translate Engine.", {type:"error"});
|
BDFDB.NotificationUtils.toast("Failed to translate text. Translation Server is down, daily limited reached or API-key outdated. Try another Translate Engine.", {type: "error"});
|
||||||
callback("");
|
callback("");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -867,7 +867,7 @@ module.exports = (_ => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else BDFDB.NotificationUtils.toast("Invalid binary format. Only use 0s and 1s.", {type:"error"});
|
else BDFDB.NotificationUtils.toast("Invalid binary format. Only use 0s and 1s.", {type: "error"});
|
||||||
return string;
|
return string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -917,7 +917,7 @@ module.exports = (_ => {
|
||||||
else {
|
else {
|
||||||
let usedExceptions = BDFDB.ArrayUtils.is(exceptions.wordStart) ? exceptions.wordStart : [];
|
let usedExceptions = BDFDB.ArrayUtils.is(exceptions.wordStart) ? exceptions.wordStart : [];
|
||||||
string.split(" ").forEach(word => {
|
string.split(" ").forEach(word => {
|
||||||
if (word.indexOf("<@!") == 0 || word.indexOf("<#") == 0 || word.indexOf(":") == 0 || word.indexOf("<:") == 0 || word.indexOf("<a:") == 0 || word.indexOf("@") == 0 || word.indexOf("#") == 0 || usedExceptions.some(n => word.indexOf(n) == 0 && word.length > 1)) {
|
if (word.indexOf("<@!") == 0 || word.indexOf("<#") == 0 || word.indexOf(":") == 0 || word.indexOf("<:") == 0 || word.indexOf("<a: ") == 0 || word.indexOf("@") == 0 || word.indexOf("#") == 0 || usedExceptions.some(n => word.indexOf(n) == 0 && word.length > 1)) {
|
||||||
newString.push(`[/////${count}]`);
|
newString.push(`[/////${count}]`);
|
||||||
excepts[count] = word;
|
excepts[count] = word;
|
||||||
count++;
|
count++;
|
||||||
|
@ -929,7 +929,7 @@ module.exports = (_ => {
|
||||||
}
|
}
|
||||||
|
|
||||||
getGoogleTranslatePageURL (input, output, text) {
|
getGoogleTranslatePageURL (input, output, text) {
|
||||||
return `https://translate.google.com/#${BDFDB.LanguageUtils.languages[input] ? input : "auto"}/${output}/${encodeURIComponent(text)}`;
|
return `https: //translate.google.com/#${BDFDB.LanguageUtils.languages[input] ? input : "auto"}/${output}/${encodeURIComponent(text)}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
getLanguageName (language) {
|
getLanguageName (language) {
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
# Google Translate Option - [![Downlad][download-badge]][download-link] [![Paypal][paypal-badge]][paypal-link] [![Patreon][patreon-badge]][patreon-link]
|
# Google Translate Option - [![Downlad][download-badge]][download-link] [![Paypal][paypal-badge]][paypal-link] [![Patreon][patreon-badge]][patreon-link]
|
||||||
|
|
||||||
[download-badge]: https://img.shields.io/badge/Download-Plugin-brightgreen.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAACXBIWXMAAA7EAAAOxAGVKw4bAAADGGlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjaY2BgnuDo4uTKJMDAUFBUUuQe5BgZERmlwH6egY2BmYGBgYGBITG5uMAxIMCHgYGBIS8/L5UBFTAyMHy7xsDIwMDAcFnX0cXJlYE0wJpcUFTCwMBwgIGBwSgltTiZgYHhCwMDQ3p5SUEJAwNjDAMDg0hSdkEJAwNjAQMDg0h2SJAzAwNjCwMDE09JakUJAwMDg3N+QWVRZnpGiYKhpaWlgmNKflKqQnBlcUlqbrGCZ15yflFBflFiSWoKAwMD1A4GBgYGXpf8EgX3xMw8BSMDVQYqg4jIKAUICxE+CDEESC4tKoMHJQODAIMCgwGDA0MAQyJDPcMChqMMbxjFGV0YSxlXMN5jEmMKYprAdIFZmDmSeSHzGxZLlg6WW6x6rK2s99gs2aaxfWMPZ9/NocTRxfGFM5HzApcj1xZuTe4FPFI8U3mFeCfxCfNN45fhXyygI7BD0FXwilCq0A/hXhEVkb2i4aJfxCaJG4lfkaiQlJM8JpUvLS19QqZMVl32llyfvIv8H4WtioVKekpvldeqFKiaqP5UO6jepRGqqaT5QeuA9iSdVF0rPUG9V/pHDBYY1hrFGNuayJsym740u2C+02KJ5QSrOutcmzjbQDtXe2sHY0cdJzVnJRcFV3k3BXdlD3VPXS8Tbxsfd99gvwT//ID6wIlBS4N3hVwMfRnOFCEXaRUVEV0RMzN2T9yDBLZE3aSw5IaUNak30zkyLDIzs+ZmX8xlz7PPryjYVPiuWLskq3RV2ZsK/cqSql01jLVedVPrHzbqNdU0n22VaytsP9op3VXUfbpXta+x/+5Em0mzJ/+dGj/t8AyNmf2zvs9JmHt6vvmCpYtEFrcu+bYsc/m9lSGrTq9xWbtvveWGbZtMNm/ZarJt+w6rnft3u+45uy9s/4ODOYd+Hmk/Jn58xUnrU+fOJJ/9dX7SRe1LR68kXv13fc5Nm1t379TfU75/4mHeY7En+59lvhB5efB1/lv5dxc+NH0y/fzq64Lv4T8Ffp360/rP8f9/AA0ADzT6lvFdAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAF1SURBVHja7JihTgNBEIb/K1WkBtEEAsESBKEvgEKRAhLHOxAMfQ9cHwEMBoFA1/ACBEGgzbkmUAwI+BENubTs9WZmLz1CZtZd9v7/u9vMZGdAGFabA05Hn3sWrYQwRB9rwafreikbQN5LiV6qhorDARzAARzAARzAARzAARzAARygGOAQ6a+GLr9jmlwpDuJbsxQrER+YYrXaI2D8EZyAEfangj2Fq0NrnBWry8YI5yb7rkRbBrDAK7X9NevlAYCL7Kns79iQKcunOU0+iO0fuSzV1QyUNjkU2b9wS66qm2nt8L3Q/oO7Gk3tWO2InzPtv3isU9RP9jqxmR8LMKsqdPVqFoC8qiDM/HiAcFUQZ34IYDr0VUGW+QEfK8BkVZBmfqkAWVWQZ37JAOA+n/nEtnh/wGd8JWP81Nt0P0r8Wu4ADvAHAOq2fsaP4N8BvFXi/ZoB3FYCcJMNKDbQw9Kc7YdoYfDzB+6xjUuM5mY+wsXYHvgeABIzsPkSOM/lAAAAAElFTkSuQmCC&style=flat
|
[download-badge]: https: //img.shields.io/badge/Download-Plugin-brightgreen.svg?logo=data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAACXBIWXMAAA7EAAAOxAGVKw4bAAADGGlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjaY2BgnuDo4uTKJMDAUFBUUuQe5BgZERmlwH6egY2BmYGBgYGBITG5uMAxIMCHgYGBIS8/L5UBFTAyMHy7xsDIwMDAcFnX0cXJlYE0wJpcUFTCwMBwgIGBwSgltTiZgYHhCwMDQ3p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YQwRB9rwafreikbQN5LiV6qhorDARzAARzAARzAARzAARzAARygGOAQ6a+GLr9jmlwpDuJbsxQrER+YYrXaI2D8EZyAEfangj2Fq0NrnBWry8YI5yb7rkRbBrDAK7X9NevlAYCL7Kns79iQKcunOU0+iO0fuSzV1QyUNjkU2b9wS66qm2nt8L3Q/oO7Gk3tWO2InzPtv3isU9RP9jqxmR8LMKsqdPVqFoC8qiDM/HiAcFUQZ34IYDr0VUGW+QEfK8BkVZBmfqkAWVWQZ37JAOA+n/nEtnh/wGd8JWP81Nt0P0r8Wu4ADvAHAOq2fsaP4N8BvFXi/ZoB3FYCcJMNKDbQw9Kc7YdoYfDzB+6xjUuM5mY+wsXYHvgeABIzsPkSOM/lAAAAAElFTkSuQmCC&style=flat
|
||||||
[download-link]: https://betterdiscord.net/ghdl?url=https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/GoogleTranslateOption/GoogleTranslateOption.plugin.js
|
[download-link]: https: //betterdiscord.net/ghdl?url=https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/GoogleTranslateOption/GoogleTranslateOption.plugin.js
|
||||||
|
|
||||||
[paypal-badge]: https://img.shields.io/badge/Paypal-Donate!-%23003087.svg?logo=paypal&style=flat
|
[paypal-badge]: https: //img.shields.io/badge/Paypal-Donate!-%23003087.svg?logo=paypal&style=flat
|
||||||
[paypal-link]: https://paypal.me/MircoWittrien
|
[paypal-link]: https: //paypal.me/MircoWittrien
|
||||||
|
|
||||||
[patreon-badge]: https://img.shields.io/badge/Patreon-Support!-%23F96854.svg?logo=patreon&style=flat
|
[patreon-badge]: https: //img.shields.io/badge/Patreon-Support!-%23F96854.svg?logo=patreon&style=flat
|
||||||
[patreon-link]: https://patreon.com/MircoWittrien
|
[patreon-link]: https: //patreon.com/MircoWittrien
|
||||||
|
|
||||||
Add a Google Translate option to your context menu, which shows a preview of the translated text and on click will open the selected text in Google Translate. Also adds a translation button to your textareas, which will automatically translate the text for you before it is being send
|
Add a Google Translate option to your context menu, which shows a preview of the translated text and on click will open the selected text in Google Translate. Also adds a translation button to your textareas, which will automatically translate the text for you before it is being send
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
* @name HideMutedCategories
|
* @name HideMutedCategories
|
||||||
* @authorId 278543574059057154
|
* @authorId 278543574059057154
|
||||||
* @invite Jx3TjNS
|
* @invite Jx3TjNS
|
||||||
* @donate https://www.paypal.me/MircoWittrien
|
* @donate https: //www.paypal.me/MircoWittrien
|
||||||
* @patreon https://www.patreon.com/MircoWittrien
|
* @patreon https: //www.patreon.com/MircoWittrien
|
||||||
* @website https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/HideMutedCategories
|
* @website https: //github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/HideMutedCategories
|
||||||
* @source https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/HideMutedCategories/HideMutedCategories.plugin.js
|
* @source https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/HideMutedCategories/HideMutedCategories.plugin.js
|
||||||
* @updateUrl https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/HideMutedCategories/HideMutedCategories.plugin.js
|
* @updateUrl https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/HideMutedCategories/HideMutedCategories.plugin.js
|
||||||
*/
|
*/
|
||||||
|
|
||||||
module.exports = (_ => {
|
module.exports = (_ => {
|
||||||
|
@ -26,7 +26,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
@ -35,7 +35,7 @@ module.exports = (_ => {
|
||||||
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
|
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
|
||||||
onConfirm: _ => {
|
onConfirm: _ => {
|
||||||
delete window.BDFDB_Global.downloadModal;
|
delete window.BDFDB_Global.downloadModal;
|
||||||
require("request").get("https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
|
require("request").get("https: //mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
|
||||||
if (!e && b && b.indexOf(`* @name BDFDB`) > -1) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => {});
|
if (!e && b && b.indexOf(`* @name BDFDB`) > -1) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => {});
|
||||||
else BdApi.alert("Error", "Could not download BDFDB library plugin, try again some time later.");
|
else BdApi.alert("Error", "Could not download BDFDB library plugin, try again some time later.");
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
# Hide Muted Categories- [![Downlad][download-badge]][download-link] [![Paypal][paypal-badge]][paypal-link] [![Patreon][patreon-badge]][patreon-link]
|
# Hide Muted Categories- [![Downlad][download-badge]][download-link] [![Paypal][paypal-badge]][paypal-link] [![Patreon][patreon-badge]][patreon-link]
|
||||||
|
|
||||||
[download-badge]: https://img.shields.io/badge/Download-Plugin-brightgreen.svg?logo=data:image/png;base64,iVBORw0KGgoAA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vhB5efB1/lv5dxc+NH0y/fzq64Lv4T8Ffp360/rP8f9/AA0ADzT6lvFdAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAF1SURBVHja7JihTgNBEIb/K1WkBtEEAsESBKEvgEKRAhLHOxAMfQ9cHwEMBoFA1/ACBEGgzbkmUAwI+BENubTs9WZmLz1CZtZd9v7/u9vMZGdAGFabA05Hn3sWrYQwRB9rwafreikbQN5LiV6qhorDARzAARzAARzAARzAARzAARygGOAQ6a+GLr9jmlwpDuJbsxQrER+YYrXaI2D8EZyAEfangj2Fq0NrnBWry8YI5yb7rkRbBrDAK7X9NevlAYCL7Kns79iQKcunOU0+iO0fuSzV1QyUNjkU2b9wS66qm2nt8L3Q/oO7Gk3tWO2InzPtv3isU9RP9jqxmR8LMKsqdPVqFoC8qiDM/HiAcFUQZ34IYDr0VUGW+QEfK8BkVZBmfqkAWVWQZ37JAOA+n/nEtnh/wGd8JWP81Nt0P0r8Wu4ADvAHAOq2fsaP4N8BvFXi/ZoB3FYCcJMNKDbQw9Kc7YdoYfDzB+6xjUuM5mY+wsXYHvgeABIzsPkSOM/lAAAAAElFTkSuQmCC&style=flat
|
[download-badge]: https: //img.shields.io/badge/Download-Plugin-brightgreen.svg?logo=data: image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAACXBIWXMAAA7EAAAOxAGVKw4bAAADGGlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjaY2BgnuDo4uTKJMDAUFBUUuQe5BgZERmlwH6egY2BmYGBgYGBITG5uMAxIMCHgYGBIS8/L5UBFTAyMHy7xsDIwMDAcFnX0cXJlYE0wJpcUFTCwMBwgIGBwSgltTiZgYHhCwMDQ3p5SUEJAwNjDAMDg0hSdkEJAwNjAQMDg0h2SJAzAwNjCwMDE09JakUJAwMDg3N+QWVRZnpGiYKhpaWlgmNKflKqQnBlcUlqbrGCZ15yflFBflFiSWoK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DAK7X9NevlAYCL7Kns79iQKcunOU0+iO0fuSzV1QyUNjkU2b9wS66qm2nt8L3Q/oO7Gk3tWO2InzPtv3isU9RP9jqxmR8LMKsqdPVqFoC8qiDM/HiAcFUQZ34IYDr0VUGW+QEfK8BkVZBmfqkAWVWQZ37JAOA+n/nEtnh/wGd8JWP81Nt0P0r8Wu4ADvAHAOq2fsaP4N8BvFXi/ZoB3FYCcJMNKDbQw9Kc7YdoYfDzB+6xjUuM5mY+wsXYHvgeABIzsPkSOM/lAAAAAElFTkSuQmCC&style=flat
|
||||||
[download-link]: https://betterdiscord.net/ghdl?url=https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/HideMutedCategories/HideMutedCategories.plugin.js
|
[download-link]: https: //betterdiscord.net/ghdl?url=https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/HideMutedCategories/HideMutedCategories.plugin.js
|
||||||
|
|
||||||
[paypal-badge]: https://img.shields.io/badge/Paypal-Donate!-%23003087.svg?logo=paypal&style=flat
|
[paypal-badge]: https: //img.shields.io/badge/Paypal-Donate!-%23003087.svg?logo=paypal&style=flat
|
||||||
[paypal-link]: https://paypal.me/MircoWittrien
|
[paypal-link]: https: //paypal.me/MircoWittrien
|
||||||
|
|
||||||
[patreon-badge]: https://img.shields.io/badge/Patreon-Support!-%23F96854.svg?logo=patreon&style=flat
|
[patreon-badge]: https: //img.shields.io/badge/Patreon-Support!-%23F96854.svg?logo=patreon&style=flat
|
||||||
[patreon-link]: https://patreon.com/MircoWittrien
|
[patreon-link]: https: //patreon.com/MircoWittrien
|
||||||
|
|
||||||
Hide muted categories the same way muted channels are hidden, when the server is set to hide muted channels
|
Hide muted categories the same way muted channels are hidden, when the server is set to hide muted channels
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
* @name ImageUtilities
|
* @name ImageUtilities
|
||||||
* @authorId 278543574059057154
|
* @authorId 278543574059057154
|
||||||
* @invite Jx3TjNS
|
* @invite Jx3TjNS
|
||||||
* @donate https://www.paypal.me/MircoWittrien
|
* @donate https: //www.paypal.me/MircoWittrien
|
||||||
* @patreon https://www.patreon.com/MircoWittrien
|
* @patreon https: //www.patreon.com/MircoWittrien
|
||||||
* @website https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/ImageUtilities
|
* @website https: //github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/ImageUtilities
|
||||||
* @source https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/ImageUtilities/ImageUtilities.plugin.js
|
* @source https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/ImageUtilities/ImageUtilities.plugin.js
|
||||||
* @updateUrl https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/ImageUtilities/ImageUtilities.plugin.js
|
* @updateUrl https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/ImageUtilities/ImageUtilities.plugin.js
|
||||||
*/
|
*/
|
||||||
|
|
||||||
module.exports = (_ => {
|
module.exports = (_ => {
|
||||||
|
@ -31,7 +31,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
@ -40,7 +40,7 @@ module.exports = (_ => {
|
||||||
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
|
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
|
||||||
onConfirm: _ => {
|
onConfirm: _ => {
|
||||||
delete window.BDFDB_Global.downloadModal;
|
delete window.BDFDB_Global.downloadModal;
|
||||||
require("request").get("https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
|
require("request").get("https: //mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
|
||||||
if (!e && b && b.indexOf(`* @name BDFDB`) > -1) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => {});
|
if (!e && b && b.indexOf(`* @name BDFDB`) > -1) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => {});
|
||||||
else BdApi.alert("Error", "Could not download BDFDB library plugin, try again some time later.");
|
else BdApi.alert("Error", "Could not download BDFDB library plugin, try again some time later.");
|
||||||
});
|
});
|
||||||
|
@ -105,41 +105,41 @@ module.exports = (_ => {
|
||||||
|
|
||||||
this.defaults = {
|
this.defaults = {
|
||||||
settings: {
|
settings: {
|
||||||
resizeImage: {value:true, inner:false, description:"Always resize image to fit the whole image modal"},
|
resizeImage: {value: true, inner: false, description: "Always resize image to fit the whole image modal"},
|
||||||
addDetails: {value:true, inner:false, description:"Add image details (name, size, amount) in the image modal"},
|
addDetails: {value: true, inner: false, description: "Add image details (name, size, amount) in the image modal"},
|
||||||
showAsHeader: {value:true, inner:false, description:"Show image details as a details header above the image in the chat"},
|
showAsHeader: {value: true, inner: false, description: "Show image details as a details header above the image in the chat"},
|
||||||
showOnHover: {value:false, inner:false, description:"Show image details as Tooltip in the chat"},
|
showOnHover: {value: false, inner: false, description: "Show image details as Tooltip in the chat"},
|
||||||
enableGallery: {value:true, inner:false, description:"Display previous/next Images in the same message in the image modal"},
|
enableGallery: {value: true, inner: false, description: "Display previous/next Images in the same message in the image modal"},
|
||||||
enableZoom: {value:true, inner:false, description:"Create a zoom lense if you press down on an image in the image modal"},
|
enableZoom: {value: true, inner: false, description: "Create a zoom lense if you press down on an image in the image modal"},
|
||||||
enableCopyImg: {value:true, inner:false, description:"Add a copy image option in the image modal"},
|
enableCopyImg: {value: true, inner: false, description: "Add a copy image option in the image modal"},
|
||||||
enableSaveImg: {value:true, inner:false, description:"Add a save image as option in the image modal"},
|
enableSaveImg: {value: true, inner: false, description: "Add a save image as option in the image modal"},
|
||||||
useChromium: {value:false, inner:false, description:"Use an inbuilt browser window instead of opening your default browser"},
|
useChromium: {value: false, inner: false, description: "Use an inbuilt browser window instead of opening your default browser"},
|
||||||
addUserAvatarEntry: {value:true, inner:true, description:"User Avatars"},
|
addUserAvatarEntry: {value: true, inner: true, description: "User Avatars"},
|
||||||
addGuildIconEntry: {value:true, inner:true, description:"Server Icons"},
|
addGuildIconEntry: {value: true, inner: true, description: "Server Icons"},
|
||||||
addEmojiEntry: {value:true, inner:true, description:"Custom Emojis/Emotes"}
|
addEmojiEntry: {value: true, inner: true, description: "Custom Emojis/Emotes"}
|
||||||
},
|
},
|
||||||
amounts: {
|
amounts: {
|
||||||
hoverDelay: {value:0, min:0, description:"Image Tooltip delay (in millisec)"}
|
hoverDelay: {value: 0, min: 0, description: "Image Tooltip delay (in millisec)"}
|
||||||
},
|
},
|
||||||
inputs: {
|
inputs: {
|
||||||
downloadLocation: {value:"", childProps:{type: "file", searchFolders:true}, description:"Download Location"},
|
downloadLocation: {value: "", childProps: {type: "file", searchFolders: true}, description: "Download Location"},
|
||||||
},
|
},
|
||||||
zoomSettings: {
|
zoomSettings: {
|
||||||
zoomlevel: {value:2, digits:1, minValue: 1, maxValue: 20, unit:"x", label:"ACCESSIBILITY_ZOOM_LEVEL_LABEL"},
|
zoomlevel: {value: 2, digits: 1, minValue: 1, maxValue: 20, unit: "x", label: "ACCESSIBILITY_ZOOM_LEVEL_LABEL"},
|
||||||
lensesize: {value:200, digits:0, minValue: 50, maxValue: 5000, unit:"px", label:"context_lensesize_text"}
|
lensesize: {value: 200, digits: 0, minValue: 50, maxValue: 5000, unit: "px", label: "context_lensesize_text"}
|
||||||
},
|
},
|
||||||
engines: {
|
engines: {
|
||||||
_all: {value:true, name:BDFDB.LanguageUtils.LanguageStrings.FORM_LABEL_ALL, url:null},
|
_all: {value: true, name: BDFDB.LanguageUtils.LanguageStrings.FORM_LABEL_ALL, url: null},
|
||||||
Baidu: {value:true, name:"Baidu", url:"http://image.baidu.com/pcdutu?queryImageUrl=" + imgUrlReplaceString},
|
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"},
|
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://images.google.com/searchbyimage?image_url=" + imgUrlReplaceString},
|
Google: {value: true, name: "Google", url: "https: //images.google.com/searchbyimage?image_url=" + imgUrlReplaceString},
|
||||||
IQDB: {value:true, name:"IQDB", url:"https://iqdb.org/?url=" + imgUrlReplaceString},
|
IQDB: {value: true, name: "IQDB", url: "https: //iqdb.org/?url=" + imgUrlReplaceString},
|
||||||
Reddit: {value:true, name:"Reddit", url:"http://karmadecay.com/search?q=" + 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},
|
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"},
|
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},
|
TinEye: {value: true, name: "TinEye", url: "https: //tineye.com/search?url=" + imgUrlReplaceString},
|
||||||
WhatAnime: {value:true, name:"WhatAnime", url:"https://trace.moe/?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"}
|
Yandex: {value: true, name: "Yandex", url: "https: //yandex.com/images/search?url=" + imgUrlReplaceString + "&rpt=imageview"}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -243,7 +243,7 @@ module.exports = (_ => {
|
||||||
});
|
});
|
||||||
|
|
||||||
BDFDB.PatchUtils.patch(this, (BDFDB.ModuleUtils.findByName("renderImageComponent", false).exports || {}), "renderImageComponent", {after: e => {
|
BDFDB.PatchUtils.patch(this, (BDFDB.ModuleUtils.findByName("renderImageComponent", false).exports || {}), "renderImageComponent", {after: e => {
|
||||||
if (e.returnValue && e.returnValue.type && (e.returnValue.type.displayName == "LazyImageZoomable" || e.returnValue.type.displayName == "LazyImage") && e.methodArguments[0].original && e.methodArguments[0].src.indexOf("https://media.discordapp.net/attachments") == 0 && (e.methodArguments[0].className || "").indexOf(BDFDB.disCN.embedthumbnail) == -1) return this.injectImageDetails(e.methodArguments[0], e.returnValue);
|
if (e.returnValue && e.returnValue.type && (e.returnValue.type.displayName == "LazyImageZoomable" || e.returnValue.type.displayName == "LazyImage") && e.methodArguments[0].original && e.methodArguments[0].src.indexOf("https: //media.discordapp.net/attachments") == 0 && (e.methodArguments[0].className || "").indexOf(BDFDB.disCN.embedthumbnail) == -1) return this.injectImageDetails(e.methodArguments[0], e.returnValue);
|
||||||
}});
|
}});
|
||||||
|
|
||||||
this.forceUpdateAll();
|
this.forceUpdateAll();
|
||||||
|
@ -294,7 +294,7 @@ module.exports = (_ => {
|
||||||
children: [BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormTitle, {
|
children: [BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormTitle, {
|
||||||
className: BDFDB.disCN.marginbottom4,
|
className: BDFDB.disCN.marginbottom4,
|
||||||
tag: BDFDB.LibraryComponents.FormComponents.FormTitle.Tags.H3,
|
tag: BDFDB.LibraryComponents.FormComponents.FormTitle.Tags.H3,
|
||||||
children: "Add additional Context Menu Entry for:"
|
children: "Add additional Context Menu Entry for: "
|
||||||
})].concat(Object.keys(settings).map(key => this.defaults.settings[key].inner && BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
|
})].concat(Object.keys(settings).map(key => this.defaults.settings[key].inner && BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
|
||||||
type: "Switch",
|
type: "Switch",
|
||||||
plugin: this,
|
plugin: this,
|
||||||
|
@ -377,9 +377,9 @@ module.exports = (_ => {
|
||||||
let types = [];
|
let types = [];
|
||||||
let validUrls = urls.filter(n => this.isValidImg(n)).map(n => {
|
let validUrls = urls.filter(n => this.isValidImg(n)).map(n => {
|
||||||
let url = n.replace(/^url\(|\)$|"|'/g, "").replace(/\?size\=\d+$/, "?size=4096").replace(/[\?\&](height|width)=\d+/g, "");
|
let url = n.replace(/^url\(|\)$|"|'/g, "").replace(/\?size\=\d+$/, "?size=4096").replace(/[\?\&](height|width)=\d+/g, "");
|
||||||
if (url.indexOf("https://images-ext-1.discordapp.net/external/") > -1) {
|
if (url.indexOf("https: //images-ext-1.discordapp.net/external/") > -1) {
|
||||||
if (url.split("/https/").length > 1) url = "https://" + url.split("/https/").pop();
|
if (url.split("/https/").length > 1) url = "https: //" + url.split("/https/").pop();
|
||||||
else if (url.split("/http/").length > 1) url = "http://" + url.split("/http/").pop();
|
else if (url.split("/http/").length > 1) url = "http: //" + url.split("/http/").pop();
|
||||||
}
|
}
|
||||||
const file = url && (BDFDB.LibraryModules.URLParser.parse(url).pathname || "").toLowerCase();
|
const file = url && (BDFDB.LibraryModules.URLParser.parse(url).pathname || "").toLowerCase();
|
||||||
const type = file && file.split(".").pop();
|
const type = file && file.split(".").pop();
|
||||||
|
@ -437,11 +437,11 @@ module.exports = (_ => {
|
||||||
action: _ => {
|
action: _ => {
|
||||||
BDFDB.LibraryRequires.request(url, {encoding: null}, (error, response, body) => {
|
BDFDB.LibraryRequires.request(url, {encoding: null}, (error, response, body) => {
|
||||||
let path = this.getDownloadLocation();
|
let path = this.getDownloadLocation();
|
||||||
if (error) BDFDB.NotificationUtils.toast(this.labels.toast_saveimage_failed.replace("{{path}}", path), {type:"error"});
|
if (error) BDFDB.NotificationUtils.toast(this.labels.toast_saveimage_failed.replace("{{path}}", path), {type: "error"});
|
||||||
else {
|
else {
|
||||||
BDFDB.LibraryRequires.fs.writeFile(this.getFileName(path, url.split("/").pop().split(".").slice(0, -1).join("."), response.headers["content-type"].split("/").pop().split("+")[0], 0), body, error => {
|
BDFDB.LibraryRequires.fs.writeFile(this.getFileName(path, url.split("/").pop().split(".").slice(0, -1).join("."), response.headers["content-type"].split("/").pop().split("+")[0], 0), body, error => {
|
||||||
if (error) BDFDB.NotificationUtils.toast(this.labels.toast_saveimage_failed.replace("{{path}}", path), {type:"error"});
|
if (error) BDFDB.NotificationUtils.toast(this.labels.toast_saveimage_failed.replace("{{path}}", path), {type: "error"});
|
||||||
else BDFDB.NotificationUtils.toast(this.labels.toast_saveimage_success.replace("{{path}}", path), {type:"success"});
|
else BDFDB.NotificationUtils.toast(this.labels.toast_saveimage_success.replace("{{path}}", path), {type: "success"});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -530,7 +530,7 @@ module.exports = (_ => {
|
||||||
}, BDFDB.ObjectUtils.extract(this.defaults.zoomSettings[type], "digits", "minValue", "maxValue"))))
|
}, BDFDB.ObjectUtils.extract(this.defaults.zoomSettings[type], "digits", "minValue", "maxValue"))))
|
||||||
}));
|
}));
|
||||||
};
|
};
|
||||||
let isVideo = (typeof e.instance.props.children == "function" && e.instance.props.children(Object.assign({}, e.instance.props, {size: e.instance.props})) || {type:{}}).type.displayName == "Video";
|
let isVideo = (typeof e.instance.props.children == "function" && e.instance.props.children(Object.assign({}, e.instance.props, {size: e.instance.props})) || {type: {}}).type.displayName == "Video";
|
||||||
children[index] = BDFDB.ReactUtils.createElement("span", {
|
children[index] = BDFDB.ReactUtils.createElement("span", {
|
||||||
className: BDFDB.disCN._imageutilitiesoperations,
|
className: BDFDB.disCN._imageutilitiesoperations,
|
||||||
children: [
|
children: [
|
||||||
|
@ -737,13 +737,13 @@ module.exports = (_ => {
|
||||||
releasing();
|
releasing();
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
document.removeImageUtilitiesZoomObserver.observe(document.body, {subtree:true, childList:true});
|
document.removeImageUtilitiesZoomObserver.observe(document.body, {subtree: true, childList: true});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (e.returnvalue) {
|
else if (e.returnvalue) {
|
||||||
if (settings.showOnHover && e.instance.props.original && e.instance.props.src.indexOf("https://media.discordapp.net/attachments") == 0 && typeof e.returnvalue.props.children == "function") {
|
if (settings.showOnHover && e.instance.props.original && e.instance.props.src.indexOf("https: //media.discordapp.net/attachments") == 0 && typeof e.returnvalue.props.children == "function") {
|
||||||
let attachment = BDFDB.ReactUtils.findValue(e.instance, "attachment", {up:true});
|
let attachment = BDFDB.ReactUtils.findValue(e.instance, "attachment", {up: true});
|
||||||
if (attachment) {
|
if (attachment) {
|
||||||
let renderChildren = e.returnvalue.props.children;
|
let renderChildren = e.returnvalue.props.children;
|
||||||
e.returnvalue.props.children = (...args) => {
|
e.returnvalue.props.children = (...args) => {
|
||||||
|
@ -799,17 +799,17 @@ module.exports = (_ => {
|
||||||
|
|
||||||
isValidImg (url) {
|
isValidImg (url) {
|
||||||
const file = url && (BDFDB.LibraryModules.URLParser.parse(url).pathname || "").toLowerCase();
|
const file = url && (BDFDB.LibraryModules.URLParser.parse(url).pathname || "").toLowerCase();
|
||||||
return file && (url.startsWith("https://images-ext-2.discordapp.net/") || file.endsWith(".jpg") || file.endsWith(".jpeg") || file.endsWith(".png") || file.endsWith(".gif") || file.endsWith(".apng") || file.endsWith(".webp") || file.endsWith(".svg"));
|
return file && (url.startsWith("https: //images-ext-2.discordapp.net/") || file.endsWith(".jpg") || file.endsWith(".jpeg") || file.endsWith(".png") || file.endsWith(".gif") || file.endsWith(".apng") || file.endsWith(".webp") || file.endsWith(".svg"));
|
||||||
}
|
}
|
||||||
|
|
||||||
isCopyable (url) {
|
isCopyable (url) {
|
||||||
const file = url && (BDFDB.LibraryModules.URLParser.parse(url).pathname || "").toLowerCase();
|
const file = url && (BDFDB.LibraryModules.URLParser.parse(url).pathname || "").toLowerCase();
|
||||||
return file && (url.startsWith("https://images-ext-2.discordapp.net/") || file.endsWith(".jpg") || file.endsWith(".jpeg") || file.endsWith(".png"));
|
return file && (url.startsWith("https: //images-ext-2.discordapp.net/") || file.endsWith(".jpg") || file.endsWith(".jpeg") || file.endsWith(".png"));
|
||||||
}
|
}
|
||||||
|
|
||||||
isSearchable (url) {
|
isSearchable (url) {
|
||||||
const file = url && (BDFDB.LibraryModules.URLParser.parse(url).pathname || "").toLowerCase();
|
const file = url && (BDFDB.LibraryModules.URLParser.parse(url).pathname || "").toLowerCase();
|
||||||
return file && (url.startsWith("https://images-ext-2.discordapp.net/") || file.endsWith(".jpg") || file.endsWith(".jpeg") || file.endsWith(".png") || file.endsWith(".gif") || file.endsWith(".apng") || file.endsWith(".webp"));
|
return file && (url.startsWith("https: //images-ext-2.discordapp.net/") || file.endsWith(".jpg") || file.endsWith(".jpeg") || file.endsWith(".png") || file.endsWith(".gif") || file.endsWith(".apng") || file.endsWith(".webp"));
|
||||||
}
|
}
|
||||||
|
|
||||||
downloadImage (url) {
|
downloadImage (url) {
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
# Image Utilities - [![Downlad][download-badge]][download-link] [![Paypal][paypal-badge]][paypal-link] [![Patreon][patreon-badge]][patreon-link]
|
# Image Utilities - [![Downlad][download-badge]][download-link] [![Paypal][paypal-badge]][paypal-link] [![Patreon][patreon-badge]][patreon-link]
|
||||||
|
|
||||||
[download-badge]: https://img.shields.io/badge/Download-Plugin-brightgreen.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAQAAAAAYLlVAAAACXBIWXMAAA7EAAAOxAGVKw4bAAADGGlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjaY2BgnuDo4uTKJMDAUFBUUuQe5BgZERmlwH6egY2BmYGBgYGBITG5uMAxIMCHgYGBIS8/L5UBFTAyMHy7xsDIwMDAcFnX0cXJlYE0wJpcUFTCwMBwgIGBwSgltTiZgYHhCwMDQ3p5SUEJAwNjDAMDg0hSdkEJAwNjAQMDg0h2SJAzAwNjCwMDE09JakUJAwMDg3N+QWVRZnpGiYKhpaWlgmNKflKqQnBlcUlqbrGCZ15yflFBflFiSWoKAwMD1A4GBgYGXpf8EgX3xMw8BSMDVQYqg4jIKAUICxE+CDEESC4tKoMHJQODAIMCgwGDA0MAQyJDPcMChqMMbxjFGV0YSxlXMN5jEmMKYprAdIFZmDmSeSHzGxZLlg6WW6x6rK2s99gs2aaxfWMPZ9/NocTRxfGFM5HzApcj1xZuTe4FPFI8U3mFeCfxCfNN45fhXyygI7BD0FXwilCq0A/hXhEVkb2i4aJfxCaJG4lfkaiQlJM8JpUvLS19QqZMVl32llyfvIv8H4WtioVKekpvldeqFKiaqP5UO6jepRGqqaT5QeuA9iSdVF0rPUG9V/pHDBYY1hrFGNuayJsym740u2C+02KJ5QSrOutcmzjbQDtXe2sHY0cdJzVnJRcFV3k3BXdlD3VPXS8Tbxsfd99gvwT//ID6wIlBS4N3hVwMfRnOFCEXaRUVEV0RMzN2T9yDBLZE3aSw5IaUNak30zkyLDIzs+ZmX8xlz7PPryjYVPiuWLskq3RV2ZsK/cqSql01jLVedVPrHzbqNdU0n22VaytsP9op3VXUfbpXta+x/+5Em0mzJ/+dGj/t8AyNmf2zvs9JmHt6vvmCpYtEFrcu+bYsc/m9lSGrTq9xWbtvveWGbZtMNm/ZarJt+w6rnft3u+45uy9s/4ODOYd+Hmk/Jn58xUnrU+fOJJ/9dX7SRe1LR68kXv13fc5Nm1t379TfU75/4mHeY7En+59lvhB5efB1/lv5dxc+NH0y/fzq64Lv4T8Ffp360/rP8f9/AA0ADzT6lvFdAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAF1SURBVHja7JihTgNBEIb/K1WkBtEEAsESBKEvgEKRAhLHOxAMfQ9cHwEMBoFA1/ACBEGgzbkmUAwI+BENubTs9WZmLz1CZtZd9v7/u9vMZGdAGFabA05Hn3sWrYQwRB9rwafreikbQN5LiV6qhorDARzAARzAARzAARzAARzAARygGOAQ6a+GLr9jmlwpDuJbsxQrER+YYrXaI2D8EZyAEfangj2Fq0NrnBWry8YI5yb7rkRbBrDAK7X9NevlAYCL7Kns79iQKcunOU0+iO0fuSzV1QyUNjkU2b9wS66qm2nt8L3Q/oO7Gk3tWO2InzPtv3isU9RP9jqxmR8LMKsqdPVqFoC8qiDM/HiAcFUQZ34IYDr0VUGW+QEfK8BkVZBmfqkAWVWQZ37JAOA+n/nEtnh/wGd8JWP81Nt0P0r8Wu4ADvAHAOq2fsaP4N8BvFXi/ZoB3FYCcJMNKDbQw9Kc7YdoYfDzB+6xjUuM5mY+wsXYHvgeABIzsPkSOM/lAAAAAElFTkSuQmCC&style=flat
|
[download-badge]: https: //img.shields.io/badge/Download-Plugin-brightgreen.svg?logo=data: image/png;base64,iVBOR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HeY7En+59lvhB5efB1/lv5dxc+NH0y/fzq64Lv4T8Ffp360/rP8f9/AA0ADzT6lvFdAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAF1SURBVHja7JihTgNBEIb/K1WkBtEEAsESBKEvgEKRAhLHOxAMfQ9cHwEMBoFA1/ACBEGgzbkmUAwI+BENubTs9WZmLz1CZtZd9v7/u9vMZGdAGFabA05Hn3sWrYQwRB9rwafreikbQN5LiV6qhorDARzAARzAARzAARzAARzAARygGOAQ6a+GLr9jmlwpDuJbsxQrER+YYrXaI2D8EZyAEfangj2Fq0NrnBWry8YI5yb7rkRbBrDAK7X9NevlAYCL7Kns79iQKcunOU0+iO0fuSzV1QyUNjkU2b9wS66qm2nt8L3Q/oO7Gk3tWO2InzPtv3isU9RP9jqxmR8LMKsqdPVqFoC8qiDM/HiAcFUQZ34IYDr0VUGW+QEfK8BkVZBmfqkAWVWQZ37JAOA+n/nEtnh/wGd8JWP81Nt0P0r8Wu4ADvAHAOq2fsaP4N8BvFXi/ZoB3FYCcJMNKDbQw9Kc7YdoYfDzB+6xjUuM5mY+wsXYHvgeABIzsPkSOM/lAAAAAElFTkSuQmCC&style=flat
|
||||||
[download-link]: https://betterdiscord.net/ghdl?url=https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/ImageUtilities/ImageUtilities.plugin.js
|
[download-link]: https: //betterdiscord.net/ghdl?url=https: //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/ImageUtilities/ImageUtilities.plugin.js
|
||||||
|
|
||||||
[paypal-badge]: https://img.shields.io/badge/Paypal-Donate!-%23003087.svg?logo=paypal&style=flat
|
[paypal-badge]: https: //img.shields.io/badge/Paypal-Donate!-%23003087.svg?logo=paypal&style=flat
|
||||||
[paypal-link]: https://paypal.me/MircoWittrien
|
[paypal-link]: https: //paypal.me/MircoWittrien
|
||||||
|
|
||||||
[patreon-badge]: https://img.shields.io/badge/Patreon-Support!-%23F96854.svg?logo=patreon&style=flat
|
[patreon-badge]: https: //img.shields.io/badge/Patreon-Support!-%23F96854.svg?logo=patreon&style=flat
|
||||||
[patreon-link]: https://patreon.com/MircoWittrien
|
[patreon-link]: https: //patreon.com/MircoWittrien
|
||||||
|
|
||||||
Add a handful of options for images/emotes/avatars (direct download, reverse image search, zoom, copy image link, copy image to clipboard, gallery mode)
|
Add a handful of options for images/emotes/avatars (direct download, reverse image search, zoom, copy image link, copy image to clipboard, gallery mode)
|
||||||
|
|
|
@ -31,7 +31,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
|
|
@ -31,7 +31,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
|
|
@ -30,7 +30,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
|
|
@ -35,7 +35,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
|
|
@ -26,7 +26,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
|
|
@ -31,7 +31,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
|
|
@ -31,7 +31,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
|
|
@ -31,7 +31,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
|
|
@ -31,7 +31,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
|
|
@ -26,7 +26,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
|
|
@ -31,7 +31,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
@ -59,11 +59,11 @@ module.exports = (_ => {
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.defaults = {
|
this.defaults = {
|
||||||
settings: {
|
settings: {
|
||||||
addClearButton: {value:true, inner:false, description:"Add a 'Clear Mentions' button to the recent mentions popout"},
|
addClearButton: {value: true, inner: false, description: "Add a 'Clear Mentions' button to the recent mentions popout"},
|
||||||
confirmClear: {value:false, inner:false, description:"Ask for your confirmation before clearing reads"},
|
confirmClear: {value: false, inner: false, description: "Ask for your confirmation before clearing reads"},
|
||||||
includeGuilds: {value:true, inner:true, description:"unread Servers"},
|
includeGuilds: {value: true, inner: true, description: "unread Servers"},
|
||||||
includeMuted: {value:false, inner:true, description:"muted unread Servers"},
|
includeMuted: {value: false, inner: true, description: "muted unread Servers"},
|
||||||
includeDMs: {value:false, inner:true, description:"unread DMs"}
|
includeDMs: {value: false, inner: true, description: "unread DMs"}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -328,7 +328,7 @@ module.exports = (_ => {
|
||||||
let messages = [].concat(e.instance.props.messages).filter(n => n);
|
let messages = [].concat(e.instance.props.messages).filter(n => n);
|
||||||
if (messages.length) {
|
if (messages.length) {
|
||||||
clearing = true;
|
clearing = true;
|
||||||
let toast = BDFDB.NotificationUtils.toast("Clearing all recent mentions, please wait...", {timeout:0});
|
let toast = BDFDB.NotificationUtils.toast("Clearing all recent mentions, please wait...", {timeout: 0});
|
||||||
for (let i = 0; i < messages.length; i++) BDFDB.TimeUtils.timeout(_ => {
|
for (let i = 0; i < messages.length; i++) BDFDB.TimeUtils.timeout(_ => {
|
||||||
BDFDB.LibraryModules.RecentMentionUtils.deleteRecentMention(messages[i].id);
|
BDFDB.LibraryModules.RecentMentionUtils.deleteRecentMention(messages[i].id);
|
||||||
if (i == messages.length - 1) {
|
if (i == messages.length - 1) {
|
||||||
|
|
|
@ -35,7 +35,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
|
|
@ -31,7 +31,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
|
|
@ -26,7 +26,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
|
|
@ -26,7 +26,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
|
|
@ -31,7 +31,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
|
|
@ -26,7 +26,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
|
|
@ -26,7 +26,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
|
|
@ -31,7 +31,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
|
|
@ -31,7 +31,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
|
|
@ -25,7 +25,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
|
|
@ -26,7 +26,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
|
|
@ -26,7 +26,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
|
|
@ -31,7 +31,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
|
|
@ -31,7 +31,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
|
|
@ -26,7 +26,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
|
|
@ -30,7 +30,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
|
|
@ -26,7 +26,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
|
|
@ -26,7 +26,7 @@ module.exports = (_ => {
|
||||||
getDescription () {return config.info.description;}
|
getDescription () {return config.info.description;}
|
||||||
|
|
||||||
load() {
|
load() {
|
||||||
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue:[]});
|
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
|
||||||
if (!window.BDFDB_Global.downloadModal) {
|
if (!window.BDFDB_Global.downloadModal) {
|
||||||
window.BDFDB_Global.downloadModal = true;
|
window.BDFDB_Global.downloadModal = true;
|
||||||
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
BdApi.showConfirmationModal("Library Missing", `The library plugin needed for ${config.info.name} is missing. Please click "Download Now" to install it.`, {
|
||||||
|
|
Loading…
Reference in New Issue