Update RepoControls.plugin.js
This commit is contained in:
parent
953846cb27
commit
b3c765c266
|
@ -336,9 +336,8 @@ class RepoControls {
|
||||||
}
|
}
|
||||||
|
|
||||||
changeTextToHTML (wrapper, searchstring) {
|
changeTextToHTML (wrapper, searchstring) {
|
||||||
if (!wrapper || !wrapper.tagName) return;
|
if (!wrapper || !wrapper.tagName || !searchstring) return;
|
||||||
if (typeof searchstring === "undefined") searchstring = document.querySelector(".repo-controls " + BDFDB.dotCN.searchbarinput).value.replace(/[<|>]/g, "").toUpperCase();
|
wrapper.querySelectorAll(BDFDB.dotCNC._reponame + BDFDB.dotCNC._repoversion + BDFDB.dotCNC._repoauthor + BDFDB.dotCN._repodescription).forEach(ele => {
|
||||||
if (searchstring) wrapper.querySelectorAll(BDFDB.dotCNC._reponame + BDFDB.dotCNC._repoversion + BDFDB.dotCNC._repoauthor + BDFDB.dotCN._repodescription).forEach(ele => {
|
|
||||||
if (ele.classList.contains(BDFDB.disCN._repodescription)) ele.style.display = "block";
|
if (ele.classList.contains(BDFDB.disCN._repodescription)) ele.style.display = "block";
|
||||||
ele.innerHTML = BDFDB.highlightText(ele.innerText, searchstring);
|
ele.innerHTML = BDFDB.highlightText(ele.innerText, searchstring);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue