Some more GreaseMonkey changes.

Sun, 11 Feb 2018 12:49:27 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 11 Feb 2018 12:49:27 +0100
changeset 6129
049ab6ad3144
parent 6128
afc2cda1a743
child 6130
9a3906c94d3c

Some more GreaseMonkey changes.

WebBrowser/Tools/Scripts.py file | annotate | diff | comparison | revisions
WebBrowser/data/html/speeddialPage.html file | annotate | diff | comparison | revisions
diff -r afc2cda1a743 -r 049ab6ad3144 WebBrowser/Tools/Scripts.py
--- a/WebBrowser/Tools/Scripts.py	Sat Feb 10 19:53:07 2018 +0100
+++ b/WebBrowser/Tools/Scripts.py	Sun Feb 11 12:49:27 2018 +0100
@@ -35,12 +35,13 @@
         if (window.external) {{
             var event = document.createEvent('Event');
             event.initEvent('_eric_external_created', true, true);
+            window._eric_external = true;
             document.dispatchEvent(event);
         }}
     }}
     
     if (self !== top) {{
-        if (top.external)
+        if (top._eric_external)
             registerExternal(top.external);
         else
             top.document.addEventListener(
diff -r afc2cda1a743 -r 049ab6ad3144 WebBrowser/data/html/speeddialPage.html
--- a/WebBrowser/data/html/speeddialPage.html	Sat Feb 10 19:53:07 2018 +0100
+++ b/WebBrowser/data/html/speeddialPage.html	Sun Feb 11 12:49:27 2018 +0100
@@ -568,11 +568,6 @@
 
     <script type="text/javascript">
     function init() {
-        if (!external.speedDial) {
-            setTimeout(init, 50);
-            return;
-        }
-
         @INITIAL-SCRIPT@
 
         external.speedDial.pagesChanged.connect(function() {
@@ -602,7 +597,7 @@
     }
 
     // Initialize
-    if (window.external) {
+    if (window._eric_external) {
         init();
     } else {
         document.addEventListener('_eric_external_created', init);

eric ide

mercurial