Bookmarklets doesn't work from bookmarks
Categories
(Fenix :: Bookmarks, defect)
Tracking
(Not tracked)
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•1 year 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•11 months ago
|
Comment 2•10 months 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•6 months 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•4 months 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.
Description
•