Update index.html

This commit is contained in:
wioniqle-q 2021-11-15 15:15:42 +03:00 committed by GitHub
commit b52afafac8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,9 +1,9 @@
<html> <html>
<head> <head>
<title>hastebin</title> <title>hastebin</title>
<meta charset="utf-8" /> <meta charset="utf-8"/>
<link rel="stylesheet" type="text/css" href="solarized_dark.css"/> <link rel="stylesheet" type="text/css" href="solarized_dark.css"/>
<link rel="stylesheet" type="text/css" href="application.css"/> <link rel="stylesheet" type="text/css" href="application.css"/>
@ -14,34 +14,40 @@
<meta name="robots" content="noindex,nofollow"/> <meta name="robots" content="noindex,nofollow"/>
<script type="text/javascript"> <script type="text/javascript">
var app = null; let app = null;
// Handle pops // Handle pops
var handlePop = function(evt) { const handlePop = function (evt) {
var path = evt.target.location.pathname; const path = evt.target.location.pathname;
if (path === '/') { app.newDocument(true); } if (path === '/') {
else { app.loadDocument(path.substring(1, path.length)); } app.newDocument(true);
} else {
app.loadDocument(path.substring(1, path.length));
}
}; };
// Set up the pop state to handle loads, skipping the first load // Set up the pop state to handle loads, skipping the first load
// to make chrome behave like others: // to make chrome behave like others:
// http://code.google.com/p/chromium/issues/detail?id=63040 // http://code.google.com/p/chromium/issues/detail?id=63040
setTimeout(function() { setTimeout(function () {
window.onpopstate = function(evt) { window.onpopstate = function (evt) {
try { handlePop(evt); } catch(err) { /* not loaded yet */ } try {
handlePop(evt);
} catch (err) { /* not loaded yet */
}
}; };
}, 1000); }, 1000);
// Construct app and load initial path // Construct app and load initial path
$(function() { $(function () {
app = new haste('hastebin', { twitter: true }); app = new haste('hastebin', {twitter: true});
handlePop({ target: window }); handlePop({target: window});
}); });
</script> </script>
</head> </head>
<body> <body>
<ul id="messages"></ul> <ul id="messages"></ul>
<div id="key"> <div id="key">
<div id="pointer" style="display:none;"></div> <div id="pointer" style="display:none;"></div>
<div id="box1"> <div id="box1">
<a href="/about.md" class="logo"></a> <a href="/about.md" class="logo"></a>
@ -57,12 +63,14 @@
<div class="label"></div> <div class="label"></div>
<div class="shortcut"></div> <div class="shortcut"></div>
</div> </div>
</div> </div>
<div id="linenos"></div> <div id="linenos"></div>
<pre id="box" style="display:none;" class="hljs" tabindex="0"><code></code></pre> <pre id="box" style="display:none;" class="hljs" tabindex="0"><code></code></pre>
<label>
<textarea spellcheck="false" style="display:none;"></textarea> <textarea spellcheck="false" style="display:none;"></textarea>
</label>
</body> </body>
</html> </html>