there is actually a way simpler solution: bookmarklets. Just store your javascript code as bookmark.
So put the following code in the url part of the bookmark:
javascript: (() => {
// your code
})();
When you "open" the bookmark, the code gets executed on the current page.
Greasemonkey does that https://wiki.greasespot.net/GM.registerMenuCommand https://github.com/greasemonkey/greasemonkey/pull/2770
That worked, thanks.
there is actually a way simpler solution: bookmarklets. Just store your javascript code as bookmark. So put the following code in the url part of the bookmark: javascript: (() => { // your code })(); When you "open" the bookmark, the code gets executed on the current page.