blankx.gitlab.io/public/toc.js

10 lines
1.0 KiB
JavaScript

var cururl = window.location.href;
var toccon = "<p>sensible-browser file:///blankx/{{<a href='index.html'>index</a>,<a href='contact.html'>contact</a>,<a href='get-keys.html'>get-keys</a>,<a href='template.html'>template</a>,<a href='404.html'>404</a>,<a href='403.html'>403</a>,<a href='toc.html'>toc</a>,<a href='quotes.html'>quotes</a>,<a href='friends.html'>friends</a>}.html,redir/{<a href='redir/blankx'>blankx</a>,<a href='redir/dotfiles'>dotfiles</a>,<a href='redir/gpgp'>gpgp</a>,<a href='redir/controller'>controller</a>,<a href='redir/command-runner'>command-runner</a>,<a href='redir/vsd'>vsd</a>,<a href='redir/keybase-public'>keybase-public</a>},<a href='keybase.txt'>keybase.txt</a>,<a href='jack.png'>jack.png</a>,<a href='toc.js'>toc.js</a>,<a href='index.css'>index.css</a>}</p>";
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;
}