From 9eef88673bce7e536d28ec03ab833f8de36452dd Mon Sep 17 00:00:00 2001 From: Stefan Breunig Date: Tue, 26 Feb 2013 07:40:12 +0100 Subject: [PATCH] =?UTF-8?q?-=20fix=20redirecting=20on=20some=20systems=20-?= =?UTF-8?q?=20more=20restrictive=20match=20rules,=20shouldn=E2=80=99t=20ma?= =?UTF-8?q?tch=20anymore=20on=20Google=20Login=20(fix=20#314)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/main.js b/main.js index 4523e8b4..a5e166ff 100644 --- a/main.js +++ b/main.js @@ -6,22 +6,24 @@ // @updateURL https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/dist/total-conversion-build.user.js // @downloadURL https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/dist/total-conversion-build.user.js // @description total conversion for the ingress intel map. -// @include *://www.ingress.com/intel* -// @match *://www.ingress.com/intel* +// @include http://www.ingress.com/intel* +// @include https://www.ingress.com/intel* +// @match http://www.ingress.com/intel* +// @match https://www.ingress.com/intel* // ==/UserScript== // REPLACE ORIG SITE /////////////////////////////////////////////////// if(document.getElementsByTagName('html')[0].getAttribute('itemscope') != null) throw('Ingress Intel Website is down, not a userscript issue.'); - window.iitcBuildDate = '@@BUILDDATE@@'; // disable vanilla JS window.onload = function() {}; if(window.location.protocol !== 'https:') { - window.location.protocol = 'https:'; + var redir = window.location.href.replace(/^http:/, 'https:'); + window.location = redir; throw('Need to load HTTPS version.'); }