What is the url to get and only get this fiddle's javascript code ?
So later on, I may use it for tests by calling it using a <script rel="" src=""></script>
link, something like :
<script rel="script" src="/.../.../myFiddleScrip.js"></script>
JSfiddle store versions of our scripts, which my IDE doesn't.
Edit: I'am aware of the /show/ page, my question is is there an independant .js page ?
Edit: As of March 2013, the following patterns works! (pls +1 Danny's answer!)
- /show_js/
- /show_css/
- /show_html/
What is the url to get and only get this fiddle's javascript code ?
So later on, I may use it for tests by calling it using a <script rel="" src=""></script>
link, something like :
<script rel="script" src="http://jsfiddle.net/.../.../myFiddleScrip.js"></script>
JSfiddle store versions of our scripts, which my IDE doesn't.
Edit: I'am aware of the /show/ page, my question is is there an independant .js page ?
Edit: As of March 2013, the following patterns works! (pls +1 Danny's answer!)
- http://jsfiddle.net/username/c0dE5/dd/show_js/
- http://jsfiddle.net/hugolpz/QUTcW/37/show_css/
- http://jsfiddle.net/hugolpz/QUTcW/37/show_html/
- ^^ @user1479606 .. I could see how this would be very handy during development --> IE you create the Fiddle, make sure it works, and "test it" on your server's environment without having to upload. ... Although I think the script for Fiddle is inline ... ++ For the idea though .. – Zak Commented Mar 27, 2013 at 17:10
- Exactly. And JSfiddle store versions of your script, which my IDE doesn't. – Hugolpz Commented Mar 27, 2013 at 17:11
- 1 I think this isn't possible intentionally as it's not meant as a versioned file-host service, so if there were some way to do it cleanly they'd likely disable it on purpose. So it's not recommended to waste time trying, but if you really want to you could try to GET the source, extract the js inside the script tags, and then eval it...but it's probably definately not the recommmended way to do it. I'd strongly suggest looking into file versioning systems and IDE extensions instead, of which there are many free and premium choices. – BrianH Commented Mar 27, 2013 at 17:17
- Get a local git repo. – Colin DeClue Commented Mar 27, 2013 at 17:55
- 1 october 2019: options do not work – Danny '365CSI' Engelman Commented Oct 14, 2019 at 11:35
4 Answers
Reset to default 9It looks like you can add it to your page with the following:
<script type="text/javascript" src="http://jsfiddle.net/hugolpz/QUTcW/37/show_js/"></script>
However that url doesn't look to be officially documented and may change. More info here
see this : view-source:http://fiddle.jshell.net/hugolpz/QUTcW/37/show/
They do not create separate .js
file , they just put your script in script
tags
Edit: new solution by Danny is far easier !
From BrianDHall's comment emerge this heavy direction
- To GET the source http://jsfiddle.net/userName/CODE/DD/
- get the js panels's content (something like:
$('textarea#id_code_js').value()
), - clean it up and use it.
To explore further if you are interested.
If you are fluent in JS, feel free to share a script solving this question. I will valid it.
The following seems to work, too:
<script type="text/javascript" src="./"></script>