Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var width = 0;
- var t = setInterval(function() {
- width = Math.max(screen.width,screen.availWidth,window.outerWidth,window.innerWidth,document.body.offsetWidth,document.body.clientWidth);
- if (width > 0) {
- clearTimeout(t);
- width = [720,600,540,480,320].filter(function(v) { return v < width; })[0];
- console.log("Width set: "+width);
- document.documentElement.className = "w" + width;
- document.body.className = "w" + width + " " + client() + " " + document.body.className;
- }
- }, 1);
Add Comment
Please, Sign In to add comment