Sha256: 1bb36b71ced33163d13628f2c113a6e4ae0ef290fc901efe14c355ea489cef19

Contents?: true

Size: 1.14 KB

Versions: 5

Compression:

Stored size: 1.14 KB

Contents

// By: h01000110 (hi)
// github.com/h01000110
// Contribution: asantos07
// github.com/asantos07

var max = document.getElementsByClassName("btn")[1];
var min = document.getElementsByClassName("btn")[2];

var maximize = function () {
	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%";
		}
	}
}

var minimize = function () {
	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%";
	}
}
if (max !== undefined)
	max.addEventListener('click', maximize, false);
if (min !== undefined)
	min.addEventListener('click', minimize, false);

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
jekyll-theme-windows95-0.4.4 assets/js/001.js
jekyll-theme-windows95-0.4.3 assets/js/001.js
jekyll-theme-windows95-0.4.2 assets/js/001.js
jekyll-theme-windows95-0.4.0 assets/js/001.js
jekyll-theme-windows95-0.3.1 assets/js/001.js