zombie-globbies
Version:
A very quick fix for [**Zombie**](https://github.com/assaf/zombie) to permit to crawl correctly webpages with attributes on the html tag (eg: html lang="en").
34 lines (33 loc) • 901 B
HTML
<html>
<head>
<script>
function subst() {
var vars={};
var x=document.location.search.substring(1).split('&');
for(var i in x) {var z=x[i].split('=',2);vars[z[0]] = unescape(z[1]);}
var x=['frompage','topage','page','webpage','section','subsection','subsubsection'];
for(var i in x) {
var y = document.getElementsByClassName(x[i]);
for(var j=0; j<y.length; ++j) y[j].textContent = vars[x[i]];
}
}
</script>
<style>
body { margin: 0; padding: 0; height: 2em }
.header {
font-size: 10pt;
margin: 0;
padding: 0;
width: 100%;
}
</style>
</head>
<body onload="subst()">
<table class="header">
<tr>
<td class="section"></td>
<td style="text-align:right"><span class="page"></span></td>
</tr>
</table>
</body>
</html>