1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-04-21 15:15:48 +02:00

Delete plugin properties when disabling them

This commit is contained in:
chylex 2017-06-05 17:28:01 +02:00
parent 564b4283b6
commit 64d32dcb75
2 changed files with 8 additions and 2 deletions
Resources
Plugins/edit-design
Scripts

View File

@ -61,7 +61,7 @@ enabled(){
this.injectDeciderReplyHook(obj && obj.revertReplies); this.injectDeciderReplyHook(obj && obj.revertReplies);
}; };
if (this.wasLoadedBefore){ if (this.$$wasLoadedBefore){
this.onStageReady(); this.onStageReady();
} }
else{ else{
@ -78,7 +78,7 @@ enabled(){
case "largest": this.defaultConfig.fontSize = "16px"; break; case "largest": this.defaultConfig.fontSize = "16px"; break;
} }
this.wasLoadedBefore = true; this.$$wasLoadedBefore = true;
this.onStageReady(); this.onStageReady();
}); });
} }

View File

@ -70,6 +70,12 @@
else{ else{
this.disabled.push(plugin.id); this.disabled.push(plugin.id);
plugin.obj.disabled(); plugin.obj.disabled();
for(let key of Object.keys(plugin.obj)){
if (key[0] !== '$'){
delete plugin.obj[key];
}
}
} }
} }
} }