Hello World Example
by Manpreet Singh
HTML
<h1>Hello world!</h1>
<p>This is a demo app that shows how to Fiddle with Firefox OS using JSFiddle! Please fork me and make wonderful things</p>
JavaScript
//Bam, a basic alert
//alert(document.getElementsByTagName('h1')[0].innerHTML);
//alert("hello")
var str = "src='path/to/image/name.jpg'"
str.replace(/<img([^>]*)\ssrc=(['"])(?:[^\2\/]*\/)*([^\2]+)\2/gi, "<img$1 src=$2newPath/$3$2");
//str.replace(/src='(?:[^'\/]*\/)*([^']+)'/g, "src='newPath/$1'");
alert(str);