// changed at Fri May 04 2012 11:38:06 GMT+0200 (Mitteleuropäische Sommerzeit) by undefined this.addScript(function format() { var text = this.textString; var i = 0; var tokens = {}; while(text.match(/([=\(:;][\n ]*)(\/([^\n\/]|\\\/)+[^\\]\/)/)){ tokens[i] = text.match(/([=\(:;][\n ]*)(\/([^\n\/]|\\\/)+[^\\]\/)/)[2]; text = text.replace(/([=\(:;][\n ]*)(\/([^\n\/]|\\\/)+[^\\]\/)/, "$1\u0007"+i); i++; } while(text.match(/"[^"\n]*"/)){ tokens[i] = text.match(/"[^"]*"/)[0]; text = text.replace(/"[^"]*"/, "\u0007"+i); i++; } while(text.match(/'[^'\n]*'/)){ tokens[i] = text.match(/'[^']*'/)[0]; text = text.replace(/'[^']*'/, "\u0007"+i); i++; } while(text.match(/\/\/[^\n]*\n/)){ tokens[i] = text.match(/\/\/[^\n]*\n/)[0]; text = text.replace(/\/\/[^\n]*\n/, "\u0007"+i); i++; } while(text.match(/\/\*(.|\n)*?\*\//)){ tokens[i] = text.match(/\/\*(.|\n)*?\*\//)[0]; text = text.replace(/\/\*(.|\n)*?\*\//, "\u0007"+i); i++; } if(this.doInsertLinebreaks){ text = this.insertLinebreaks_noStrings(text); } if(this.doInsertWhitespace){ text = this.insertSpaces_noStrings(text); } text = this.indent_noStrings(text); while(i > 0){ i--; text= text.replace(new RegExp("\u0007"+i),tokens[i]); } this.textString = text; }).tag([]);
Print it pretty
Insert Linebreaks
Insert Whitespace
Pretty Print Javascript
X
M
–