demos: view source should show the actual full source, not just the javascript

This commit is contained in:
Paul Bakaus
2009-01-24 11:12:40 +00:00
parent 7b3801239c
commit 90c53fab7c

View File

@@ -153,7 +153,7 @@
function loadDemo(path) {
var directory = path.match(/([^\/]+)\/[^\/\.]+\.html$/)[1];
$.get(path, function(data) {
var source = data.match(/<script.*>.*<\/script>/ig)[1];
var source = data;
data = data.replace(/<script.*>.*<\/script>/ig,""); // Remove script tags
data = data.replace(/<\/?link.*>/ig,""); //Remove link tags
data = data.replace(/<\/?html.*>/ig,""); //Remove html tag