From 1833e69d50234bbb6b6d2651740d08a6196fdefa Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Wed, 13 Mar 2013 20:58:05 +0100 Subject: [PATCH] Use https by default for Google image search. TinEye allows https. Remove the db argument for saucenao. ompldr changed its domain once again. url -> URL --- 4chan_x.user.js | 14 +++++++------- src/config.coffee | 16 ++++++++-------- src/features.coffee | 16 ++++++++-------- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index cdf750c52..90931245c 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -140,7 +140,7 @@ filesize: [''].join('\n'), MD5: [''].join('\n') }, - sauces: ['http://iqdb.org/?url=%turl', 'http://www.google.com/searchbyimage?image_url=%turl', '#http://tineye.com/search?url=%turl', '#http://saucenao.com/search.php?db=999&url=%turl', '#http://3d.iqdb.org/?url=%turl', '#http://regex.info/exif.cgi?imgurl=%url', '# uploaders:', '#http://imgur.com/upload?url=%url;text:Upload to imgur', '#http://omploader.org/upload?url1=%url;text:Upload to omploader', '# "View Same" in archives:', '#//archive.foolz.us/_/search/image/%MD5/;text:View same on foolz', '#//archive.foolz.us/%board/search/image/%MD5/;text:View same on foolz /%board/', '#//archive.installgentoo.net/%board/image/%MD5;text:View same on installgentoo /%board/'].join('\n'), + sauces: ['http://iqdb.org/?url=%TURL', 'https://www.google.com/searchbyimage?image_url=%TURL', '#//tineye.com/search?url=%TURL', '#http://saucenao.com/search.php?url=%TURL', '#http://3d.iqdb.org/?url=%TURL', '#http://regex.info/exif.cgi?imgurl=%URL', '# uploaders:', '#http://imgur.com/upload?url=%URL;text:Upload to imgur', '#http://ompldr.org/upload?url1=%URL;text:Upload to ompldr', '# "View Same" in archives:', '#//archive.foolz.us/_/search/image/%MD5/;text:View same on foolz', '#//archive.foolz.us/%board/search/image/%MD5/;text:View same on foolz /%board/', '#//archive.installgentoo.net/%board/image/%MD5;text:View same on installgentoo /%board/'].join('\n'), 'Header auto-hide': false, 'Header catalog links': false, boardnav: '[current-title / toggle-all]', @@ -1487,9 +1487,9 @@ data.Conf.sauces = data.Conf.sauces.replace(/\$\d/g, function(c) { switch (c) { case '$1': - return '%turl'; + return '%TURL'; case '$2': - return '%url'; + return '%URL'; case '$3': return '%MD5'; case '$4': @@ -1554,7 +1554,7 @@ }, sauce: function(section) { var sauce; - section.innerHTML = "
Sauce is disabled.
\n
Lines starting with a # will be ignored.
\n
You can specify a display text by appending ;text:[text] to the url.
\n\n"; + section.innerHTML = "
Sauce is disabled.
\n
Lines starting with a # will be ignored.
\n
You can specify a display text by appending ;text:[text] to the URL.
\n\n"; sauce = $('textarea', section); sauce.value = $.get('sauces', Conf['sauces']); return $.on(sauce, 'change', $.cb.value); @@ -4556,11 +4556,11 @@ }, createSauceLink: function(link) { var m, text; - link = link.replace(/%(t?url|MD5|board)/g, function(parameter) { + link = link.replace(/%(T?URL|MD5|board)/g, function(parameter) { switch (parameter) { - case '%turl': + case '%TURL': return "' + post.file.thumbURL + '"; - case '%url': + case '%URL': return "' + post.file.URL + '"; case '%MD5': return "' + encodeURIComponent(post.file.MD5) + '"; diff --git a/src/config.coffee b/src/config.coffee index 9ca1bde9a..acf651f39 100644 --- a/src/config.coffee +++ b/src/config.coffee @@ -114,15 +114,15 @@ Config = '' ].join '\n' sauces: [ - 'http://iqdb.org/?url=%turl' - 'http://www.google.com/searchbyimage?image_url=%turl' - '#http://tineye.com/search?url=%turl' - '#http://saucenao.com/search.php?db=999&url=%turl' - '#http://3d.iqdb.org/?url=%turl' - '#http://regex.info/exif.cgi?imgurl=%url' + 'http://iqdb.org/?url=%TURL' + 'https://www.google.com/searchbyimage?image_url=%TURL' + '#//tineye.com/search?url=%TURL' + '#http://saucenao.com/search.php?url=%TURL' + '#http://3d.iqdb.org/?url=%TURL' + '#http://regex.info/exif.cgi?imgurl=%URL' '# uploaders:' - '#http://imgur.com/upload?url=%url;text:Upload to imgur' - '#http://omploader.org/upload?url1=%url;text:Upload to omploader' + '#http://imgur.com/upload?url=%URL;text:Upload to imgur' + '#http://ompldr.org/upload?url1=%URL;text:Upload to ompldr' '# "View Same" in archives:' '#//archive.foolz.us/_/search/image/%MD5/;text:View same on foolz' '#//archive.foolz.us/%board/search/image/%MD5/;text:View same on foolz /%board/' diff --git a/src/features.coffee b/src/features.coffee index a8a9a80ed..b5720f3f0 100644 --- a/src/features.coffee +++ b/src/features.coffee @@ -401,9 +401,9 @@ Settings = data.Conf.sauces = data.Conf.sauces.replace /\$\d/g, (c) -> switch c when '$1' - '%turl' + '%TURL' when '$2' - '%url' + '%URL' when '$3' '%MD5' when '$4' @@ -492,10 +492,10 @@ Settings = section.innerHTML = """
Sauce is disabled.
Lines starting with a # will be ignored.
-
You can specify a display text by appending ;text:[text] to the url.
+
You can specify a display text by appending ;text:[text] to the URL.
@@ -3043,11 +3043,11 @@ Sauce = name: 'Sauce' cb: @node createSauceLink: (link) -> - link = link.replace /%(t?url|MD5|board)/g, (parameter) -> + link = link.replace /%(T?URL|MD5|board)/g, (parameter) -> switch parameter - when '%turl' + when '%TURL' "' + post.file.thumbURL + '" - when '%url' + when '%URL' "' + post.file.URL + '" when '%MD5' "' + encodeURIComponent(post.file.MD5) + '"