BrowserView.js
authorAlan Knowles <alan@roojs.com>
Wed, 3 Jun 2015 04:59:27 +0000 (12:59 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 3 Jun 2015 04:59:27 +0000 (12:59 +0800)
BrowserView.js

index 4f9d35f..096b1bc 100644 (file)
@@ -307,15 +307,10 @@ BrowserView = new GType({
                     File.read( __script_path__ + "/domains/coconuts.co.js")
                 );
                               
-            }
-             if (current_url.match(/theindependent\.sg\//) ) {
-                TabbedBrowser.browser.current_tab().get_web_view().execute_script(
-                    File.read( __script_path__ + "/domains/theindependent.sg.js")
-                );
-                              
             }
             
             
+            
             // motorme - requires a scroll to make content appear..
             if (current_url.match(/\.motorme\.my\//) ) {
                 TabbedBrowser.browser.current_tab().get_web_view().execute_script("window.scrollTo(0,500);"); 
@@ -337,7 +332,12 @@ BrowserView = new GType({
             print("Delay:" + BrowserSettings.delay);
          
             GLib.timeout_add(GLib.PRIORITY_LOW, BrowserSettings.delay *1, function() {
-                 
+                if (current_url.match(/theindependent\.sg\//) ) {
+                    TabbedBrowser.browser.current_tab().get_web_view().execute_script(
+                        File.read( __script_path__ + "/domains/theindependent.sg.js")
+                    );
+                                  
+                }
                 print("FETCHING");
                 //print(web_frame);
                 if (web_frame &&  BrowserSettings.export_filename_html  ) {