搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

Learn More

1) javascript by bookmarklet in address bar; 2) and 2a) firefox settings' over-protection?

  • 3 回覆
  • 0 有這個問題
  • 11 次檢視
  • 最近回覆由 cor-el

more options

Hello,

This is of GENERAL INTEREST, since "Click & Clean" is not available from FF anymore, whilst other people have obviously hijacked the name, and other FF add-ins and add-ons are of very doubtful origin... not even speaking of (notwithstanding its pricing...) CCleaner having bought (some time ago, but it invariably appears at, or near, the top of any google search for browser protection) by We-Spy-Avast. So:

1) It' been known for many years that FF refuses js in address bar; bookmarklets have been praised as a work-around. Thus, a bookmarklet named "some", with keyword "s", and with "javascript:alert(1);" even continues to work today, by entering "sEnter" in the address bar. (The alleged work-around to reset about:config?filter=browser.urlbar.filter.javascript to false having been abandoned many years ago...)

2) It seems that FF tries to wrongly "protect" its settings by all means? Speaking about about:preferences#privacy where the "Inspect (Q)" doesn't work, but where by looking at the source code, I was able to identify the "Clear Data" button as button id="clearSiteDataButton" or then: data-l10n-id="sitedata-clear" (whatever that means...), whilst

2a) on that page, the buttons (among others) "Clear Data" has the "l" (lowercase-L) underlined, "Manage Data" has the "M" underlined, and ditto for the "Manage Data" dialog then, in which the button "Remove Selected" has the "R" underlined, the "Save Changes" button comes with an underlined "a", and the the "Remove All" has its first "e" underlined, etc., etc. - whilst NO a, r, e or whatever, also with "alt" or with "control", then would ever activate or trigger those buttons, which arises the question, "WHY come those buttons with an underlined character, when they are not available BUT by - physical-only? - mouse click anyway?"? Or HOW would I then access those buttons by keyboard, their underlined characters obviously not working anymore? (?)

2 again) And so, I changed the above (then working) bookmarklet's url to: javascript:document.getElementById("clearSiteDataButton").click(); and now, when I trigger that bookmarket on the about:preferences#privacy page, nothing happens:

Have I made a js mistake here? Or does FF simply prevents any FF user's try to protect themselves, with material-on-board?

(I understand I can just send a mouse click to that button by AutoHotkey or similar, and that's what I currently do, send a click to x1150, y1320 into the FF window, but obviously, those values depend on my screen (size, resolution, etc), and my hiding both the menu bar and the bookmarks toolbar...)

(We're not 3-years-olds, but perhaps, the FF CEO has such children at home, and then extrapolates for the masses of money she gets? And no, even without add-ins, and lots of memory, FF has NOT been brought to a rally stable state yet...)

Hello, This is of GENERAL INTEREST, since "Click & Clean" is not available from FF anymore, whilst other people have obviously hijacked the name, and other FF add-ins and add-ons are of very doubtful origin... not even speaking of (notwithstanding its pricing...) CCleaner having bought (some time ago, but it invariably appears at, or near, the top of any google search for browser protection) by We-Spy-Avast. So: 1) It' been known for many years that FF refuses js in address bar; bookmarklets have been praised as a work-around. Thus, a bookmarklet named "some", with keyword "s", and with "javascript:alert(1);" even continues to work today, by entering "sEnter" in the address bar. (The alleged work-around to reset about:config?filter=browser.urlbar.filter.javascript to false having been abandoned many years ago...) 2) It seems that FF tries to wrongly "protect" its settings by all means? Speaking about about:preferences#privacy where the "Inspect (Q)" doesn't work, but where by looking at the source code, I was able to identify the "Clear Data" button as button id="clearSiteDataButton" or then: data-l10n-id="sitedata-clear" (whatever that means...), whilst 2a) on that page, the buttons (among others) "Clear Data" has the "l" (lowercase-L) underlined, "Manage Data" has the "M" underlined, and ditto for the "Manage Data" dialog then, in which the button "Remove Selected" has the "R" underlined, the "Save Changes" button comes with an underlined "a", and the the "Remove All" has its first "e" underlined, etc., etc. - whilst NO a, r, e or whatever, also with "alt" or with "control", then would ever activate or trigger those buttons, which arises the question, "WHY come those buttons with an underlined character, when they are not available BUT by - physical-only? - mouse click anyway?"? Or HOW would I then access those buttons by keyboard, their underlined characters obviously not working anymore? (?) 2 again) And so, I changed the above (then working) bookmarklet's url to: javascript:document.getElementById("clearSiteDataButton").click(); and now, when I trigger that bookmarket on the about:preferences#privacy page, nothing happens: Have I made a js mistake here? Or does FF simply prevents any FF user's try to protect themselves, with material-on-board? (I understand I can just send a mouse click to that button by AutoHotkey or similar, and that's what I currently do, send a click to x1150, y1320 into the FF window, but obviously, those values depend on my screen (size, resolution, etc), and my hiding both the menu bar and the bookmarks toolbar...) (We're not 3-years-olds, but perhaps, the FF CEO has such children at home, and then extrapolates for the masses of money she gets? And no, even without add-ins, and lots of memory, FF has NOT been brought to a rally stable state yet...)

所有回覆 (3)

more options

You can open the Inspector via the Tools menu or via the keyboard (Ctrl+Shift+I) on pages where the right-click context menu isn't working. about:preferences is an HTML page and that means that you need to use the "Alt+Shift" modifier to focus/activate an underlined character button or checkbox (Alt+Shift+L => Clear Data).

more options

frqariszxtizknjvnc said

And so, I changed the above (then working) bookmarklet's url to: javascript:document.getElementById("clearSiteDataButton").click(); and now, when I trigger that bookmarket on the about:preferences#privacy page, nothing happens: Have I made a js mistake here? Or does FF simply prevents any FF user's try to protect themselves, with material-on-board?

I don't know why bookmarklets are ignored on about:preferences. There isn't an error message in the Web Console that Content Security Policy blocks such scripts, so it must be blocked in some other manner.

Many aspects of Firefox are designed for extra safety in ways advanced users find annoying. Keep in mind that a very high percentage of Firefox users can't assess the safety of a bookmarklet or console script, and it is evident that there is a bias in favor of minimizing risk for those users at the expense of advanced users. In many cases, there's a preference to allow riskier behavior, but I'm not aware of a preference related to this issue.

more options

I get this error message in the Browser Console:

  • Uncaught Error: Component returned failure code: 0x8053040d [nsIWebNavigation.loadURI]