Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' of git@yuisource.corp.yahoo.com:yuicompressor

  • Loading branch information...
commit 9ab0961aeef168ca56ce08c6abb130a5343cb247 2 parents ce3998b + 1e10c35
@stoyan stoyan authored
View
15 src/com/yahoo/platform/yui/compressor/YUICompressor.java
@@ -47,10 +47,15 @@ public static void main(String args[]) {
String charset = (String) parser.getOptionValue(charsetOpt);
if (charset == null || !Charset.isSupported(charset)) {
- charset = System.getProperty("file.encoding");
- if (charset == null) {
- charset = "UTF-8";
- }
+ // charset = System.getProperty("file.encoding");
+ // if (charset == null) {
+ // charset = "UTF-8";
+ // }
+
+ // UTF-8 seems to be a better choice than what the system is reporting
+ charset = "UTF-8";
+
+
if (verbose) {
System.err.println("\n[INFO] Using charset " + charset);
}
@@ -209,7 +214,7 @@ public EvaluatorException runtimeError(String message, String sourceName,
}
private static void usage() {
- System.out.println(
+ System.err.println(
"\nUsage: java -jar yuicompressor-x.y.z.jar [options] [input file]\n\n"
+ "Global Options\n"
View
8 tests/_munge.js
@@ -0,0 +1,8 @@
+(function() {
+ var w = window;
+
+ w.hello = function(a, abc) {
+ "a:nomunge";
+ w.alert("Hello, " + a);
+ };
+})();
View
1  tests/_munge.js.min
@@ -0,0 +1 @@
+(function(){var a=window;a.hello=function(a,b){a.alert("Hello, "+a)}})();
View
5 tests/_string_combo.js
@@ -0,0 +1,5 @@
+function test(){
+ var a = "a" +
+ "b" +
+ "c";
+}
View
1  tests/_string_combo.js.min
@@ -0,0 +1 @@
+function test(){var b="abc"};
View
73 tests/_syntax_error.js
@@ -0,0 +1,73 @@
+
+window.$ = $telerik.$;
+$(document).ready(function() {
+movePageElements();
+
+var text = $('textarea').val();
+
+if (text != "")
+$('textarea').attr("style", "display: block;");
+else
+$('textarea').attr("style", "display: none;");
+
+//cleanup
+text = null;
+});
+
+function movePageElements() {
+var num = null;
+var pagenum = $(".pagecontrolscontainer");
+if (pagenum.length > 0) {
+var num = pagenum.attr("pagenumber");
+if ((num > 5) && (num < 28)) {
+var x = $('div#commentbutton');
+$("div.buttonContainer").prepend(x);
+}
+else {
+$('div#commentbutton').attr("style", "display: none;");
+}
+}
+
+//Add in dropshadowing
+if ((num > 5) && (num < 28)) {
+var top = $('.dropshadow-top');
+var middle = $('#dropshadow');
+var bottom = $('.dropshadow-bottom');
+$('#page').prepend(top);
+$('#topcontainer').after(middle);
+middle.append($('#topcontainer'));
+middle.after(bottom);
+}
+
+//cleanup
+num = null;
+pagenum = null;
+top = null;
+middle = null;
+bottom=null;
+}
+
+function expandCollapseDiv(id) {
+$telerik.$(id).slideToggle("slow");
+}
+
+function expandCollapseHelp() {
+$('.helpitems').slideToggle("slow");
+
+//Add in dropshadowing
+if ($('#helpcontainer').length) {
+$('#help-dropshadow-bot').insertAfter('#helpcontainer');
+$('#help-dropshadow-bot').removeAttr("style");
+}
+}
+
+function expandCollapseComments() {
+var style = $('textarea').attr("style");
+if (style == "display: none;")
+$('textarea').fadeIn().focus();
+else
+$('textarea').fadeOut();
+
+//cleanup
+style = null;
+}
View
1  tests/_syntax_error.js.min
@@ -0,0 +1 @@
+window.$=$telerik.$;$(document).ready(function(){movePageElements();var a=$("textarea").val();if(a!=""){$("textarea").attr("style","display: block;")}else{$("textarea").attr("style","display: none;")}a=null});function movePageElements(){var e=null;var b=$(".pagecontrolscontainer");if(b.length>0){var e=b.attr("pagenumber");if((e>5)&&(e<28)){var a=$("div#commentbutton");$("div.buttonContainer").prepend(a)}else{$("div#commentbutton").attr("style","display: none;")}}if((e>5)&&(e<28)){var f=$(".dropshadow-top");var d=$("#dropshadow");var c=$(".dropshadow-bottom");$("#page").prepend(f);$("#topcontainer").after(d);d.append($("#topcontainer"));d.after(c)}e=null;b=null;f=null;d=null;c=null}function expandCollapseDiv(a){$telerik.$(a).slideToggle("slow")}function expandCollapseHelp(){$(".helpitems").slideToggle("slow");if($("#helpcontainer").length){$("#help-dropshadow-bot").insertAfter("#helpcontainer");$("#help-dropshadow-bot").removeAttr("style")}}function expandCollapseComments(){var a=$("textarea").attr("style");if(a=="display: none;"){$("textarea").fadeIn().focus()}else{$("textarea").fadeOut()}a=null};
Please sign in to comment.
Something went wrong with that request. Please try again.