蓝优小窝
蓝优
始于网络,终于现实
90后 狮子座 联系
谷歌浏览器或IE可用,其他浏览器未测..

JS

var ConsoleManager = {
	onOpen: function() {},
	onClose: function() {},
	init: function() {
		var self = this;
		var x = new Image();
		var isOpening = false,
			isOpened = false;
		Object.defineProperty(x, 'id', {
			get: function() {
				if (!isOpening) {
					self.onOpen();
					isOpening = true;
				}
				isOpened = true;
			}
		});
		setInterval(function() {
			isOpened = false;
			console.info(x);
			console.clear();
			if (!isOpened && isOpening) {
				self.onClose();
				isOpening = false;
			}
		}, 200);
	}
}
ConsoleManager.onOpen = function() {
	document.documentElement.innerHTML = '<p style="text-align: center">小崽子,瞅你妹</p>';
}
ConsoleManager.onClose = function() {
	window.location.reload();
}
ConsoleManager.init();
声明:若无特殊注明,本文为《蓝优》原创,转载请保留文章出处。