74 lines
1.7 KiB
Plaintext
74 lines
1.7 KiB
Plaintext
<!doctype html>
|
|
<html><head>
|
|
<meta charset="utf-8">
|
|
<title>4chan X</title>
|
|
<style>
|
|
body {
|
|
font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif;
|
|
}
|
|
h1 {
|
|
text-align: center;
|
|
background-color: #eee;
|
|
}
|
|
img.screenshot {
|
|
display: block;
|
|
margin: auto;
|
|
width: 640px;
|
|
max-width: 100%;
|
|
}
|
|
@media (min-width: 1120px) {
|
|
img.screenshot {
|
|
float: right;
|
|
margin-left: 8px;
|
|
}
|
|
}
|
|
span.hover {
|
|
display: none;
|
|
}
|
|
a:hover + span.hover {
|
|
display: block;
|
|
position: fixed;
|
|
top: 0;
|
|
bottom: 0;
|
|
left: 0;
|
|
right: 0;
|
|
pointer-events: none;
|
|
background: rgba(0,0,0,0.4);
|
|
}
|
|
span.hover > img {
|
|
position: absolute;
|
|
top: 0;
|
|
bottom: 0;
|
|
left: 0;
|
|
right: 0;
|
|
margin: auto;
|
|
max-width: 100%;
|
|
max-height: 100%;
|
|
box-shadow: 5px 5px 20px rgba(0,0,0,0.4);
|
|
}
|
|
h2 ~ p, h2 ~ p + ul {
|
|
margin-left: 1em;
|
|
}
|
|
</style>
|
|
<link rel="icon" href="src/General/img/icon.gif">
|
|
<link rel="chrome-webstore-item" href="https://chrome.google.com/webstore/detail/ohnjgmpcibpbafdlkimncjhflgedgpam">
|
|
</head><body>
|
|
<%=
|
|
content
|
|
.replace('</h1>', '</h1><a href="img/screenshot.png"><img class="screenshot" src="img/screenshot.png"></a>')
|
|
.replace(/(<a href="([^"]+\.png)">.*?<\/a>)/g, '$1<span class="hover"><img src="$2"></span>')
|
|
%>
|
|
<script>
|
|
var links = document.querySelectorAll('a[href="https://chrome.google.com/webstore/detail/4chan-x/ohnjgmpcibpbafdlkimncjhflgedgpam"]');
|
|
for (var i = 0; i < links.length; i++) {
|
|
links[i].addEventListener('click', function(e) {
|
|
if (window.chrome && !e.shiftKey && !e.altKey && !e.ctrlKey && !e.metaKey && e.button === 0) {
|
|
chrome.webstore.install();
|
|
e.preventDefault();
|
|
}
|
|
}, false);
|
|
}
|
|
</script>
|
|
</body></html>
|
|
|