Add support for Javascript Bookmarks
-
Having just started trying Vivaldi, I like it, but I don't seem to be able to add javascript bookmarks. I use these regularly in Firefox to perform simple tasks on webpages, so not having support for these is limiting my uptake of the otherwise great browser.
For reference, when I try, the Address box just drops anything I enter, and remains blank.
Here is one I'm trying to add that just adds a query parameter to the current url…
javascript:(() => {window.location = window.location + '&merge_request[target_branch]=master';})()
-
This post is deleted! -
@tobyg
This is of course a creepy crutch, but it works
1)you need to translate the base64 html code of the page with your script. A minimal example would be:<script>alert("Hello QnA.Habr!");</script>This can be done with built-in function btoa(), but it can't do Unicode: only ASCII
2)Make a data-url with this code which looks like this: data:text/html;base64,and_there_your_code_in_base64
The result will be something like this:
data:text/html;base64,CjxzY3JpcHQ+YWxlcnQoIkhlbGxvIFFuQS5IYWJyISIpOzwvc2NyaXB0Pgo=
If you paste this magic string into the address bar of your browser, you will get an alert. -
Ppafflick moved this topic from Automotive News on