This commit is contained in:
ccd0 2015-01-24 11:11:35 -08:00
commit 02888aac1a
7 changed files with 19 additions and 27 deletions

3
.gitattributes vendored
View File

@ -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

View File

@ -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+$</gm, '').replace(/\n/g, '')).replace(/\\\\u/g, '\\u')})"
"(innerHTML: #{JSON.stringify(grunt.file.read("src/General/html/#{filename}.html").replace(/^ +| +$</gm, '').replace(/\r?\n/g, '')).replace(/\\\\u/g, '\\u')})"
html = (template) ->
parts = template.split /([\$&@]){([^}`]*)}/

View File

@ -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;

View File

@ -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;

View File

@ -22,4 +22,5 @@ Anonymize =
archive: ->
$.ready ->
name.textContent = 'Anonymous' for name in $$ '.name'
$.rm trip for trip in $$ '.postertrip'
$.rm trip for trip in $$ '.postertrip'
return

View File

@ -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'

View File

@ -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