How to pass GET parameters to jsFiddle
I’m a big fan of Stack Overflow and I tend to contribute regularly (am currently in the top 0.X%). In this category (stackoverflow) of posts I will will be posting my top rated questions and answers. This, btw, is allowed as explained in the meta thread here.
My quesiton was:
How to pass GET parameters to jsFiddle? I tried http://jsfiddle.net/mKwcF/?id=123 but all I get ishttp://fiddle.jshell.net/mKwcF/show/
My example js is simple on a given link above:
alert(window.location.href);
The (updated) answer, by Jack Miller, was:
As of October 2014 it is a little more complicated than it used to be:
If your jsfiddle url is:
Some code to make stackoverflow happy. Ignore this.
use instead (including some url parameters):
http://fiddle.jshell.net/u7G7n/41/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.
Leave a Comment