BrowserView.js
authorAlan Knowles <alan@roojs.com>
Wed, 10 Jun 2015 03:24:55 +0000 (11:24 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 10 Jun 2015 03:24:55 +0000 (11:24 +0800)
BrowserView.js

index 096b1bc..aa88a3f 100644 (file)
@@ -316,16 +316,11 @@ BrowserView = new GType({
                 TabbedBrowser.browser.current_tab().get_web_view().execute_script("window.scrollTo(0,500);"); 
                               
             }
-            print(current_url);
-            if (current_url.match(/\.efytimes\.com\//) ) {
-                Seed.print("hide coverpop\n");
-                TabbedBrowser.browser.current_tab().get_web_view().execute_script("" +
-                                " try { document.getElementById('CoverPop-cover').style.display = 'none'; }catch(e){}" +
-                                "try { document.body.setAttribute('style', '');}catch(e){}" +
-                                "try { document.documentElement.className= '';}catch(e){}" +
-                                "try { document.getElementById('IL_INSEARCH').style.display = 'none'; }catch(e){}" +
-                                "");
-                               
+            
+            if (current_url.match(/\.efytimes\.com\//) ||  current_url.match(/\/efytimes\.com\//) ) {
+                TabbedBrowser.browser.current_tab().get_web_view().execute_script(
+                    File.read( __script_path__ + "/domains/efytimes.com.js")
+                );
             }