Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0

Remove useless JS code

Cette révision appartient à :
kipukun 2017-05-06 21:26:13 -04:00
Parent 8f964371a4
révision 3c7492aca1

Voir le fichier

@ -1,40 +1,3 @@
var pathArray = window.location.pathname.split( '/' );
var query = window.location.search;
var page = parseInt(pathArray[2]);
var pageString = "/page/";
var next = page + 1;
var prev = page - 1;
if (prev < 1) {
prev = 1;
}
if (isNaN(page)) {
next = 2;
prev = 1;
}
if (query != "") {
pageString = "/search/";
}
var maxId = 5;
for (var i = 0; i < maxId; i++) {
var el = document.getElementById('page-' + i), n = prev + i;
if (el == null)
continue;
el.href = pageString + n + query;
el.innerHTML = n;
}
var e = document.getElementById('page-next');
if (e != null)
e.href = pageString + next + query;
var e = document.getElementById('page-prev');
if (e != null)
e.href = pageString + prev + query;
// Used by spoiler tags
function toggleLayer(elem) {
if (elem.classList.contains("hide"))