diff --git a/.gitattributes b/.gitattributes index 67d83c596..66b75bc3c 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,6 +1,9 @@ # Auto detect text files and perform LF normalization * text=auto +builds/* -text +text eol=lf + # Custom for Visual Studio *.cs diff=csharp *.sln merge=union diff --git a/Gruntfile.coffee b/Gruntfile.coffee index 27162f687..59b1e5861 100755 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -2,10 +2,10 @@ module.exports = (grunt) -> grunt.util.linefeed = '\n' importCSS = (filename) -> - "\"\"\"#{grunt.file.read("src/General/css/#{filename}.css").replace(/\s+/g, ' ').trim()}\"\"\"" + "\"\"\"#{grunt.file.read("src/General/css/#{filename}.css").replace(/\s+/g, ' ').replace(/\r/g, '').trim()}\"\"\"" importHTML = (filename) -> - "(innerHTML: #{JSON.stringify(grunt.file.read("src/General/html/#{filename}.html").replace(/^\s+|\s+$ parts = template.split /([\$&@]){([^}`]*)}/ diff --git a/builds/appchan-x.user.js b/builds/appchan-x.user.js index e1ae6fe30..86ebe6905 100644 --- a/builds/appchan-x.user.js +++ b/builds/appchan-x.user.js @@ -4475,18 +4475,16 @@ return $.asap((function() { return footer = $.id('boardNavDesktopFoot'); }), function() { - var a, _i, _len, _ref, _results; + var a, _i, _len, _ref; if (a = $("a[href*='/" + g.BOARD + "/']", footer)) { a.className = 'current'; } if (Conf['JSON Navigation']) { _ref = $$('a', footer); - _results = []; for (_i = 0, _len = _ref.length; _i < _len; _i++) { a = _ref[_i]; - _results.push($.on(a, 'click', Navigate.navigate)); + $.on(a, 'click', Navigate.navigate); } - return _results; } }); }, @@ -7414,19 +7412,17 @@ }, archive: function() { return $.ready(function() { - var name, trip, _i, _j, _len, _len1, _ref, _ref1, _results; + var name, trip, _i, _j, _len, _len1, _ref, _ref1; _ref = $$('.name'); for (_i = 0, _len = _ref.length; _i < _len; _i++) { name = _ref[_i]; name.textContent = 'Anonymous'; } _ref1 = $$('.postertrip'); - _results = []; for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { trip = _ref1[_j]; - _results.push($.rm(trip)); + $.rm(trip); } - return _results; }); } }; @@ -15231,12 +15227,9 @@ } }), updatePosition: function() { - var _results; - _results = []; while (Unread.position && !Unread.posts.has(Unread.position.ID)) { - _results.push(Unread.position = Unread.position.next); + Unread.position = Unread.position.next; } - return _results; }, saveLastReadPost: $.debounce(2 * $.SECOND, function() { var ID, i, postIDs, _i, _ref, _ref1; diff --git a/builds/crx/script.js b/builds/crx/script.js index d8b45181b..ab01f12c0 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -4500,18 +4500,16 @@ return $.asap((function() { return footer = $.id('boardNavDesktopFoot'); }), function() { - var a, _i, _len, _ref, _results; + var a, _i, _len, _ref; if (a = $("a[href*='/" + g.BOARD + "/']", footer)) { a.className = 'current'; } if (Conf['JSON Navigation']) { _ref = $$('a', footer); - _results = []; for (_i = 0, _len = _ref.length; _i < _len; _i++) { a = _ref[_i]; - _results.push($.on(a, 'click', Navigate.navigate)); + $.on(a, 'click', Navigate.navigate); } - return _results; } }); }, @@ -7455,19 +7453,17 @@ }, archive: function() { return $.ready(function() { - var name, trip, _i, _j, _len, _len1, _ref, _ref1, _results; + var name, trip, _i, _j, _len, _len1, _ref, _ref1; _ref = $$('.name'); for (_i = 0, _len = _ref.length; _i < _len; _i++) { name = _ref[_i]; name.textContent = 'Anonymous'; } _ref1 = $$('.postertrip'); - _results = []; for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { trip = _ref1[_j]; - _results.push($.rm(trip)); + $.rm(trip); } - return _results; }); } }; @@ -15254,12 +15250,9 @@ } }), updatePosition: function() { - var _results; - _results = []; while (Unread.position && !Unread.posts.has(Unread.position.ID)) { - _results.push(Unread.position = Unread.position.next); + Unread.position = Unread.position.next; } - return _results; }, saveLastReadPost: $.debounce(2 * $.SECOND, function() { var ID, i, postIDs, _i, _ref, _ref1; diff --git a/src/Filtering/Anonymize.coffee b/src/Filtering/Anonymize.coffee index 915361dc6..56a6eef7c 100755 --- a/src/Filtering/Anonymize.coffee +++ b/src/Filtering/Anonymize.coffee @@ -22,4 +22,5 @@ Anonymize = archive: -> $.ready -> name.textContent = 'Anonymous' for name in $$ '.name' - $.rm trip for trip in $$ '.postertrip' \ No newline at end of file + $.rm trip for trip in $$ '.postertrip' + return diff --git a/src/General/Header.coffee b/src/General/Header.coffee index f00027f40..431beecef 100644 --- a/src/General/Header.coffee +++ b/src/General/Header.coffee @@ -82,6 +82,7 @@ Header = a.className = 'current' if Conf['JSON Navigation'] $.on a, 'click', Navigate.navigate for a in $$ 'a', footer + return bar: $.el 'div', id: 'header-bar' diff --git a/src/Monitoring/Unread.coffee b/src/Monitoring/Unread.coffee index 547b271a9..9813b5429 100755 --- a/src/Monitoring/Unread.coffee +++ b/src/Monitoring/Unread.coffee @@ -208,6 +208,7 @@ Unread = updatePosition: -> while Unread.position and !Unread.posts.has Unread.position.ID Unread.position = Unread.position.next + return saveLastReadPost: $.debounce 2 * $.SECOND, -> postIDs = Unread.thread.posts.keys