var cururl = window.location.href; var toccon = "
sensible-browser file:///blankx/{{index,contact,get-keys,template,404,403,toc,quotes,friends}.html,redir/{blankx,dotfiles,gpgp,controller,command-runner,vsd,keybase-public},keybase.txt,jack.png,toc.js,index.css}
"; if (cururl.indexOf('redir') >= 0) { var tocconf = toccon.replace(/href../ig, "href='../"); console.log(tocconf); document.getElementById("tocid").innerHTML = tocconf; } else { document.getElementById("tocid").innerHTML = toccon; }