Bookmarklets doesn't work from bookmarks
Categories
(Firefox for Android :: Bookmarks, defect)
Tracking
()
People
(Reporter: csadilek, Unassigned)
Details
From github: https://github.com/mozilla-mobile/fenix/issues/2871.
Steps to reproduce
Save any site to bookmarks
Edit this bookmark and put in there a Javascript as url, e.x.
javascript:%20(function%20()%20{%20%20%20%20%20%20window.open('https://invidio.us/watch?v='%20+%20document.location.href.replace(/^.+v=(.{11})(.+)?/g,%20'$1'));%20%20})();
Save this edited bookmark
Use it on YouTube for download a video.Expected behavior
The YT Video will be downloaded
Actual behavior
The url of the bookmarklet will be searched
Device information
- Android device: Samsung Galaxy Tab SM-T580 and Huawei P smart
- Fenix version: 1.0.1921 Nightly and Raptor
┆Issue is synchronized with this Jira Task
Change performed by the Move to Bugzilla add-on.
Comment 1•2 years ago
|
||
The severity field is not set for this bug.
:cpeterson, could you have a look please?
For more information, please visit auto_nag documentation.
Updated•2 years ago
|
Comment 2•2 years ago
|
||
I did not manage to reproduce this with the script from the STR. Settings S3 for now, having better STR and a script that does not work would help. From reading through GH tickets and PR, seems like this issue was fixed at some point but reverted. Whoever picks this, I recommend reading through the issue in the first comment, as well as: this PR and the initial feature request.
Comment 3•2 years ago
|
||
A simpler test script would be creating a bookmark like javascript:alert("Worked")
Expected behavior: See an alert
Actual Behaviour: Nothing happens
Comment 4•1 year ago
|
||
Bookmarklets actually works sometime, few even works every time when I testing it.
For example, javascript:(function() { window.location = `https://translate.google.com/translate?sl=auto&tl=zh-TW&u=${encodeURIComponent(window.location)}`; })() works every time. But javascript:(function() { window.open(`https://example.com/?url=${encodeURIComponent(location)}`, "_blank", "noopener"); })() and javascript:alert(1) rarely works, although they did execute in some random instances.
This bug still exists in version 134.0.1
A simple bookmarklet containing the following code does not run on the current page: javascript:alert(“Worked”).
However, if you launch it directly from the Bookmarks menu, it will run, but not on an opened page.
Could you please take a look and try to make this feature work?
Thanks a lot for your good work.
(In reply to freeai from comment #5)
This bug still exists in version 134.0.1
A simple bookmarklet containing the following code does not run on the current page:javascript:alert(“Worked”).
However, if you launch it directly from the Bookmarks menu, it will run, but not on an opened page.Could you please take a look and try to make this feature work?
Thanks a lot for your good work.
Sorry I probably was too quick to comment, actually depending on the code bookmarklets might work. So don't mind my previous comment.
Keep the awesome work !
Description
•