stuff
This commit is contained in:
parent
4174005df9
commit
c7fc9d1194
|
@ -486,4 +486,6 @@ var ChatFilter = (_ => {
|
|||
BDFDB.ModuleUtils.forceAllUpdates(this);
|
||||
}
|
||||
}
|
||||
})();
|
||||
})();
|
||||
|
||||
module.exports = ChatFilter;
|
|
@ -1,4 +1,4 @@
|
|||
//META{"name":"CopyRawMessage","authorId":"278543574059057154","invite":"Jx3TjNS","donate":"https://www.paypal.me/MircoWittrien","patreon":"https://www.patreon.com/MircoWittrien","website":"https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/CopyRawMessage","source":"https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/CopyRawMessage/CopyRawMessage.plugin.js"}*//
|
||||
//META{"name":"CopyRawMessage","authorId":"278543574059057154","invite":"Jx3TjNS","donate":"https://www.paypal.me/MircoWittrien","patreon":"https://www.patreon.com/MircoWittrien","website":"https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/CopyRawMessage","source":"https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/CopyRawMessage/CopyRawMessage.plugin.js"}*//
|
||||
|
||||
var CopyRawMessage = (_ => {
|
||||
var settings = {};
|
||||
|
|
|
@ -767,4 +767,6 @@ var EditChannels = (_ => {
|
|||
}
|
||||
}
|
||||
}
|
||||
})();
|
||||
})();
|
||||
|
||||
module.exports = EditChannels;
|
|
@ -1076,4 +1076,6 @@ var EditServers = (_ => {
|
|||
}
|
||||
}
|
||||
}
|
||||
})();
|
||||
})();
|
||||
|
||||
module.exports = EditServers;
|
|
@ -1752,3 +1752,5 @@ var EditUsers = (_ => {
|
|||
}
|
||||
}
|
||||
})();
|
||||
|
||||
module.exports = EditUsers;
|
|
@ -674,3 +674,5 @@ var FriendNotifications = (_ => {
|
|||
}
|
||||
}
|
||||
})();
|
||||
|
||||
module.exports = FriendNotifications;
|
|
@ -1088,4 +1088,6 @@ var GoogleTranslateOption = (_ => {
|
|||
}
|
||||
}
|
||||
}
|
||||
})();
|
||||
})();
|
||||
|
||||
module.exports = GoogleTranslateOption;
|
|
@ -611,4 +611,6 @@ var NotificationSounds = (_ => {
|
|||
BDFDB.TimeUtils.timeout(_ => {firedEvents[type] = false;},3000);
|
||||
}
|
||||
}
|
||||
})();
|
||||
})();
|
||||
|
||||
module.exports = NotificationSounds;
|
|
@ -889,4 +889,6 @@ var PersonalPins = (_ => {
|
|||
}
|
||||
}
|
||||
}
|
||||
})();
|
||||
})();
|
||||
|
||||
module.exports = PersonalPins;
|
|
@ -1143,4 +1143,6 @@ var PinDMs = (_ => {
|
|||
}
|
||||
}
|
||||
}
|
||||
})();
|
||||
})();
|
||||
|
||||
module.exports = PinDMs;
|
|
@ -1,4 +1,4 @@
|
|||
//META{"name":"PluginRepo","authorId":"278543574059057154","invite":"Jx3TjNS","donate":"https://www.paypal.me/MircoWittrien","patreon":"https://www.patreon.com/MircoWittrien","website":"https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/PluginRepo","source":"https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/PluginRepo/PluginRepo.plugin.js"}*//
|
||||
//META{"name":"PluginRepo","authorId":"278543574059057154","invite":"Jx3TjNS","donate":"https://www.paypal.me/MircoWittrien","patreon":"https://www.patreon.com/MircoWittrien","website":"https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/PluginRepo","source":"https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/PluginRepo/PluginRepo.plugin.js"}*//
|
||||
|
||||
var PluginRepo = (_ => {
|
||||
var loading, cachedPlugins, grabbedPlugins, foundPlugins, loadedPlugins, updateInterval;
|
||||
|
|
|
@ -1685,3 +1685,5 @@ var ServerFolders = (_ => {
|
|||
}
|
||||
}
|
||||
})();
|
||||
|
||||
module.exports = ServerFolders;
|
|
@ -631,4 +631,6 @@ var ShowHiddenChannels = (_ => {
|
|||
}
|
||||
}
|
||||
}
|
||||
})();
|
||||
})();
|
||||
|
||||
module.exports = ShowHiddenChannels;
|
|
@ -233,5 +233,4 @@ var ShowImageDetails = (_ => {
|
|||
}
|
||||
})();
|
||||
|
||||
|
||||
module.exports = ShowImageDetails;
|
|
@ -589,4 +589,6 @@ var SpellCheck = (_ => {
|
|||
}
|
||||
}
|
||||
}
|
||||
})();
|
||||
})();
|
||||
|
||||
module.exports = SpellCheck;
|
|
@ -644,4 +644,6 @@ var SpotifyControls = (_ => {
|
|||
BDFDB.ModuleUtils.forceAllUpdates(this);
|
||||
}
|
||||
}
|
||||
})();
|
||||
})();
|
||||
|
||||
module.exports = SpotifyControls;
|
|
@ -1047,4 +1047,6 @@ var ThemeRepo = (_ => {
|
|||
}
|
||||
}
|
||||
}
|
||||
})();
|
||||
})();
|
||||
|
||||
module.exports = ThemeRepo;
|
|
@ -1,84 +1,88 @@
|
|||
//META{"name":"WriteUpperCase","authorId":"278543574059057154","invite":"Jx3TjNS","donate":"https://www.paypal.me/MircoWittrien","patreon":"https://www.patreon.com/MircoWittrien","website":"https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/WriteUpperCase","source":"https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/WriteUpperCase/WriteUpperCase.plugin.js"}*//
|
||||
|
||||
class WriteUpperCase {
|
||||
getName () {return "WriteUpperCase";}
|
||||
var WriteUpperCase = (_ => {
|
||||
return class WriteUpperCase {
|
||||
getName () {return "WriteUpperCase";}
|
||||
|
||||
getVersion () {return "1.2.5";}
|
||||
getVersion () {return "1.2.5";}
|
||||
|
||||
getAuthor () {return "DevilBro";}
|
||||
getAuthor () {return "DevilBro";}
|
||||
|
||||
getDescription () {return "Change input to uppercase.";}
|
||||
getDescription () {return "Change input to uppercase.";}
|
||||
|
||||
constructor () {
|
||||
this.changelog = {
|
||||
"fixed":[["New WYSIWYG Textarea","Fixed for the new WYSIWYG Textarea that is hidden by experiments"]],
|
||||
"improved":[["New Library Structure & React","Restructured my Library and switched to React rendering instead of DOM manipulation"]]
|
||||
};
|
||||
|
||||
this.patchedModules = {
|
||||
before: {
|
||||
ChannelEditorContainer: "render"
|
||||
constructor () {
|
||||
this.changelog = {
|
||||
"fixed":[["New WYSIWYG Textarea","Fixed for the new WYSIWYG Textarea that is hidden by experiments"]],
|
||||
"improved":[["New Library Structure & React","Restructured my Library and switched to React rendering instead of DOM manipulation"]]
|
||||
};
|
||||
|
||||
this.patchedModules = {
|
||||
before: {
|
||||
ChannelEditorContainer: "render"
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
load () {}
|
||||
|
||||
start () {
|
||||
if (!window.BDFDB) window.BDFDB = {myPlugins:{}};
|
||||
if (window.BDFDB && window.BDFDB.myPlugins && typeof window.BDFDB.myPlugins == "object") window.BDFDB.myPlugins[this.getName()] = this;
|
||||
let libraryScript = document.querySelector("head script#BDFDBLibraryScript");
|
||||
if (!libraryScript || (performance.now() - libraryScript.getAttribute("date")) > 600000) {
|
||||
if (libraryScript) libraryScript.remove();
|
||||
libraryScript = document.createElement("script");
|
||||
libraryScript.setAttribute("id", "BDFDBLibraryScript");
|
||||
libraryScript.setAttribute("type", "text/javascript");
|
||||
libraryScript.setAttribute("src", "https://mwittrien.github.io/BetterDiscordAddons/Plugins/BDFDB.min.js");
|
||||
libraryScript.setAttribute("date", performance.now());
|
||||
libraryScript.addEventListener("load", _ => {this.initialize();});
|
||||
document.head.appendChild(libraryScript);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
load () {}
|
||||
|
||||
start () {
|
||||
if (!window.BDFDB) window.BDFDB = {myPlugins:{}};
|
||||
if (window.BDFDB && window.BDFDB.myPlugins && typeof window.BDFDB.myPlugins == "object") window.BDFDB.myPlugins[this.getName()] = this;
|
||||
let libraryScript = document.querySelector("head script#BDFDBLibraryScript");
|
||||
if (!libraryScript || (performance.now() - libraryScript.getAttribute("date")) > 600000) {
|
||||
if (libraryScript) libraryScript.remove();
|
||||
libraryScript = document.createElement("script");
|
||||
libraryScript.setAttribute("id", "BDFDBLibraryScript");
|
||||
libraryScript.setAttribute("type", "text/javascript");
|
||||
libraryScript.setAttribute("src", "https://mwittrien.github.io/BetterDiscordAddons/Plugins/BDFDB.min.js");
|
||||
libraryScript.setAttribute("date", performance.now());
|
||||
libraryScript.addEventListener("load", _ => {this.initialize();});
|
||||
document.head.appendChild(libraryScript);
|
||||
else if (window.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) this.initialize();
|
||||
this.startTimeout = setTimeout(_ => {
|
||||
try {return this.initialize();}
|
||||
catch (err) {console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not initiate plugin! " + err);}
|
||||
}, 30000);
|
||||
}
|
||||
else if (window.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) this.initialize();
|
||||
this.startTimeout = setTimeout(_ => {
|
||||
try {return this.initialize();}
|
||||
catch (err) {console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not initiate plugin! " + err);}
|
||||
}, 30000);
|
||||
}
|
||||
|
||||
initialize () {
|
||||
if (window.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
|
||||
if (this.started) return;
|
||||
BDFDB.PluginUtils.init(this);
|
||||
initialize () {
|
||||
if (window.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
|
||||
if (this.started) return;
|
||||
BDFDB.PluginUtils.init(this);
|
||||
|
||||
BDFDB.ModuleUtils.forceAllUpdates(this);
|
||||
BDFDB.ModuleUtils.forceAllUpdates(this);
|
||||
}
|
||||
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
|
||||
}
|
||||
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
|
||||
}
|
||||
|
||||
stop () {
|
||||
if (window.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
|
||||
this.stopping = true;
|
||||
stop () {
|
||||
if (window.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
|
||||
this.stopping = true;
|
||||
|
||||
BDFDB.PluginUtils.clear(this);
|
||||
BDFDB.PluginUtils.clear(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Begin of own functions
|
||||
// Begin of own functions
|
||||
|
||||
processChannelEditorContainer (e) {
|
||||
if (e.instance.props.textValue && e.instance.state.focused) {
|
||||
let string = e.instance.props.textValue;
|
||||
if (string.length > 0) {
|
||||
let newstring = string;
|
||||
let first = string.charAt(0);
|
||||
if (first === first.toUpperCase() && (string.toLowerCase().indexOf("http") == 0 || string.toLowerCase().indexOf("s/") == 0)) newstring = string.charAt(0).toLowerCase() + string.slice(1);
|
||||
else if (first === first.toLowerCase() && first !== first.toUpperCase() && string.toLowerCase().indexOf("http") != 0 && string.toLowerCase().indexOf("s/") != 0) newstring = string.charAt(0).toUpperCase() + string.slice(1);
|
||||
if (string != newstring) {
|
||||
e.instance.props.textValue = newstring;
|
||||
if (e.instance.props.richValue) e.instance.props.richValue = BDFDB.SlateUtils.copyRichValue(newstring, e.instance.props.richValue);
|
||||
processChannelEditorContainer (e) {
|
||||
if (e.instance.props.textValue && e.instance.state.focused) {
|
||||
let string = e.instance.props.textValue;
|
||||
if (string.length > 0) {
|
||||
let newstring = string;
|
||||
let first = string.charAt(0);
|
||||
if (first === first.toUpperCase() && (string.toLowerCase().indexOf("http") == 0 || string.toLowerCase().indexOf("s/") == 0)) newstring = string.charAt(0).toLowerCase() + string.slice(1);
|
||||
else if (first === first.toLowerCase() && first !== first.toUpperCase() && string.toLowerCase().indexOf("http") != 0 && string.toLowerCase().indexOf("s/") != 0) newstring = string.charAt(0).toUpperCase() + string.slice(1);
|
||||
if (string != newstring) {
|
||||
e.instance.props.textValue = newstring;
|
||||
if (e.instance.props.richValue) e.instance.props.richValue = BDFDB.SlateUtils.copyRichValue(newstring, e.instance.props.richValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})();
|
||||
|
||||
module.exports = WriteUpperCase;
|
Loading…
Reference in New Issue