willin 7 роки тому
батько
коміт
7c33f1cc90
2 змінених файлів з 2 додано та 4 видалено
  1. 1 3
      config.js
  2. 1 1
      package.json

+ 1 - 3
config.js

@@ -3,14 +3,12 @@ function getTimestamp() {
 }
 function setReadState() {
   localStorage.setItem('leader.url', location.href);
-  localStorage.setItem('leader.time', getTimestamp());
   localStorage.setItem('leader.top', document.documentElement.scrollTop || document.body.scrollTop);
   setTimeout(setReadState, 5000);
 }
 function getReadState() {
   if (window.localStorage) {
-    var time = ~~localStorage.getItem('leader.time');
-    if (getTimestamp() - time > 300) {
+    if (document.referrer === '') {
       var url = localStorage.getItem('leader.url');
       if (url && location.href != url) {
         location.href = url;

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "leader.js.cool",
-  "version": "3.0.5",
+  "version": "3.0.6",
   "description": "不可替代的团队领袖培养计划",
   "main": "config.js",
   "scripts": {