"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "web/common-function.js" between
js-beautify-1.13.13.tar.gz and js-beautify-1.14.0.tar.gz

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

common-function.js  (js-beautify-1.13.13):common-function.js  (js-beautify-1.14.0)
/*jshint strict:false, node:false */ /*jshint strict:false, node:false */
/*exported run_tests, read_settings_from_cookie, beautify, submitIssue, copyText , selectAll*/ /*exported run_tests, read_settings_from_cookie, beautify, submitIssue, copyText , selectAll, clearAll, changeToFileContent*/
var the = { var the = {
use_codemirror: !window.location.href.match(/without-codemirror/), use_codemirror: !window.location.href.match(/without-codemirror/),
beautifier_file: window.location.href.match(/debug/) ? 'beautifier' : './beaut ifier.min', beautifier_file: window.location.href.match(/debug/) ? 'beautifier' : './beaut ifier.min',
beautifier: null, beautifier: null,
beautify_in_progress: false, beautify_in_progress: false,
editor: null // codemirror editor editor: null // codemirror editor
}; };
requirejs.config({ requirejs.config({
//By default load any module IDs from js/lib //By default load any module IDs from js/lib
skipping to change at line 343 skipping to change at line 343
} }
} }
function selectAll() { function selectAll() {
if (the.editor) { if (the.editor) {
the.editor.execCommand('selectAll'); the.editor.execCommand('selectAll');
} else { } else {
$('#source').select(); $('#source').select();
} }
} }
function clearAll() {
if (the.editor) {
the.editor.setValue('');
} else {
$('#source').val('');
}
}
function changeToFileContent(input) {
var file = input.files[0];
if (file) {
var reader = new FileReader();
reader.readAsText(file, "UTF-8");
reader.onload = function(event) {
if (the.editor) {
the.editor.setValue(event.target.result);
} else {
$('#source').val(event.target.result);
}
};
}
}
 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)