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