4chan-x/template.jst

47 lines
1.6 KiB
Plaintext

<!doctype html>
<html><head>
<meta charset="utf-8">
<title>4chan X</title>
<link rel="stylesheet" href="web.css">
<link rel="icon" href="src/General/img/icon.gif">
<link rel="chrome-webstore-item" href="https://chrome.google.com/webstore/detail/ohnjgmpcibpbafdlkimncjhflgedgpam">
</head><body>
<div id="header">
<h1 id="4chan-x">4chan X</h1>
<div id="links">
<a href="https://github.com/ccd0/4chan-x">Source Code</a>
<a href="https://github.com/ccd0/4chan-x/blob/master/CHANGELOG.md">Changelog</a>
<a href="https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions">FAQ</a>
<a href="https://github.com/ccd0/4chan-x/issues">Report Bugs</a>
</div>
</div>
<a class="screenshot" href="img/screenshot.png"><img src="img/screenshot.png" alt="screenshot"></a>
<%= content.match(/<\/h1>([^]*)<h2 id="more-information"/)[1] %>
<script>
function imagePreview() {
this.removeEventListener('mouseover', imagePreview, false);
var img = new Image();
img.src = this.href;
img.alt = 'preview';
var span = document.createElement('span');
span.className = 'hover';
span.appendChild(img);
this.parentNode.insertBefore(span, this.nextSibling);
}
function storeInstall(e) {
if (!e.shiftKey && !e.altKey && !e.ctrlKey && !e.metaKey && e.button === 0) {
chrome.webstore.install();
e.preventDefault();
}
}
for (var i = 0; i < document.links.length; i++) {
var link = document.links[i];
if (/\.png$/.test(link.pathname) && !link.querySelector('.hover')) {
link.addEventListener('mouseover', imagePreview, false);
} else if (window.chrome && link.host === 'chrome.google.com') {
link.addEventListener('click', storeInstall, false);
}
}
</script>
</body></html>