User:Bop34/Userscripts/sandbox.js

function wait(ms) { var d = new Date; var d2 = null; do { d2 = new Date; } while(d2-d < ms); }

function autodesc { if(document.getElementById("sdh").innerHTML.includes('Import')){ alert("Wikidata description avalible"); } else { alert("Nothing importable"); if (document.URL!='https://en.wikipedia.org/w/index.php?title=User:Bop34/Userscripts/sandbox.js') { window.location = 'https://en.wikipedia.org/wiki/Special:Random'; }   } }

window.addEventListener('load', function {  console.log("Loaded");  wait("1000");  autodesc; });