Added code to remove cookies from old save system

This commit is contained in:
Daniel van Noord committed 2020-12-21 23:28:00 +01:00
1 parent 798f61cafe
commit 63ddf7fa38
2 files changed
+8

No files matched your search

+4
View File
@@ -687,6 +687,10 @@ CM.Config.SaveConfig = function(config) {
* It is called by CM.DelayInit() and CM.Config.RestoreDefault()
*/
CM.Config.LoadConfig = function(settings) {
// This removes cookies left from earlier versions of CookieMonster
if (typeof localStorage.CMConfig != "undefined") {
delete localStorage.CMConfig;
}
if (settings != null) {
CM.Options = settings;
+4
View File
@@ -22,6 +22,10 @@ CM.Config.SaveConfig = function(config) {
* It is called by CM.DelayInit() and CM.Config.RestoreDefault()
*/
CM.Config.LoadConfig = function(settings) {
// This removes cookies left from earlier versions of CookieMonster
if (typeof localStorage.CMConfig != "undefined") {
delete localStorage.CMConfig;
}
if (settings != null) {
CM.Options = settings;