{"id":919,"date":"2014-11-25T15:12:08","date_gmt":"2014-11-25T15:12:08","guid":{"rendered":"http:\/\/www.nikola-breznjak.com\/blog\/?p=919"},"modified":"2015-08-17T06:08:00","modified_gmt":"2015-08-17T06:08:00","slug":"how-to-pass-get-parameters-to-jsfiddle","status":"publish","type":"post","link":"https:\/\/nikola-breznjak.com\/blog\/stack-overflow\/how-to-pass-get-parameters-to-jsfiddle\/","title":{"rendered":"How to pass GET parameters to jsFiddle"},"content":{"rendered":"<p><a href=\"http:\/\/stackoverflow.com\/users\/534755\/nikola\"><img loading=\"lazy\" decoding=\"async\" title=\"profile for Nikola at Stack Overflow, Q&amp;A for professional and enthusiast programmers\" src=\"http:\/\/stackoverflow.com\/users\/flair\/534755.png\" rel=\"lightbox[919]\" alt=\"profile for Nikola at Stack Overflow, Q&amp;A for professional and enthusiast programmers\" width=\"208\" height=\"58\" \/><\/a><br \/>\nI&#8217;m a big fan of <a href=\"http:\/\/stackoverflow.com\/\">Stack Overflow<\/a> and I tend to contribute regularly (am currently in the <a href=\"http:\/\/stackexchange.com\/leagues\/1\/alltime\/stackoverflow\/2008-07-31\/534755?sort=reputationchange#534755\">top 0.X%<\/a>).\u00a0In this category (<a href=\"http:\/\/www.nikola-breznjak.com\/blog\/category\/stack-overflow\/\">stackoverflow<\/a>)\u00a0of posts I will will be posting my top rated questions and answers. This, btw, is allowed as explained in the meta thread <a href=\"http:\/\/meta.stackoverflow.com\/questions\/266971\/can-i-post-so-questions-and-answers-in-a-personal-blog\/266973\">here<\/a>.<\/p>\n<p>My <a href=\"http:\/\/stackoverflow.com\/questions\/16527958\/how-to-pass-get-parameters-to-jsfiddle\">quesiton<\/a> was:<\/p>\n<p style=\"color: #000000;\">How to pass GET parameters to jsFiddle? I tried\u00a0<a style=\"color: #4a6b82;\" href=\"http:\/\/jsfiddle.net\/mKwcF\/?id=123\" rel=\"nofollow\">http:\/\/jsfiddle.net\/mKwcF\/?id=123<\/a>\u00a0but all I get is<a style=\"color: #4a6b82;\" href=\"http:\/\/fiddle.jshell.net\/mKwcF\/show\/\" rel=\"nofollow\">http:\/\/fiddle.jshell.net\/mKwcF\/show\/<\/a><\/p>\n<p style=\"color: #000000;\">My example js is simple on a given link above:<\/p>\n<pre style=\"color: #000000;\"><code>alert(window.location.href);<\/code><\/pre>\n<p style=\"color: #000000;\"><span style=\"line-height: 1.5;\">The (updated) answer, by <a style=\"color: #4a6b82;\" href=\"http:\/\/stackoverflow.com\/users\/2484903\/jack-miller\">Jack Miller<\/a>,\u00a0was:<\/span><\/p>\n<blockquote><p>As of October 2014 it is a little more complicated than it used to be:<\/p>\n<p>If your jsfiddle url is:<\/p>\n<p><a style=\"color: #4a6b82;\" href=\"http:\/\/jsfiddle.net\/u7G7n\/41\" rel=\"nofollow\">http:\/\/jsfiddle.net\/u7G7n\/41<\/a><\/p>\n<pre><code>Some code to make stackoverflow happy. Ignore this.\r\n<\/code><\/pre>\n<p>use instead (including some url parameters):<\/p>\n<p><a style=\"color: #4a6b82;\" href=\"http:\/\/fiddle.jshell.net\/u7G7n\/41\/show\/light\/?lat1=52&amp;lng1=9&amp;lat2=50&amp;lng2=1\" rel=\"nofollow\">http:\/\/fiddle.jshell.net\/u7G7n\/41\/show\/light\/?lat1=52&amp;lng1=9&amp;lat2=50&amp;lng2=1<\/a><\/p>\n<p>AND send the same url (including parameters) as referer. You can use Referer Control as Chrome plugin:\u00a0<a style=\"color: #4a6b82;\" href=\"https:\/\/chrome.google.com\/webstore\/detail\/referer-control\/hnkcfpcejkafcihlgbojoidoihckciin\" rel=\"nofollow\">https:\/\/chrome.google.com\/webstore\/detail\/referer-control\/hnkcfpcejkafcihlgbojoidoihckciin<\/a><\/p>\n<p>And configure like this:\u00a0<img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/IT7oq.png\" alt=\"enter image description here\" \/><\/p>\n<p>Now the second link (including parameters) should work.<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m a big fan of Stack Overflow and I tend to contribute regularly (am currently in the top 0.X%).\u00a0In this category (stackoverflow)\u00a0of posts I will will be posting&hellip;<\/p>\n","protected":false},"author":1,"featured_media":609,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[35],"tags":[],"class_list":["post-919","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-stack-overflow"],"_links":{"self":[{"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/posts\/919","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/comments?post=919"}],"version-history":[{"count":2,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/posts\/919\/revisions"}],"predecessor-version":[{"id":1699,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/posts\/919\/revisions\/1699"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/media\/609"}],"wp:attachment":[{"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/media?parent=919"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/categories?post=919"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/tags?post=919"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}