eriklothe last edited by Pesala
In a lot of modern web pages, especially single page applications, it can sometimes be difficult or impossible to point a bookmark to a given place (and state) in the web page. Say, for instance, you use some team work tool like Jira, and you would like a bookmark that opens the task board page and scrolls (past a large amount of tasks) to the first task that has your name on it. Or, say your place of work has a complicated time accounting system, and you would like a bookmark to open the system, navigate to the right place, and fill in the amount of hours you normally work, leaving you only to adjust if necessary and then click 'submit'.
A scripted bookmark for the latter scenario, would work like this: The address field would simply contain: "https://badtimeaccountsystem.com". In addition there is a "script" field containing either a short script, or a pointer to a file containing a script, e.g. "fill_in_hours.js". The script could then contain something like:
And then after clicking the bookmark it would have navigated to the right place inside the single-page application, and also filled 8 hours into every day of the current week.
This would be a lot like the Chrome extension Tampermonkey, except it would be tied to a bookmark, and thus used more like a command than a permanent modification to the site. It would also be comparable to Selenium, (used for testing web pages), which is capable of navigating around, filling forms and making assertions (typically driven by a custom Java or .NET application), except this would be integrated into the browser and thus a lot simpler to set up and use.
For users with knowledge to write scripts like this, scripted bookmarks could be an extremely powerful tool. A lot of people are wasting a lot of time every day clicking the same buttons on the same web pages. Automation support like this would truly make Vivaldi the power user browser.
LonM last edited by
Morg42 last edited by Morg42
Including or integrating (possibly different) js frameworks into VIvaldi starts seeming a bit far-fetched...
But if we can get some kind of automation, that'd be terrific...
Seeing @LonM's comment: bookmarklets should be able to do this, if they can be made to open a page, wait till it's loaded and then execute further code. Alternatively, you could first use a classic bookmark and then a bookmarklet...
I should perhaps have addressed this in my original post: A "scripted bookmarks" feature should include dependency support, as frameworks like JQuery are very helpful for short and simple scripts like this. Tampermonkey solves this by supporting require statements like "@require http://code.jquery.com/jquery-1.12.4.min.js". This way no libraries needs to be integrated or directly supported by the browser, but can be fetched as needed from third-party CDNs.
Morg42 last edited by
Yeah, ok. Not wrong, but "pure" jQuery code ist "not js" in the sense that the interpreter needs to have access to jQuery. This seems a bit much for a requirement where the bookmark management of the browser is still not finished...
LonM last edited by
I guess the main aim here would be to be able to 'chain' things together. Like:
- Plain bookmark takes you to yyy
- Vivaldi knows to then initiate a special bookmarklet whenever this plain bookmark is used
- Special bookmarklet does thing zzz
@Morg42 JQuery and other libraries are just JS code. There is no need for the interpreter to support any specific framework. It just needs to support loading code from a third-party CDN. Essentially, this is nothing more than fetching a URL and loading the content into the interpreter. Check out Tampermonkey's documentation for their require statmenent. This is my request anyway
QuHno last edited by
It just needs to support loading code from a third-party CDN.
A bit off topic, but I really don't like to load stuff from 3rd party CDNs, especially not for local stuff. This is really worth a try:
@quhno cool I'll check it out.