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('