New Minimum: 1.8.7 (8193) New Recommended Release: 1.8.9 (8338) New Recommended Alpha: 1.8.9 (8382) Add Mac alpha release 1.8.9 (8709) Go back to using dates in download widget Clean up old code from the old login wrapper Make all builds using the login wrapper report outdated.
172 lines
5.3 KiB
HTML
172 lines
5.3 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
|
<title>Singularity Viewer</title>
|
|
<script type="text/javascript">
|
|
//<![CDATA[
|
|
/*
|
|
* Source: https://github.com/singularity-viewer/login-page
|
|
*/
|
|
var toolbarShown = true;
|
|
var urlParams = {};
|
|
|
|
// Replace addition symbols with space
|
|
function parseUrlParams() {
|
|
function decode(s) { return decodeURIComponent(s.replace(/\+/g, " ")); }
|
|
const search = /([^&=]+)=?([^&]*)/g;
|
|
const query = window.location.search.substring(1);
|
|
let match = undefined;
|
|
|
|
while (match = search.exec(query))
|
|
urlParams[decode(match[1])] = decode(match[2]);
|
|
}
|
|
|
|
function pageY(elem)
|
|
{
|
|
return elem.offsetParent ? (elem.offsetTop + pageY(elem.offsetParent)) : elem.offsetTop;
|
|
}
|
|
|
|
function resizeIframe()
|
|
{
|
|
let height = document.documentElement.clientHeight;
|
|
let orig = document.getElementById('origpage');
|
|
height -= pageY(orig);
|
|
height = (height < 0) ? 0 : height;
|
|
orig.style.height = height + 'px';
|
|
}
|
|
|
|
function setVisible(e, visible)
|
|
{
|
|
var elem = document.getElementById(e);
|
|
if (!elem) return;
|
|
|
|
elem.style.display = visible ? "block" : "none";
|
|
}
|
|
|
|
function updateVisibility(visible)
|
|
{
|
|
setVisible("opentoolbar", !visible);
|
|
setVisible("singtoolbar", visible);
|
|
resizeIframe();
|
|
}
|
|
|
|
function toggleToolbar()
|
|
{
|
|
toolbarShown = !toolbarShown;
|
|
updateVisibility(toolbarShown);
|
|
}
|
|
|
|
// Main
|
|
window.onload = function()
|
|
{
|
|
parseUrlParams();
|
|
if (!urlParams["original_page"] || !urlParams["channel"]) return;
|
|
window.onresize = resizeIframe;
|
|
let orig = document.getElementById('origpage');
|
|
orig.onload = resizeIframe;
|
|
orig.setAttribute("src", urlParams["original_page"]);
|
|
document.getElementById('closetoolbar').onclick = toggleToolbar;
|
|
document.getElementById('opentoolbar').onclick = toggleToolbar;
|
|
|
|
// Customize message per channel
|
|
const channel = urlParams["channel"];
|
|
setVisible(
|
|
channel == "Singularity Alpha" ? "alpha_updateavail" :
|
|
channel == "Singularity Zero" ? urlParams["lang"] == "fr" ? "zero_updatetoalpha_fr" : "zero_updatetoalpha" :
|
|
"updateavail",
|
|
true);
|
|
|
|
updateVisibility(toolbarShown);
|
|
}
|
|
//]]>
|
|
</script>
|
|
<style media="screen" type="text/css">
|
|
html, body
|
|
{
|
|
font-family: Arial, sans-serif;
|
|
font-size: 14px;
|
|
color: #bbb;
|
|
background-color: #212121;
|
|
height: 100%;
|
|
width: 100%;
|
|
margin: 0;
|
|
padding: 0;
|
|
overflow: hidden;
|
|
}
|
|
|
|
a
|
|
{
|
|
color: #fff;
|
|
text-decoration: none;
|
|
}
|
|
a:hover
|
|
{
|
|
text-decoration: underline;
|
|
}
|
|
|
|
#origpage
|
|
{
|
|
height: 100%;
|
|
width: 100%;
|
|
margin: 0;
|
|
padding: 0;
|
|
border: none;
|
|
}
|
|
|
|
#singtoolbar
|
|
{
|
|
display: none;
|
|
margin-top: 25px;
|
|
}
|
|
#opentoolbar
|
|
{
|
|
position: absolute;
|
|
top: 0px;
|
|
right: 0px;
|
|
display: none;
|
|
}
|
|
#closetoolbar
|
|
{
|
|
position: absolute;
|
|
top: 0px;
|
|
right: 0px;
|
|
margin-top: 19px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div id="opentoolbar" title="Version check"><img src="down_arrow.png" /></div>
|
|
<div id="singtoolbar">
|
|
<div id="closetoolbar"><img src="x.png"/></div>
|
|
<div id="toolbarcontent" style="margin: 0px 4px 10px 12px;">
|
|
<div id="updateavail" style="display: none;">
|
|
<img src="alert.png" style="vertical-align: bottom;" />
|
|
An updated version of Singularity is available. Please visit the
|
|
<a href="http://www.singularityviewer.org/" target="_external">Singularity main site</a>
|
|
to download it.
|
|
</div>
|
|
<div id="alpha_updateavail" style="display: none;">
|
|
<img src="alert.png" style="vertical-align: bottom;" />
|
|
An updated version of Singularity is available. Please visit the
|
|
<a href="http://www.singularityviewer.org/kb/nightly-builds" target="_external">Singularity Nightly builds page</a>
|
|
to download it.
|
|
</div>
|
|
<div id="zero_updatetoalpha" style="display: none;">
|
|
<img src="alert.png" style="vertical-align: bottom;" />
|
|
Thank you kindly, for testing Singularity Zero, please migrate to Singularity nightly from the
|
|
<a href="http://www.singularityviewer.org/kb/nightly-builds" target="_external">nightly builds page</a>
|
|
~
|
|
</div>
|
|
<div id="zero_updatetoalpha_fr" style="display: none;">
|
|
<img src="alert.png" style="vertical-align: bottom;" />
|
|
Nous remercions, grandement les gens qui ont aidé en testant la zero, maintenant elle est basculée sur une nightly:
|
|
<a href="http://www.singularityviewer.org/kb/nightly-builds" target="_external">nightly builds page</a>
|
|
~
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<iframe id="origpage"/>
|
|
</body>
|
|
</html>
|