Update 0BDFDB.plugin.js
This commit is contained in:
parent
5a40615eda
commit
013fd1c547
|
@ -5,7 +5,7 @@ module.exports = (_ => {
|
|||
"info": {
|
||||
"name": "BDFDB",
|
||||
"author": "DevilBro",
|
||||
"version": "1.0.5",
|
||||
"version": "1.0.6",
|
||||
"description": "Gives other plugins utility functions."
|
||||
},
|
||||
"rawUrl": "https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js",
|
||||
|
@ -3598,6 +3598,11 @@ module.exports = (_ => {
|
|||
});
|
||||
return string || original;
|
||||
};
|
||||
BDFDB.StringUtils.findMatchCaseless = function (match, string) {
|
||||
if (typeof match != "string" || typeof string != "string") return "";
|
||||
let exec = (new RegExp(`([\n\r\s]+${match}[\n\r\s]+)|([\n\r\s]+${match}$)|(^${match}[\n\r\s]+)|(^${match}$)`, "i")).exec(string);
|
||||
return exec && typeof exec[0] == "string" && exec[0].replace(/[\n\r\s]/g, "") || "";
|
||||
};
|
||||
BDFDB.StringUtils.extractSelection = function (original, selection) {
|
||||
if (typeof original != "string") return "";
|
||||
if (typeof selection != "string") return original;
|
||||
|
|
Loading…
Reference in New Issue