Lib
This commit is contained in:
parent
45d97c30af
commit
7fd7c78c10
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,14 @@
|
|||
//META{"name":"RepoControls"}*//
|
||||
|
||||
class RepoControls {
|
||||
getName () {return "RepoControls";}
|
||||
|
||||
getVersion () {return "1.2.4";}
|
||||
|
||||
getAuthor () {return "DevilBro";}
|
||||
|
||||
getDescription () {return "Lets you sort and filter your list of downloaded Themes and Plugins.";}
|
||||
|
||||
initConstructor () {
|
||||
this.patchModules = {
|
||||
"V2C_List":"componentDidMount",
|
||||
|
@ -108,14 +116,6 @@ class RepoControls {
|
|||
};
|
||||
}
|
||||
|
||||
getName () {return "RepoControls";}
|
||||
|
||||
getDescription () {return "Lets you sort and filter your list of downloaded Themes and Plugins.";}
|
||||
|
||||
getVersion () {return "1.2.4";}
|
||||
|
||||
getAuthor () {return "DevilBro";}
|
||||
|
||||
getSettingsPanel () {
|
||||
if (!this.started || typeof BDFDB !== "object") return;
|
||||
let settings = BDFDB.getAllData(this, "settings");
|
||||
|
@ -281,6 +281,7 @@ class RepoControls {
|
|||
|
||||
container.entries = {};
|
||||
for (let li of container.children) {
|
||||
if (li.querySelector(BDFDB.dotCN._reponame)) {
|
||||
let name = li.querySelector(BDFDB.dotCN._reponame).textContent;
|
||||
let version = li.querySelector(BDFDB.dotCN._repoversion).textContent;
|
||||
let author = li.querySelector(BDFDB.dotCN._repoauthor).textContent;
|
||||
|
@ -302,6 +303,7 @@ class RepoControls {
|
|||
enabled: enabled ? 0 : 1
|
||||
};
|
||||
}
|
||||
}
|
||||
this.sortEntries(container, repoControls);
|
||||
}
|
||||
|
||||
|
@ -340,9 +342,10 @@ class RepoControls {
|
|||
for (let ele of wrapper.querySelectorAll(BDFDB.dotCNC._reponame + BDFDB.dotCNC._repoversion + BDFDB.dotCNC._repoauthor + BDFDB.dotCN._repodescription)) {
|
||||
if (ele.classList.contains(BDFDB.disCN._repodescription)) {
|
||||
ele.style.display = "block";
|
||||
ele.innerHTML = BDFDB.highlightText(ele.innerText, searchstring);
|
||||
if (searchstring && searchstring.length > 2) ele.innerHTML = BDFDB.highlightText(ele.innerText, searchstring);
|
||||
else ele.innerHTML = ele.innerText;
|
||||
}
|
||||
else if (searchstring || ele.querySelector(".highlight")) ele.innerHTML = BDFDB.highlightText(ele.innerText, searchstring);
|
||||
else if (searchstring && searchstring.length > 2 || ele.querySelector(BDFDB.dotCN.highlight)) ele.innerHTML = BDFDB.highlightText(ele.innerText, searchstring);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue