"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "web/onload.js" between
js-beautify-1.14.4.tar.gz and js-beautify-1.14.5.tar.gz

About: JS Beautifier is a JavaScript (and bookmarket) beautifier.

onload.js  (js-beautify-1.14.4):onload.js  (js-beautify-1.14.5)
/*jshint node:false, jquery:true, strict:false */ /*jshint node:false, jquery:true, strict:false */
$(function() { $(function() {
read_settings_from_cookie(); read_settings_from_cookie();
$.getJSON("./package.json", function(data) { $.getJSON("./package.json", function(data) {
$('#version-number').text('(v' + data.version + ')'); $('#version-number').text('(v' + data.version + ')');
}); });
var default_text = var default_text =
"// This is just a sample script. Paste your real code (javascript or HTML) here.\n\nif ('this_is'==/an_example/){of_beautifier();}else{var a=b?(c%d):e[f];} "; "// This is just a sample script. Paste your real code (javascript or HTML) here.\n\nif ('this_is'==/an_example/){of_beautifier();}else{var a=b?(c%d):e[f];} ";
var textArea = $('#source')[0]; var textArea = $('#source')[0];
$('#source').val(default_text); $('#source').val(default_text);
if (the.use_codemirror && typeof CodeMirror !== 'undefined') { if (the.use_codemirror && typeof CodeMirror !== 'undefined') {
the.editor = CodeMirror.fromTextArea(textArea, { the.editor = CodeMirror.fromTextArea(textArea, {
lineNumbers: true lineNumbers: true
}); });
setPreferredColorScheme();
set_editor_mode(); set_editor_mode();
the.editor.focus(); the.editor.focus();
$('.CodeMirror').click(function() { $('.CodeMirror').click(function() {
if (the.editor.getValue() === default_text) { if (the.editor.getValue() === default_text) {
the.editor.setValue(''); the.editor.setValue('');
} }
}); });
} else { } else {
$('#source').bind('click focus', function() { $('#source').bind('click focus', function() {
 End of changes. 2 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)