How can I pass URL query parameters to a jsFiddle? I tried http://jsfiddle.net/mKwcF/?id=123 but all I get is http://fiddle.jshell.net/mKwcF/show/
My example js is simple on a given link above:
alert(window.location.href);
How can I pass URL query parameters to a jsFiddle? I tried http://jsfiddle.net/mKwcF/?id=123 but all I get is http://fiddle.jshell.net/mKwcF/show/
My example js is simple on a given link above:
alert(window.location.href);
The jsFiddle devs have said it currently isn't possible:
Apart for the original request for this feature we had no other such requests in 12 years, so it's not on the priority list I'm afraid.
Actually, the solution is pretty simple and does not involve any Chrome Plugin.
Just access top.location.search when using the domain name fiddle.jshell.net :
Working example : http://fiddle.jshell.net/techp9/hfpx9zh5/1/show/light/?test=1
All you need is to add show at the end of the URL and then add query
e.g:
if your jsFiddle URL is
.../ishaiborovoy/Yx9P899/123/
then you should refer to:
.../ishaiborovoy/Yx9P6/123/show?myFirstParam=1&mySecondParam=2.
This works for me.
I was just trying to figure out the same thing and ran across this in the jsFiddle documentation.
Note: If you want to use a dynamic resource please add a dummy GET variable i.e.
http://example.com/dynamically.php?somevar=somevalue&dummy=.css
. This will trick jsFiddle to recognize it as CSS resource.
As of October 2014 it is a little more complicated than it used to be:
If your jsfiddle url is:
use instead (including some url parameters):
http://fiddle.jshell.net/u7G7n/44/show/light/?lat1=52&lng1=9&lat2=50&lng2=1
AND send the same url (including parameters) as referer. You can use Referer Control as Chrome plugin: https://chrome.google.com/webstore/detail/referer-control/hnkcfpcejkafcihlgbojoidoihckciin
And configure like this:
Now the second link (including parameters) should work.
EDIT: Plugin RefControl works well for Firefox: http://www.stardrifter.org/refcontrol/ Configure with "fiddle.jshell.net" as site, then choose "Forge" (substitute with root address).
The jsFiddle devs have said it currently isn't possible:
Apart for the original request for this feature we had no other such requests in 12 years, so it's not on the priority list I'm afraid.
© 2022 - 2025 — McMap. All rights reserved.