mirror of
https://github.com/SunRed/haste-server.git
synced 2024-11-23 17:50:19 +01:00
509971c5ac
I Decided to remove static asset compression from actual code to make runtime faster and moved it to package.json script which only builds application once on installation.\nAfter this commit, after every update that changed static/application.js, you also need to run npm run-script build after git pull
69 lines
2.3 KiB
HTML
69 lines
2.3 KiB
HTML
<html>
|
|
<head>
|
|
<title>hastebin</title>
|
|
<meta charset="utf-8" />
|
|
<link rel="stylesheet" type="text/css" href="solarized_dark.css"/>
|
|
<link rel="stylesheet" type="text/css" href="application.css"/>
|
|
|
|
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
|
|
<script type="text/javascript" src="highlight.min.js"></script>
|
|
<script type="text/javascript" src="application.min.js"></script>
|
|
|
|
<meta name="robots" content="noindex,nofollow"/>
|
|
|
|
<script type="text/javascript">
|
|
let app = null;
|
|
// Handle pops
|
|
let handlePop = function(evt){
|
|
let path = evt.target.location.href;
|
|
if (path == app.baseUrl) app.newDocument(true);
|
|
else app.loadDocument(path.split('/').slice(-1)[0]);
|
|
};
|
|
// Set up the pop state to handle loads, skipping the first load
|
|
// to make chrome behave like others:
|
|
// http://code.google.com/p/chromium/issues/detail?id=63040
|
|
setTimeout(function(){
|
|
window.onpopstate = function(evt){
|
|
try { handlePop(evt); } catch(err){ /* not loaded yet */ }
|
|
};
|
|
}, 1000);
|
|
// Construct app and load initial path
|
|
$(function(){
|
|
let baseUrl = window.location.href.split('/');
|
|
console.log(baseUrl);
|
|
baseUrl = baseUrl.slice(0, baseUrl.length - 1).join('/') + '/';
|
|
console.log(baseUrl);
|
|
// baseUrl = 'https://plazatest.zneix.eu/haste/';
|
|
app = new haste('hastebin', { twitter: true, baseUrl: baseUrl });
|
|
handlePop({ target: window });
|
|
});
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
<ul id="messages"></ul>
|
|
|
|
<div id="key">
|
|
<div id="pointer" style="display: none;"></div>
|
|
<div id="box1">
|
|
<a href="about.md" class="logo"></a>
|
|
</div>
|
|
<div id="box2">
|
|
<button class="save function button-picture">Save</button>
|
|
<button class="new function button-picture">New</button>
|
|
<button class="duplicate function button-picture">Duplicate & Edit</button>
|
|
<button class="raw function button-picture">Just Text</button>
|
|
<button class="twitter function button-picture">Twitter</button>
|
|
</div>
|
|
<div id="box3" style="display:none;">
|
|
<div class="label"></div>
|
|
<div class="shortcut"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="linenos"></div>
|
|
<pre id="box" style="display: none;" class="hljs" tabindex="0"><code></code></pre>
|
|
<textarea spellcheck="false" style="display: none;"></textarea>
|
|
</body>
|
|
</html>
|