From 85bb0c1ed3f27f7a792196df48781ec805533f86 Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Wed, 24 Oct 2018 17:37:13 +0100 Subject: [PATCH] Tweak chrome extentions for .local.jh domans --- chromeExtentions/dotcss/dotcss.js | 4 ++-- chromeExtentions/dotjs/dotjs.js | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/chromeExtentions/dotcss/dotcss.js b/chromeExtentions/dotcss/dotcss.js index 5546c94f..6038d683 100644 --- a/chromeExtentions/dotcss/dotcss.js +++ b/chromeExtentions/dotcss/dotcss.js @@ -1,6 +1,6 @@ if(window.location.host.indexOf(".local") == -1){ var xhr = new XMLHttpRequest(); - xhr.open('GET', 'https://dotcss.local/' + window.location.host.replace(/^www\./, '') + '.css'); + xhr.open('GET', 'https://dotcss.local.jh/' + window.location.host.replace(/^www\./, '') + '.css'); xhr.onreadystatechange = function() { if(xhr.readyState == 4) { @@ -11,7 +11,7 @@ if(window.location.host.indexOf(".local") == -1){ return } else if(xhr.status == 404) { var defaultXHR = new XMLHttpRequest(); - defaultXHR.open('GET', 'https://dotcss.local/default.css'); + defaultXHR.open('GET', 'https://dotcss.local.jh/default.css'); defaultXHR.onreadystatechange = function() { if (defaultXHR.readyState == 4 && defaultXHR.status == 200){ var style = document.createElement('style'); diff --git a/chromeExtentions/dotjs/dotjs.js b/chromeExtentions/dotjs/dotjs.js index 0de96e13..75a74445 100644 --- a/chromeExtentions/dotjs/dotjs.js +++ b/chromeExtentions/dotjs/dotjs.js @@ -1,6 +1,4 @@ -console.log( "yay" ); if(window.location.host.indexOf(".local.jh") == -1){ -console.log( "I get here" ); var xhr = new XMLHttpRequest(); xhr.open('GET', 'https://dotjs.local.jh/' + window.location.host.replace(/^www\./, '') + '.js');