Fix no sauce from breaking 4chan X. Close #61

This commit is contained in:
Nicolas Stepien 2011-12-18 01:50:46 +01:00
parent 0ecf9193d1
commit 28a4761d1b
3 changed files with 4 additions and 2 deletions

View File

@ -2231,7 +2231,7 @@
sauce = {
init: function() {
sauce.prefixes = conf['flavors'].match(/^[^#].+$/gm);
if (!(sauce.prefixes = conf['flavors'].match(/^[^#].+$/gm)).length) return;
sauce.names = sauce.prefixes.map(function(prefix) {
return prefix.match(/(\w+)\./)[1];
});

View File

@ -1,4 +1,6 @@
master
- mayhem
fix empty sauce or all flavors commented out from breaking 4chan X
2.23.5
- mayhem

View File

@ -1790,7 +1790,7 @@ anonymize =
sauce =
init: ->
sauce.prefixes = conf['flavors'].match /^[^#].+$/gm
return unless (sauce.prefixes = conf['flavors'].match /^[^#].+$/gm).length
sauce.names = sauce.prefixes.map (prefix) -> prefix.match(/(\w+)\./)[1]
g.callbacks.push (root) ->
return if root.className is 'inline' or not span = $ '.filesize', root