From 700a706ce27681a1b3c7691c0f2fc7d204e5a384 Mon Sep 17 00:00:00 2001 From: ibit <48777551+Ibit-to@users.noreply.github.com> Date: Sat, 6 Apr 2019 01:15:46 +0200 Subject: [PATCH] restore PR changes --- extension/u.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/extension/u.js b/extension/u.js index c344287..4bd4d4c 100644 --- a/extension/u.js +++ b/extension/u.js @@ -2,14 +2,14 @@ $(function () { if (window.location.href.indexOf('//www.google') === -1) { return } - s = $('#search div.g').last() + var s = $('#search div.g').last() $('div i > a').each(function (i, a) { if (a.href.toLowerCase().indexOf('chillingeffects') === -1) { return } - id = a.href.replace(/https?:\/\/www\.chillingeffects\.org\/notice.cgi\?sID=/, '') - url = 'https://www.lumendatabase.org/notices/' + id + var id = a.href.replace(/https?:\/\/www\.chillingeffects\.org\/notice.cgi\?sID=/, '') + var url = 'https://www.lumendatabase.org/notices/' + id if (navigator.userAgent.toLowerCase().indexOf('firefox') === -1) { url = 'https://secret-ocean-49799.herokuapp.com/' + url } @@ -18,8 +18,8 @@ $(function () { url: url, dataType: 'html', success: function (data) { - links = data.match(/>(https?:\/\/[^<]+)<\/li>/g) - for (i in links) { + var links = data.match(/>(https?:\/\/[^<]+)<\/li>/g) + for (var i in links) { u = links[i].replace('', '').replace('>', '') s.after('
' + '' + u + ''