use thumbs for sauce, close #327
This commit is contained in:
parent
80bf28e673
commit
fdc0086958
@ -126,7 +126,7 @@
|
||||
file: '',
|
||||
md5: ''
|
||||
},
|
||||
flavors: ['http://iqdb.org/?url=', 'http://google.com/searchbyimage?image_url=', '#http://regex.info/exif.cgi?url=', '#http://tineye.com/search?url=', '#http://saucenao.com/search.php?db=999&url=', '#http://imgur.com/upload?url='].join('\n'),
|
||||
flavors: ['http://iqdb.org/?url=', 'http://google.com/searchbyimage?image_url=', '#http://tineye.com/search?url=', '#http://saucenao.com/search.php?db=999&url=', '#http://imgur.com/upload?url='].join('\n'),
|
||||
time: '%m/%d/%y(%a)%H:%M',
|
||||
backlink: '>>%id',
|
||||
hotkeys: {
|
||||
@ -2170,11 +2170,11 @@
|
||||
return prefix.match(/(\w+)\./)[1];
|
||||
});
|
||||
return g.callbacks.push(function(root) {
|
||||
var i, link, prefix, span, suffix, _len, _ref, _results;
|
||||
if (root.className === 'inline' || !(span = $('.filesize', root))) {
|
||||
var i, link, prefix, suffix, thumb, _len, _ref, _results;
|
||||
if (root.className === 'inline' || !(thumb = $('img[md5]', root))) {
|
||||
return;
|
||||
}
|
||||
suffix = $('a', span).href;
|
||||
suffix = thumb.src;
|
||||
_ref = sauce.prefixes;
|
||||
_results = [];
|
||||
for (i = 0, _len = _ref.length; i < _len; i++) {
|
||||
|
||||
@ -55,7 +55,6 @@ config =
|
||||
flavors: [
|
||||
'http://iqdb.org/?url='
|
||||
'http://google.com/searchbyimage?image_url='
|
||||
'#http://regex.info/exif.cgi?url='
|
||||
'#http://tineye.com/search?url='
|
||||
'#http://saucenao.com/search.php?db=999&url='
|
||||
'#http://imgur.com/upload?url='
|
||||
@ -1651,8 +1650,8 @@ sauce =
|
||||
sauce.prefixes = conf['flavors'].match /^[^#].+$/gm
|
||||
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
|
||||
suffix = $('a', span).href
|
||||
return if root.className is 'inline' or not thumb = $ 'img[md5]', root
|
||||
suffix = thumb.src
|
||||
for prefix, i in sauce.prefixes
|
||||
link = $.el 'a',
|
||||
textContent: sauce.names[i]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user