JSFiddle
On posts labeled HTML, JavaScript, or CSS, there should be a button labeled "Create Fiddle". The code in the posts may be sorted by the following rules. The first to match is considered correct. If none match, none are considered correct.
- More
<
and>
than{
and}
is HTML (minimum 4 brackets) - CSS if contains equal or greater number of colons than semicolons
- JavaScript if
- contains 1 or more semicolons
- one or more
"var"
or"function"
, or three or more other JavaScript keywords - reason being other keywords are common in other languages
Ideone
If tagged with a language supported by Ideone, other than JavaScript.
Workflow
The user is shown a button, like the one on the right.
Upon clicking it, StackOverflow makes an API call to host the code on JSFiddle.net. The URL is returned by posting a comment as the user that clicks Create Fiddle. The user is also redirected to the fiddle, via an _blank target on the link.
As with other automatic comments, the user may make changes to the comment, or remove it. If they feel it doesn't transfer well to a fiddle, the commend may be removed. If there's a glitch in the processing of the post; the user may fix the fiddle, click Update, and amend their comment to contain the new URL.
The same applies to Ideone, and their Clone feature.
Overall, this would improve answer speed. The worst case scenario, is that the user clicked the button, and it just didn't work. A few seconds lost on occasion is made up for by the massive collective time saved, and the benefit of more interactive solutions on StackOverflow.