From fcbfd13afd8c2c5bd86ca34c6620674f224e4532 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Thu, 28 Apr 2016 03:07:51 -0700 Subject: [PATCH] Improve Sauce examples. --- Makefile | 2 -- src/General/Settings.coffee | 14 ++++++++++++++ src/config/Config.coffee | 31 ++++++++++++++++--------------- 3 files changed, 30 insertions(+), 17 deletions(-) diff --git a/Makefile b/Makefile index 1d5cd30ca..d108d80b2 100644 --- a/Makefile +++ b/Makefile @@ -54,8 +54,6 @@ uses_tests_enabled := \ imports_src/globals/globals.js := \ version.json -imports_src/config/Config.coffee := \ - src/Archive/archives.json imports_src/css/CSS.js := \ node_modules/font-awesome/package.json imports_src/Monitoring/Favicon.coffee := \ diff --git a/src/General/Settings.coffee b/src/General/Settings.coffee index bcc7e9076..a6e2a3858 100644 --- a/src/General/Settings.coffee +++ b/src/General/Settings.coffee @@ -309,6 +309,11 @@ Settings = changes = {} set = (key, value) -> data[key] = changes[key] = value + addSauces = (sauces) -> + if data['sauces']? + sauces = sauces.filter (s) -> data['sauces'].indexOf(s.match(/[^#;\s]+|$/)[0]) < 0 + if sauces.length + set 'sauces', data['sauces'] + '\n\n' + sauces.join('\n') compareString = version.replace(/\d+/g, (x) -> ('0000'+x)[-5..]) if compareString < '00001.00011.00008.00000' unless data['Fixed Thread Watcher']? @@ -357,6 +362,15 @@ Settings = if compareString < '00001.00011.00030.00000' if data['Quote Threading'] and not data['Thread Quotes']? set 'Thread Quotes', true + if compareString < '00001.00011.00032.00000' + if data['sauces']? + set 'sauces', data['sauces'].replace(/^(#?\s*)http:\/\/3d\.iqdb\.org\//mg, '$1//3d.iqdb.org/') + addSauces [ + '#https://desustorage.org/_/search/image/%sMD5/' + '#https://boards.fireden.net/_/search/image/%sMD5/' + '#https://foolz.fireden.net/_/search/image/%sMD5/' + '#//www.gif-explode.com/%URL;types:gif' + ] changes loadSettings: (data, cb) -> diff --git a/src/config/Config.coffee b/src/config/Config.coffee index d11d1942c..60f236d4f 100644 --- a/src/config/Config.coffee +++ b/src/config/Config.coffee @@ -713,26 +713,27 @@ Config = MD5: '' sauces: """ + # Reverse image search: https://www.google.com/searchbyimage?image_url=%IMG&safe=off - //iqdb.org/?url=%IMG - http://eye.swfchan.com/search/?q=%name;types:swf;sandbox - #//tineye.com/search?url=%IMG #https://www.yandex.com/images/search?rpt=imageview&img_url=%IMG + #//tineye.com/search?url=%IMG + + # Specialized reverse image search: + //iqdb.org/?url=%IMG + #//3d.iqdb.org/?url=%IMG #//saucenao.com/search.php?url=%IMG - #http://3d.iqdb.org/?url=%IMG - # tools: + + # "View Same" in archives: + http://eye.swfchan.com/search/?q=%name;types:swf;sandbox + #https://desustorage.org/_/search/image/%sMD5/ + #https://archive.4plebs.org/_/search/image/%sMD5/ + #https://boards.fireden.net/_/search/image/%sMD5/ + #https://foolz.fireden.net/_/search/image/%sMD5/ + + # Other tools: #http://regex.info/exif.cgi?imgurl=%URL #//imgops.com/%URL;types:gif,jpg,png - # uploaders: - #//imgur.com/upload?url=%URL;types:gif,jpg,png,pdf;text:Upload to imgur - # "View Same" in archives: - #https://archive.4plebs.org/_/search/image/%sMD5/;text:View same on 4plebs - #https://archive.4plebs.org/%board/search/image/%sMD5/;text:View same on 4plebs /%board/;boards:<%= - readJSON('/src/Archive/archives.json').filter(function(x) {return x.uid === 3})[0].files.join(',') - %> - #https://rbt.asia/%board/image/%sMD5;text:View same on RBT /%board/;boards:<%= - readJSON('/src/Archive/archives.json').filter(function(x) {return x.uid === 8})[0].files.join(',') - %> + #//www.gif-explode.com/%URL;types:gif """ FappeT: