Sha256: 560720ec27af23e268ebd0bc449eb7fcbfb01a481597fc6edb4f3b14c53df013
Contents?: true
Size: 1.03 KB
Versions: 1
Compression:
Stored size: 1.03 KB
Contents
// By: h01000110 (hi) // github.com/h01000110 var max = document.getElementsByClassName("btn")[1]; var min = document.getElementsByClassName("btn")[2]; function maximize () { var post = document.getElementsByClassName("content")[0]; var cont = document.getElementsByClassName("post_content")[0]; var wid = window.innerWidth || document.documentElement.clientWidth || document.getElementsByTagName("body")[0].clientWidth; if (wid > 900) { widf = wid * 0.9; post.style.width = widf + "px"; if (wid < 1400) { cont.style.width = "99%"; } else { cont.style.width = "99.4%"; } } } function minimize () { var post = document.getElementsByClassName("content")[0]; var cont = document.getElementsByClassName("post_content")[0]; var wid = window.innerWidth || document.documentElement.clientWidth || document.getElementsByTagName("body")[0].clientWidth; if ( wid > 900 ) { post.style.width = "800px"; cont.style.width = "98.5%"; } } max.addEventListener('click', maximize, false); min.addEventListener('click', minimize, false);
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
jekyll-theme-windows95-0.2.0 | assets/js/001.js |