Skip to content

Instantly share code, notes, and snippets.

@bogdan-nourescu
Created September 26, 2014 10:10
Show Gist options
  • Save bogdan-nourescu/1cd6b09f15851ae0c331 to your computer and use it in GitHub Desktop.
Save bogdan-nourescu/1cd6b09f15851ae0c331 to your computer and use it in GitHub Desktop.
<pdf-footer>
<html><head><script type="text/javascript" noparse="false">
<![CDATA[
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].innerHTML = vars[x[i]];
}
}
}
]]>
</script></head><body style="border:0; margin: 0;" onload="subst()">
<table style="width: 100%;color:#686868; font-size:90%">
<tr>
<td style="text-align:center">
Pagina <span class="page"></span> din <span class="topage"></span>
</td>
</tr>
</table>
</body></html>
</pdf-footer>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment