How to run javascript in Mozilla URL bar?
I am using mozilla and trying to run this code on the url bar javascript:alert(document.cookie);
but when I hit go, nothing happens. But in chromium, it alerts, so what is with the firefox? does firefox enters http by default. If this, then How do I prevent this?
firefox javascript
add a comment |
I am using mozilla and trying to run this code on the url bar javascript:alert(document.cookie);
but when I hit go, nothing happens. But in chromium, it alerts, so what is with the firefox? does firefox enters http by default. If this, then How do I prevent this?
firefox javascript
add a comment |
I am using mozilla and trying to run this code on the url bar javascript:alert(document.cookie);
but when I hit go, nothing happens. But in chromium, it alerts, so what is with the firefox? does firefox enters http by default. If this, then How do I prevent this?
firefox javascript
I am using mozilla and trying to run this code on the url bar javascript:alert(document.cookie);
but when I hit go, nothing happens. But in chromium, it alerts, so what is with the firefox? does firefox enters http by default. If this, then How do I prevent this?
firefox javascript
firefox javascript
edited Nov 14 '13 at 9:36
user212806
asked Nov 14 '13 at 9:14
user212806user212806
42115
42115
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
Firefox 57 and later
Select Settings menu (3 horizontal lines icon in upper right corner) -> Web Developer -> Scratchpad.
Click the Run button on the Scratchpad toolbar to run your JavaScript code.
Firefox 56 and earlier
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.From the Firefox menu select Tools -> Web Developer -> Web Console.
A new Web Console window will open. From the Web Console window click the JS button on the toolbar.
From the Web Console window click on the Scratchpad icon in the toolbar. The Scratchpad icon looks like a notepad.
A new Scratchpad window will open. Copy your javascript code:
javascript:alert('Hello, World')
in the Scratchpad window.Click the Run button on the Scratchpad toolbar to run your JavaScript code.
add a comment |
For firefox android version, you can try this bookmarklet:
javascript:var a=prompt();var f=Function(a);f();
It will open a prompt box. Type your command in it (without "javascript:") and it will run.
I'm on desktop Linux, but this worked for me:javascript:var a=function(){ alert(prompt()); }()
. (Edit - added 'alert' around 'prompt' to show use of the output.)
– John P
Aug 14 '17 at 18:57
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f376839%2fhow-to-run-javascript-in-mozilla-url-bar%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Firefox 57 and later
Select Settings menu (3 horizontal lines icon in upper right corner) -> Web Developer -> Scratchpad.
Click the Run button on the Scratchpad toolbar to run your JavaScript code.
Firefox 56 and earlier
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.From the Firefox menu select Tools -> Web Developer -> Web Console.
A new Web Console window will open. From the Web Console window click the JS button on the toolbar.
From the Web Console window click on the Scratchpad icon in the toolbar. The Scratchpad icon looks like a notepad.
A new Scratchpad window will open. Copy your javascript code:
javascript:alert('Hello, World')
in the Scratchpad window.Click the Run button on the Scratchpad toolbar to run your JavaScript code.
add a comment |
Firefox 57 and later
Select Settings menu (3 horizontal lines icon in upper right corner) -> Web Developer -> Scratchpad.
Click the Run button on the Scratchpad toolbar to run your JavaScript code.
Firefox 56 and earlier
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.From the Firefox menu select Tools -> Web Developer -> Web Console.
A new Web Console window will open. From the Web Console window click the JS button on the toolbar.
From the Web Console window click on the Scratchpad icon in the toolbar. The Scratchpad icon looks like a notepad.
A new Scratchpad window will open. Copy your javascript code:
javascript:alert('Hello, World')
in the Scratchpad window.Click the Run button on the Scratchpad toolbar to run your JavaScript code.
add a comment |
Firefox 57 and later
Select Settings menu (3 horizontal lines icon in upper right corner) -> Web Developer -> Scratchpad.
Click the Run button on the Scratchpad toolbar to run your JavaScript code.
Firefox 56 and earlier
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.From the Firefox menu select Tools -> Web Developer -> Web Console.
A new Web Console window will open. From the Web Console window click the JS button on the toolbar.
From the Web Console window click on the Scratchpad icon in the toolbar. The Scratchpad icon looks like a notepad.
A new Scratchpad window will open. Copy your javascript code:
javascript:alert('Hello, World')
in the Scratchpad window.Click the Run button on the Scratchpad toolbar to run your JavaScript code.
Firefox 57 and later
Select Settings menu (3 horizontal lines icon in upper right corner) -> Web Developer -> Scratchpad.
Click the Run button on the Scratchpad toolbar to run your JavaScript code.
Firefox 56 and earlier
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.From the Firefox menu select Tools -> Web Developer -> Web Console.
A new Web Console window will open. From the Web Console window click the JS button on the toolbar.
From the Web Console window click on the Scratchpad icon in the toolbar. The Scratchpad icon looks like a notepad.
A new Scratchpad window will open. Copy your javascript code:
javascript:alert('Hello, World')
in the Scratchpad window.Click the Run button on the Scratchpad toolbar to run your JavaScript code.
edited Jan 23 at 9:38
answered Nov 14 '13 at 9:33
karelkarel
59.3k13128151
59.3k13128151
add a comment |
add a comment |
For firefox android version, you can try this bookmarklet:
javascript:var a=prompt();var f=Function(a);f();
It will open a prompt box. Type your command in it (without "javascript:") and it will run.
I'm on desktop Linux, but this worked for me:javascript:var a=function(){ alert(prompt()); }()
. (Edit - added 'alert' around 'prompt' to show use of the output.)
– John P
Aug 14 '17 at 18:57
add a comment |
For firefox android version, you can try this bookmarklet:
javascript:var a=prompt();var f=Function(a);f();
It will open a prompt box. Type your command in it (without "javascript:") and it will run.
I'm on desktop Linux, but this worked for me:javascript:var a=function(){ alert(prompt()); }()
. (Edit - added 'alert' around 'prompt' to show use of the output.)
– John P
Aug 14 '17 at 18:57
add a comment |
For firefox android version, you can try this bookmarklet:
javascript:var a=prompt();var f=Function(a);f();
It will open a prompt box. Type your command in it (without "javascript:") and it will run.
For firefox android version, you can try this bookmarklet:
javascript:var a=prompt();var f=Function(a);f();
It will open a prompt box. Type your command in it (without "javascript:") and it will run.
edited Dec 23 '17 at 4:53
GramThanos
1034
1034
answered Jan 24 '14 at 18:51
ranjan_purbeyranjan_purbey
413
413
I'm on desktop Linux, but this worked for me:javascript:var a=function(){ alert(prompt()); }()
. (Edit - added 'alert' around 'prompt' to show use of the output.)
– John P
Aug 14 '17 at 18:57
add a comment |
I'm on desktop Linux, but this worked for me:javascript:var a=function(){ alert(prompt()); }()
. (Edit - added 'alert' around 'prompt' to show use of the output.)
– John P
Aug 14 '17 at 18:57
I'm on desktop Linux, but this worked for me:
javascript:var a=function(){ alert(prompt()); }()
. (Edit - added 'alert' around 'prompt' to show use of the output.)– John P
Aug 14 '17 at 18:57
I'm on desktop Linux, but this worked for me:
javascript:var a=function(){ alert(prompt()); }()
. (Edit - added 'alert' around 'prompt' to show use of the output.)– John P
Aug 14 '17 at 18:57
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f376839%2fhow-to-run-javascript-in-mozilla-url-bar%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown