flavor comments

This commit is contained in:
James Campos 2011-05-07 00:17:16 -07:00
parent b4169832c6
commit 94058fa9eb
2 changed files with 16 additions and 4 deletions

View File

@ -94,7 +94,7 @@
'Unread Count': [true, 'Show unread post count in tab title']
},
textarea: {
flavors: ['http://regex.info/exif.cgi?url=', 'http://iqdb.org/?url=', 'http://tineye.com/search?url='].join('\n')
flavors: ['http://regex.info/exif.cgi?url=', 'http://iqdb.org/?url=', 'http://tineye.com/search?url=', '#http://saucenao.com/search.php?db=999&url='].join('\n')
}
},
updater: {
@ -1592,8 +1592,19 @@
},
cb: {
node: function(root) {
var i, link, names, prefix, prefixes, span, suffix, _i, _len, _ref, _results;
prefixes = $.config('flavors').split('\n');
var i, link, names, prefix, prefixes, s, span, suffix, _i, _len, _ref, _results;
prefixes = (function() {
var _i, _len, _ref, _results;
_ref = $.config('flavors').split('\n');
_results = [];
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
s = _ref[_i];
if (s[0] !== '#') {
_results.push(s);
}
}
return _results;
})();
names = (function() {
var _i, _len, _results;
_results = [];

View File

@ -41,6 +41,7 @@ config =
'http://regex.info/exif.cgi?url='
'http://iqdb.org/?url='
'http://tineye.com/search?url='
'#http://saucenao.com/search.php?db=999&url='
].join '\n'
updater:
checkbox:
@ -1263,7 +1264,7 @@ sauce =
g.callbacks.push sauce.cb.node
cb:
node: (root) ->
prefixes = $.config('flavors').split '\n'
prefixes = (s for s in ($.config('flavors').split '\n') when s[0] != '#')
names = (prefix.match(/(\w+)\./)[1] for prefix in prefixes)
for span in $$ 'span.filesize', root
suffix = $('a', span).href