excluded heavy js where not necessary

This commit is contained in:
Christian Mueller
2014-07-08 08:56:58 +02:00
parent c3980a325c
commit 6557de2fdf
4 changed files with 32 additions and 22 deletions
+1 -10
View File
@@ -38,14 +38,5 @@ function onLoad() {
}
if(iosDetected) $note.className += " ui-border"; else $note.focus();
}
var links = $("links");
if(links){
if(window.innerHeight * 0.85 >= document.body.clientHeight) {
links.style.position = "fixed";
links.style.bottom = 0;
}
show(links);
}
showLinks();
}
+18 -1
View File
@@ -1,3 +1,6 @@
var $ = function(id){ return document.getElementById(id); }
var show = function(elem) { elem.style.display = "block" }
var themes = {
"dark": {
background: {
@@ -102,4 +105,18 @@ fileref.setAttribute("type", "text/css")
fileref.setAttribute("href", fontURL)
document.getElementsByTagName("head")[0].appendChild(fileref)
less.modifyVars(vars);
less.modifyVars(vars);
function showLinks(){
var links = $("links");
if(links){
if(window.innerHeight * 0.85 >= document.body.clientHeight) {
links.style.position = "fixed";
links.style.bottom = 0;
}
show(links);
}
}
// for the case if main.js is not loaded
var onLoad = showLinks;