flavor comments
This commit is contained in:
parent
b4169832c6
commit
94058fa9eb
17
4chan_x.js
17
4chan_x.js
@ -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 = [];
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user