You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just make it run before DOM or whatever, basically before the body or anything just as the page is available run it
Basically I am trying to make a discord client and Vencord needs to be ran before the body or anything as it relies on Local Storage which discord removes after the body has loaded.
The text was updated successfully, but these errors were encountered:
This is tricky, as you must catch a moment when html is loaded, but before the rest of the code.
I am not sure if this is possible with every renderer or at all. Currently evaluate_js is executed roughly after DOMContentLoaded is fired.
Having said that, I will introduce window.run_js function in the next version, which is a stripped down evalless version of evaluate_js. It executes provided script as is and does not return a result. The function is available slightly earlier than evaluate_js, but probably still not early enough. It maybe possible to hook it another navigation event handler to make it available earlier, but I don't know if it is feasible.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Just make it run before DOM or whatever, basically before the body or anything just as the page is available run it
Basically I am trying to make a discord client and Vencord needs to be ran before the body or anything as it relies on Local Storage which discord removes after the body has loaded.
The text was updated successfully, but these errors were encountered: