From e59b69e3f2cc9f1f6f4952c840f3740eed676b9f Mon Sep 17 00:00:00 2001 From: Valters Jansons Date: Sun, 25 Feb 2018 12:31:36 +0200 Subject: [PATCH 1/2] Add TLS to HTTP links Please use HTTPS wherever it is supported. It is just good practise, you know. This follows up commit 98924bc12e959581f07a1a1d48ee26a73cd03076. --- CookieMonster.js | 10 +++++----- src/Cache.js | 2 +- src/Disp.js | 6 +++--- src/Main.js | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/CookieMonster.js b/CookieMonster.js index 77a4beb..76f8e4a 100644 --- a/CookieMonster.js +++ b/CookieMonster.js @@ -25,7 +25,7 @@ CM.Sim = {}; CM.Cache.AddQueue = function() { CM.Cache.Queue = document.createElement('script'); CM.Cache.Queue.type = 'text/javascript'; - CM.Cache.Queue.setAttribute('src', 'http://aktanusa.github.io/CookieMonster/queue/queue.js'); + CM.Cache.Queue.setAttribute('src', 'https://aktanusa.github.io/CookieMonster/queue/queue.js'); document.head.appendChild(CM.Cache.Queue); } @@ -703,7 +703,7 @@ CM.Disp.GetConfigDisplay = function(config) { CM.Disp.AddJscolor = function() { CM.Disp.Jscolor = document.createElement('script'); CM.Disp.Jscolor.type = 'text/javascript'; - CM.Disp.Jscolor.setAttribute('src', 'http://aktanusa.github.io/CookieMonster/jscolor/jscolor.js'); + CM.Disp.Jscolor.setAttribute('src', 'https://aktanusa.github.io/CookieMonster/jscolor/jscolor.js'); document.head.appendChild(CM.Disp.Jscolor); } @@ -1301,10 +1301,10 @@ CM.Disp.CreateFavicon = function() { CM.Disp.UpdateFavicon = function() { if (CM.Config.Favicon == 1 && CM.Disp.lastGoldenCookieState) { if (CM.Disp.goldenShimmer.wrath) { - CM.Disp.Favicon.href = 'http://aktanusa.github.io/CookieMonster/favicon/wrathCookie.ico'; + CM.Disp.Favicon.href = 'https://aktanusa.github.io/CookieMonster/favicon/wrathCookie.ico'; } else { - CM.Disp.Favicon.href = 'http://aktanusa.github.io/CookieMonster/favicon/goldenCookie.ico'; + CM.Disp.Favicon.href = 'https://aktanusa.github.io/CookieMonster/favicon/goldenCookie.ico'; } } else { @@ -2745,7 +2745,7 @@ CM.DelayInit = function() { CM.HasReplaceNativeGrimoireLaunch = false; CM.HasReplaceNativeGrimoireDraw = false; -CM.ConfigDefault = {BotBar: 1, TimerBar: 1, TimerBarPos: 0, BuildColor: 1, BulkBuildColor: 0, UpBarColor: 1, CalcWrink: 0, CPSMode: 1, AvgCPSHist: 0, AvgClicksHist: 0, ToolWarnCautBon: 0, Flash: 1, Sound: 1, Volume: 100, GCSoundURL: 'http://freesound.org/data/previews/66/66717_931655-lq.mp3', SeaSoundURL: 'http://www.freesound.org/data/previews/121/121099_2193266-lq.mp3', GCTimer: 1, Title: 1, Favicon: 1, Tooltip: 1, TooltipAmor: 0, ToolWarnCaut: 1, ToolWarnCautPos: 1, ToolWrink: 1, Stats: 1, UpStats: 1, TimeFormat: 0, SayTime: 1, Scale: 2, StatsPref: {Lucky: 1, Chain: 1, Prestige: 1, Wrink: 1, Sea: 1, Misc: 1}, Colors : {Blue: '#4bb8f0', Green: '#00ff00', Yellow: '#ffff00', Orange: '#ff7f00', Red: '#ff0000', Purple: '#ff00ff', Gray: '#b3b3b3', Pink: '#ff1493', Brown: '#8b4513'}}; +CM.ConfigDefault = {BotBar: 1, TimerBar: 1, TimerBarPos: 0, BuildColor: 1, BulkBuildColor: 0, UpBarColor: 1, CalcWrink: 0, CPSMode: 1, AvgCPSHist: 0, AvgClicksHist: 0, ToolWarnCautBon: 0, Flash: 1, Sound: 1, Volume: 100, GCSoundURL: 'https://freesound.org/data/previews/66/66717_931655-lq.mp3', SeaSoundURL: 'https://www.freesound.org/data/previews/121/121099_2193266-lq.mp3', GCTimer: 1, Title: 1, Favicon: 1, Tooltip: 1, TooltipAmor: 0, ToolWarnCaut: 1, ToolWarnCautPos: 1, ToolWrink: 1, Stats: 1, UpStats: 1, TimeFormat: 0, SayTime: 1, Scale: 2, StatsPref: {Lucky: 1, Chain: 1, Prestige: 1, Wrink: 1, Sea: 1, Misc: 1}, Colors : {Blue: '#4bb8f0', Green: '#00ff00', Yellow: '#ffff00', Orange: '#ff7f00', Red: '#ff0000', Purple: '#ff00ff', Gray: '#b3b3b3', Pink: '#ff1493', Brown: '#8b4513'}}; CM.ConfigPrefix = 'CMConfig'; CM.VersionMajor = '2.0042'; diff --git a/src/Cache.js b/src/Cache.js index 39c4ae3..ea3d7b0 100644 --- a/src/Cache.js +++ b/src/Cache.js @@ -5,7 +5,7 @@ CM.Cache.AddQueue = function() { CM.Cache.Queue = document.createElement('script'); CM.Cache.Queue.type = 'text/javascript'; - CM.Cache.Queue.setAttribute('src', 'http://aktanusa.github.io/CookieMonster/queue/queue.js'); + CM.Cache.Queue.setAttribute('src', 'https://aktanusa.github.io/CookieMonster/queue/queue.js'); document.head.appendChild(CM.Cache.Queue); } diff --git a/src/Disp.js b/src/Disp.js index a91aab5..f1787cd 100644 --- a/src/Disp.js +++ b/src/Disp.js @@ -153,7 +153,7 @@ CM.Disp.GetConfigDisplay = function(config) { CM.Disp.AddJscolor = function() { CM.Disp.Jscolor = document.createElement('script'); CM.Disp.Jscolor.type = 'text/javascript'; - CM.Disp.Jscolor.setAttribute('src', 'http://aktanusa.github.io/CookieMonster/jscolor/jscolor.js'); + CM.Disp.Jscolor.setAttribute('src', 'https://aktanusa.github.io/CookieMonster/jscolor/jscolor.js'); document.head.appendChild(CM.Disp.Jscolor); } @@ -751,10 +751,10 @@ CM.Disp.CreateFavicon = function() { CM.Disp.UpdateFavicon = function() { if (CM.Config.Favicon == 1 && CM.Disp.lastGoldenCookieState) { if (CM.Disp.goldenShimmer.wrath) { - CM.Disp.Favicon.href = 'http://aktanusa.github.io/CookieMonster/favicon/wrathCookie.ico'; + CM.Disp.Favicon.href = 'https://aktanusa.github.io/CookieMonster/favicon/wrathCookie.ico'; } else { - CM.Disp.Favicon.href = 'http://aktanusa.github.io/CookieMonster/favicon/goldenCookie.ico'; + CM.Disp.Favicon.href = 'https://aktanusa.github.io/CookieMonster/favicon/goldenCookie.ico'; } } else { diff --git a/src/Main.js b/src/Main.js index 335dd2b..e5efcd2 100644 --- a/src/Main.js +++ b/src/Main.js @@ -247,7 +247,7 @@ CM.DelayInit = function() { CM.HasReplaceNativeGrimoireLaunch = false; CM.HasReplaceNativeGrimoireDraw = false; -CM.ConfigDefault = {BotBar: 1, TimerBar: 1, TimerBarPos: 0, BuildColor: 1, BulkBuildColor: 0, UpBarColor: 1, CalcWrink: 0, CPSMode: 1, AvgCPSHist: 0, AvgClicksHist: 0, ToolWarnCautBon: 0, Flash: 1, Sound: 1, Volume: 100, GCSoundURL: 'http://freesound.org/data/previews/66/66717_931655-lq.mp3', SeaSoundURL: 'http://www.freesound.org/data/previews/121/121099_2193266-lq.mp3', GCTimer: 1, Title: 1, Favicon: 1, Tooltip: 1, TooltipAmor: 0, ToolWarnCaut: 1, ToolWarnCautPos: 1, ToolWrink: 1, Stats: 1, UpStats: 1, TimeFormat: 0, SayTime: 1, Scale: 2, StatsPref: {Lucky: 1, Chain: 1, Prestige: 1, Wrink: 1, Sea: 1, Misc: 1}, Colors : {Blue: '#4bb8f0', Green: '#00ff00', Yellow: '#ffff00', Orange: '#ff7f00', Red: '#ff0000', Purple: '#ff00ff', Gray: '#b3b3b3', Pink: '#ff1493', Brown: '#8b4513'}}; +CM.ConfigDefault = {BotBar: 1, TimerBar: 1, TimerBarPos: 0, BuildColor: 1, BulkBuildColor: 0, UpBarColor: 1, CalcWrink: 0, CPSMode: 1, AvgCPSHist: 0, AvgClicksHist: 0, ToolWarnCautBon: 0, Flash: 1, Sound: 1, Volume: 100, GCSoundURL: 'https://freesound.org/data/previews/66/66717_931655-lq.mp3', SeaSoundURL: 'https://www.freesound.org/data/previews/121/121099_2193266-lq.mp3', GCTimer: 1, Title: 1, Favicon: 1, Tooltip: 1, TooltipAmor: 0, ToolWarnCaut: 1, ToolWarnCautPos: 1, ToolWrink: 1, Stats: 1, UpStats: 1, TimeFormat: 0, SayTime: 1, Scale: 2, StatsPref: {Lucky: 1, Chain: 1, Prestige: 1, Wrink: 1, Sea: 1, Misc: 1}, Colors : {Blue: '#4bb8f0', Green: '#00ff00', Yellow: '#ffff00', Orange: '#ff7f00', Red: '#ff0000', Purple: '#ff00ff', Gray: '#b3b3b3', Pink: '#ff1493', Brown: '#8b4513'}}; CM.ConfigPrefix = 'CMConfig'; CM.VersionMajor = '2.0042'; From 4ad6cc9fe047f6cbabc0936da529d3f5f201c484 Mon Sep 17 00:00:00 2001 From: Valters Jansons Date: Sun, 25 Feb 2018 12:24:31 +0200 Subject: [PATCH 2/2] Update README to use HTTPS instead of HTTP HTTPS is good to push for wherever possible, even if the Cookie Clicker site itself does not support it now. (cherry picked from commit 98924bc12e959581f07a1a1d48ee26a73cd03076) --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index f1809ec..de05f72 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ Copy this code and save it as a bookmark. Paste it in the URL section. To activa ```javascript javascript: (function () { - Game.LoadMod('http://aktanusa.github.io/CookieMonster/CookieMonster.js'); + Game.LoadMod('https://aktanusa.github.io/CookieMonster/CookieMonster.js'); }()); ``` @@ -64,7 +64,7 @@ For beta, use the following instead: ```javascript javascript: (function () { - Game.LoadMod('http://aktanusa.github.io/CookieMonster/CookieMonsterBeta.js'); + Game.LoadMod('https://aktanusa.github.io/CookieMonster/CookieMonsterBeta.js'); }()); ``` @@ -84,7 +84,7 @@ If you'd rather use the addon as a script via per example *Greasemonkey* or *Tam (function() { var checkReady = setInterval(function() { if (typeof Game.ready !== 'undefined' && Game.ready) { - Game.LoadMod('http://aktanusa.github.io/CookieMonster/CookieMonster.js'); + Game.LoadMod('https://aktanusa.github.io/CookieMonster/CookieMonster.js'); clearInterval(checkReady); } }, 1000); @@ -104,7 +104,7 @@ If you are using the beta, use this instead: (function() { var checkReady = setInterval(function() { if (typeof Game.ready !== 'undefined' && Game.ready) { - Game.LoadMod('http://aktanusa.github.io/CookieMonster/CookieMonsterBeta.js'); + Game.LoadMod('https://aktanusa.github.io/CookieMonster/CookieMonsterBeta.js'); clearInterval(checkReady); } }, 1000); @@ -129,7 +129,7 @@ All suggestions are welcome, even the smallest ones. # Contributors -* **[Raving_Kumquat](http://cookieclicker.wikia.com/wiki/User:Raving_Kumquat)**: Original author +* **[Raving_Kumquat](https://cookieclicker.wikia.com/wiki/User:Raving_Kumquat)**: Original author * **[Maxime Fabre](https://github.com/Anahkiasen)**: Previous maintainer * **[Alderi Tokori](http://forum.dashnet.org/profile/Alderi)**: ROI calculations (unused now) * **[Alhifar](https://github.com/Alhifar)**: Missed Golden Cookie Stat