Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
9
rated 0 times [  9] [ 0]  / answers: 1 / hits: 65529  / 1 Year ago, fri, april 7, 2023, 9:52:24

I am using Firefox and am trying to run this code on the URL bar javascript:alert(document.cookie);.



But, when I hit go, nothing happens. In Chromium, it alerts, so what is with Firefox? Does Firefox try HTTP by default? If so, then how do I prevent this?


More From » firefox

 Answers
1

Firefox 89 and later



  1. Select Settings menu (3 horizontal lines icon in the upper right corner) More Tools -> Web Developer Tools -> Console tab.



  2. Type JavaScript code after the web console prompt » and press Enter.




The web console prompt will be located in the bottom left corner of
the console pane if the console already has output in it.


Firefox 72 and later


Scratchpad is deprecated as of Firefox 70 (bug 1565380), and has been removed in Firefox 72 and later.



  1. Select Settings menu (3 horizontal lines icon in the upper right corner) -> Web Developer -> Web Console.



  2. Type JavaScript code after the web console prompt » and press Enter.




Firefox 57-71



  1. Select Settings menu (3 horizontal lines icon in the upper right corner) -> Web Developer -> Scratchpad.



  2. Click the Run button on the Scratchpad toolbar to run your JavaScript code.






Firefox 56 and earlier



  1. Open a new tab in Firefox and in the URL bar, and enter about:blank to display a blank tab so that you can see what you are doing.



  2. From the Firefox menu select Tools -> Web Developer -> Web Console.



  3. A new Web Console window will open. From the Web Console window click the JS button on the toolbar.



  4. From the Web Console window click on the Scratchpad icon in the toolbar. The Scratchpad icon looks like a notepad.



  5. A new Scratchpad window will open. Copy your javascript code: javascript:alert('Hello, World') in the Scratchpad window.



  6. Click the Run button on the Scratchpad toolbar to run your JavaScript code.




[#28418] Saturday, April 8, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
housecoarmer

Total Points: 434
Total Questions: 116
Total Answers: 120

Location: Albania
Member since Sun, Nov 22, 2020
4 Years ago
;