mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-04 20:46:39 +02:00
parent
2271477376
commit
5513bcbb61
4 changed files with 50 additions and 9 deletions
|
@ -176,11 +176,15 @@
|
|||
search.init()
|
||||
)
|
||||
);
|
||||
const searchOnly = window.location.search === "?searchOnly";
|
||||
if (searchOnly){
|
||||
document.body.classList.add("searching");
|
||||
}
|
||||
search.on(function({search, results, lastResults}){
|
||||
lastResults.forEach(function(node){
|
||||
node.classList.remove("found");
|
||||
});
|
||||
if (search){
|
||||
if (search || searchOnly){
|
||||
document.body.classList.add("searching");
|
||||
results.forEach(function(node){
|
||||
node.classList.add("found");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue