Replies: 1 comment
-
Here's my code. import os
import webview
appdata_path = os.getenv('APPDATA')
tiny_cord_path = os.path.join(appdata_path, 'Misscord')
storage_path = os.path.join(tiny_cord_path, 'Storage')
os.makedirs(storage_path, exist_ok=True)
def read_cookies(window):
cookies = window.get_cookies()
js_path = os.path.join(os.path.dirname(__file__), 'injection', 'inject.js')
with open(js_path, 'r', encoding='utf-8') as js_file:
js_code = js_file.read()
window.evaluate_js(js_code)
css_path = os.path.join(os.path.dirname(__file__), 'injection', 'inject.css')
with open(css_path, 'r', encoding='utf-8') as css_file:
css_code = css_file.read()
window.load_css(css_code)
if __name__ == '__main__':
options = {
'url': 'https://discord.com/app',
'width': 800,
'height': 600,
'resizable': True,
'fullscreen': False,
'easy_drag': True,
'confirm_close': True
}
window = webview.create_window('Misscord', **options)
webview.start(read_cookies, window, private_mode=False, storage_path=storage_path, debug=True) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am making a discord web client with vencord in it, and vencord script needs to load before DOM initializes, anyone know how to?
Beta Was this translation helpful? Give feedback.
All reactions