Untitled
unknown
plain_text
2 years ago
1.2 kB
12
Indexable
(function () { try { /* main variables */ var debug = 0; var variation_name = ""; /* all Pure helper functions */ function waitForElement(selector, trigger, delayInterval, delayTimeout) { var interval = setInterval(function () { if ( document && document.querySelector(selector) && document.querySelectorAll(selector).length > 0 ) { clearInterval(interval); trigger(); } }, delayInterval); setTimeout(function () { clearInterval(interval); }, delayTimeout); } /* Variation functions */ function init(){ const eg_links = document.querySelector("#level-2-1").children; for (const link of eg_links) { link.addEventListener("click", () => { window.location.href = link.children[0].href; }); } } /* Initialize variation */ waitForElement("body > div > div > nav.navbar", init, 50, 15000); } catch (e) { if (debug) console.log(e, "error in Test" + variation_name); } })(); body > div > div > nav.navbar{ position: fixed !important; z-index: 999999 !important; }
Editor is loading...