Fix #5945 - techwireasia fix screenshot
[app.webkitpdf] / domains / forbes.com.js
index e69de29..7329bb3 100644 (file)
@@ -0,0 +1,33 @@
+
+// test http://www.forbes.com/sites/johnkang/2016/04/13/chinas-tech-giant-huawei-aims-to-double-b2b-revenue-by-2020/#44324814fe6d
+
+(function() {
+    
+   
+    function readCookie(name) {
+       var nameEQ = name + "=";
+       var ca = document.cookie.split(';');
+       for(var i=0;i < ca.length;i++) {
+           var c = ca[i];
+           while (c.charAt(0)==' ') c = c.substring(1,c.length);
+           if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
+       }
+       return null;
+    }
+    var c = readCookie('forbesUtilCookie');
+    
+        
+    var cfg =JSON.parse(c.replace(/'/g,'"'))
+    console.log(c);
+    if (c && window.location.pathname.match(/forbes\/welcome/) && cfg.toURL) {
+        console.log('firing redirect');
+        window.setTimeout(function() {
+            window.location = cfg.toURL;
+        }, 3000);
+            
+    }
+   
+   
+})();
+    
+    
\ No newline at end of file