Use clientWidth first
parent
8fa7365699
commit
e04c0b25b6
|
@ -5,8 +5,8 @@ addListener(window, 'load', function(){
|
||||||
var links = [];
|
var links = [];
|
||||||
var de = document.documentElement,
|
var de = document.documentElement,
|
||||||
db = document.getElementsByTagName('body')[0],
|
db = document.getElementsByTagName('body')[0],
|
||||||
w = window.innerWidth || de.clientWidth || db.clientWidth,
|
w = de.clientWidth || db.clientWidth || window.innerWidth,
|
||||||
h = window.innerHeight || de.clientHeight || db.clientHeight;
|
h = de.clientHeight || db.clientHeight || window.innerHeight;
|
||||||
w = 100*Math.floor(w*0.9/100);
|
w = 100*Math.floor(w*0.9/100);
|
||||||
h = 100*Math.floor(h*0.9/100);
|
h = 100*Math.floor(h*0.9/100);
|
||||||
var t;
|
var t;
|
||||||
|
|
Loading…
Reference in New Issue