移除多余的引入
parent
c1f7e8e503
commit
4ef23a703d
|
@ -1,10 +1,10 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import gi, os, json, shutil, hashlib, time, threading
|
||||
import gi
|
||||
|
||||
gi.require_version('Gtk', '3.0')
|
||||
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):
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# @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("WebKit2", "4.1")
|
||||
|
@ -54,18 +54,6 @@ def noop():
|
|||
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):
|
||||
|
||||
|
|
Loading…
Reference in New Issue