[web browser]No way to use a bookmarklet (bookmarked javascript: link)
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | Ubuntu UX |
Low
|
James Mulholland | ||
| | webbrowser-app (Ubuntu) |
Medium
|
Unassigned | ||
Bug Description
The Ubuntu browser has no way to use bookmarklets (a bookmarked javascript: link which runs some code in the context of the currently viewed page, rather than navigating to a new page). See https:/
In order to use bookmarklets, it must be possible to:
1. get a javascript: link into the browser's bookmarks database. Ideally this would be doable with JS in a client page; a suboptimal but possible alternative is the approach that iOS Safari takes, where one bookmarks a random URL and then edits the bookmark to contain a (copy-and-pasted) JavaScript URL instead. Neither are possible on Ubuntu's browser; bookmarks cannot be manually edited.
2. Invoke the bookmark in the current tab. This is not possible in the Ubuntu browser: one cannot open a bookmark in an existing tab, because the list of bookmarks is only available in the new tab screen.
| Olivier Tilloy (osomon) wrote : | #1 |
| Changed in webbrowser-app: | |
| status: | New → Confirmed |
| importance: | Undecided → Medium |
| Changed in webbrowser-app (Ubuntu): | |
| status: | New → Confirmed |
| Changed in webbrowser-app (Ubuntu): | |
| importance: | Undecided → Medium |
| Changed in webbrowser-app: | |
| status: | Confirmed → Invalid |
| Olivier Tilloy (osomon) wrote : | #2 |
Note that the address bar now displays bookmarks along with history entries and search suggestions, so it should be possible to activate a bookmarklet this way on an open page (although I have to admit it’s not necessarily the most obvious UX).
| no longer affects: | webbrowser-app |
| Olivier Tilloy (osomon) wrote : | #3 |
It is also now possible to long-press on a link and add it to bookmarks.
| Olivier Tilloy (osomon) wrote : | #4 |
Just tested the above statement, and this doesn’t work for bookmarklets: the URL that is being bookmarked is "about:blank", which is not very useful…
| Olivier Tilloy (osomon) wrote : | #5 |
This can be fixed in the browser by using the 'unfilteredLinkUrl' property of the context menu (we’re currently using 'linkUrl' everywhere). I imagine the browser could try to be clever by using the unfiltered link url when it encounters about:blank for the link url.
| Olivier Tilloy (osomon) wrote : | #6 |
Added an ubuntu-ux task to get design’s take on what the typical workflow should be to create/use bookmarklets in the browser.
| summary: |
- No way to use a bookmarklet (bookmarked javascript: link) + [web browser]No way to use a bookmarklet (bookmarked javascript: link) |
| Changed in ubuntu-ux: | |
| importance: | Undecided → Medium |
| importance: | Medium → Low |
| status: | New → Triaged |
| assignee: | nobody → James Mulholland (jamesjosephmulholland) |


Note that despite the UI limitations that forbid creating bookmarklets, such code snippets do actually work when manually inserted in the bookmarks database. Tested with the following code snippet:
javascript: (function( ){alert( 'test') ;})();