移除多余的引入

master
yutent 2023-09-08 16:03:09 +08:00
parent c1f7e8e503
commit 4ef23a703d
2 changed files with 3 additions and 15 deletions

View File

@ -1,10 +1,10 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
import gi, os, json, shutil, hashlib, time, threading import gi
gi.require_version('Gtk', '3.0') gi.require_version('Gtk', '3.0')
gi.require_version("WebKit2", "4.1") gi.require_version("WebKit2", "4.1")
from gi.repository import GObject, Gtk, Gdk, WebKit2, GLib, Gio, GdkPixbuf from gi.repository import Gtk, WebKit2
def create_same_window(origin, req): def create_same_window(origin, req):

View File

@ -3,7 +3,7 @@
# @date 2023/08/08 14:07:26 # @date 2023/08/08 14:07:26
import gi, os, json, shutil, hashlib, time, threading import gi, os, json, shutil, hashlib
gi.require_version('Gtk', '3.0') gi.require_version('Gtk', '3.0')
gi.require_version("WebKit2", "4.1") gi.require_version("WebKit2", "4.1")
@ -54,18 +54,6 @@ def noop():
pass pass
# 类型js的settimeout的修饰器
def set_timeout(timeout = 0.5):
def decorator(callback):
def wrapper(*args):
t = threading.Timer(timeout, callback, args=args)
t.start()
return t
return wrapper
return decorator
class WebEngine(WebKit2.WebView): class WebEngine(WebKit2.WebView):