WebBrowser/Tools/Scripts.py

branch
QtWebEngine
changeset 4886
b56735d36159
parent 4863
9d86824898e1
child 5342
2b6821805f46
--- a/WebBrowser/Tools/Scripts.py	Sun Mar 20 15:17:31 2016 +0100
+++ b/WebBrowser/Tools/Scripts.py	Sun Mar 20 20:13:29 2016 +0100
@@ -80,47 +80,6 @@
     return source.format(style)
 
 
-def toggleMediaPause(pos):
-    """
-    Function generating a script to toggle the paused state of a media element.
-    
-    @param pos position of the media element
-    @type QPoint
-    @return script to toggle the element paused state
-    @rtype str
-    """
-    source = """
-        (function() {{
-            var e = document.elementFromPoint({0}, {1});
-            if (!e)
-                return;
-            if (e.paused)
-                e.play();
-            else
-                e.pause();
-        }})()"""
-    return source.format(pos.x(), pos.y())
-
-
-def toggleMediaMute(pos):
-    """
-    Function generating a script to toggle the mute state of a media element.
-    
-    @param pos position of the media element
-    @type QPoint
-    @return script to toggle the element mute state
-    @rtype str
-    """
-    source = """
-        (function() {[
-            var e = document.elementFromPoint({0}, {1});
-            if (!e)
-                return;
-            e.muted = !e.muted;
-        }})()"""
-    return source.format(pos.x(), pos.y())
-
-
 def getFormData(pos):
     """
     Function generating a script to extract data for a form element.

eric ide

mercurial