mirror of
https://github.com/MailHops/mailhops-plugin.git
synced 2025-05-28 03:40:10 -07:00
minor code cleanup
This commit is contained in:
parent
5be9ddd812
commit
2b06d7cbde
@ -10,7 +10,7 @@ const MailHops = {
|
||||
loading: false,
|
||||
previousId: null,
|
||||
options: {
|
||||
version: 'MailHops Plugin 4.3.0',
|
||||
version: 'MailHops Plugin 4.3.1',
|
||||
api_key: '',
|
||||
owm_key: '',
|
||||
lang: 'en',
|
||||
|
@ -128,6 +128,14 @@ const MailHopPreferences = {
|
||||
else
|
||||
document.getElementById("debug_off").setAttribute('checked', 'checked');
|
||||
|
||||
this.updateTheme();
|
||||
this.updateCountries();
|
||||
|
||||
await this.saveAPIKey(true);
|
||||
await this.loadAccounts();
|
||||
},
|
||||
|
||||
updateTheme: function () {
|
||||
if (this.theme == "dark") {
|
||||
if (!document.getElementById("mh-main-segment").classList.contains("inverted")) {
|
||||
document.getElementById("mh-main-segment").classList.add("inverted");
|
||||
@ -154,12 +162,6 @@ const MailHopPreferences = {
|
||||
document.getElementById("mh-clear-filter").classList.remove("inverted");
|
||||
}
|
||||
}
|
||||
|
||||
await this.saveAPIKey(true);
|
||||
|
||||
await this.loadAccounts();
|
||||
|
||||
this.updateCountries();
|
||||
},
|
||||
|
||||
loadAccounts: async function () {
|
||||
@ -213,36 +215,8 @@ const MailHopPreferences = {
|
||||
if(!init)
|
||||
document.getElementById("saved_message").style.display = 'block';
|
||||
|
||||
this.theme = document.querySelector('input[name="theme"]:checked').value
|
||||
if (this.theme == "dark") {
|
||||
if (!document.getElementById("mh-main-segment").classList.contains("inverted")) {
|
||||
document.getElementById("mh-main-segment").classList.add("inverted");
|
||||
document.getElementById("mh-steps").classList.add("inverted");
|
||||
document.getElementById("mh-segment").classList.add("inverted");
|
||||
document.getElementById("mh-form").classList.add("inverted");
|
||||
document.getElementById("step_settings").classList.add("inverted");
|
||||
document.getElementById("step_api_keys").classList.add("inverted");
|
||||
document.getElementById("step_filter").classList.add("inverted");
|
||||
document.getElementById("mh-save").classList.add("inverted");
|
||||
document.getElementById("mh-save-options").classList.add("inverted");
|
||||
document.getElementById("mh-save-filter").classList.add("inverted");
|
||||
document.getElementById("mh-clear-filter").classList.add("inverted");
|
||||
}
|
||||
} else {
|
||||
if (document.getElementById("mh-main-segment").classList.contains("inverted")) {
|
||||
document.getElementById("mh-main-segment").classList.remove("inverted");
|
||||
document.getElementById("mh-steps").classList.remove("inverted");
|
||||
document.getElementById("mh-segment").classList.remove("inverted");
|
||||
document.getElementById("mh-form").classList.remove("inverted");
|
||||
document.getElementById("step_settings").classList.remove("inverted");
|
||||
document.getElementById("step_api_keys").classList.remove("inverted");
|
||||
document.getElementById("step_filter").classList.remove("inverted");
|
||||
document.getElementById("mh-save").classList.remove("inverted");
|
||||
document.getElementById("mh-save-options").classList.remove("inverted");
|
||||
document.getElementById("mh-save-filter").classList.remove("inverted");
|
||||
document.getElementById("mh-clear-filter").classList.remove("inverted");
|
||||
}
|
||||
}
|
||||
this.theme = document.querySelector('input[name="theme"]:checked').value;
|
||||
this.updateTheme();
|
||||
this.updateCountries();
|
||||
return true;
|
||||
},
|
||||
|
@ -1,7 +1,5 @@
|
||||
const MailHopsUtils = {
|
||||
|
||||
countries: ["ad","ae","af","ag","ai","al","am","an","ao","ar","as","at","au","aw","ax","az","ba","bb","bd","be","bf","bg","bh","bi","bj","bm","bn","bo","br","bs","bt","bv","bw","by","bz","ca","catalonia","cc","cd","cf","cg","ch","ci","ck","cl","cm","cn","co","cr","cs","cu","cv","cx","cy","cz","de","dj","dk","dm","do","dz","ec","ee","eg","eh","england","er","es","et","europeanunion","fam","fi","fj","fk","fm","fo","fr","ga","gb","gd","ge","gf","gh","gi","gl","gm","gn","gp","gq","gr","gs","gt","gu","gw","gy","hk","hm","hn","hr","ht","hu","id","ie","il","in","io","iq","ir","is","it","jm","jo","jp","ke","kg","kh","ki","km","kn","kp","kr","kw","ky","kz","la","lb","lc","li","lk","lr","ls","lt","lu","lv","ly","ma","mc","md","me","mg","mh","mk","ml","mm","mn","mo","mp","mq","mr","ms","mt","mu","mv","mw","mx","my","mz","na","nc","ne","nf","ng","ni","nl","no","np","nr","nu","nz","om","pa","pe","pf","pg","ph","pk","pl","pm","pn","pr","ps","pt","pw","py","qa","re","ro","rs","ru","rw","sa","sb","sc","scotland","sd","se","sg","sh","si","sj","sk","sl","sm","sn","so","sr","st","sv","sy","sz","tc","td","tf","tg","th","tj","tk","tl","tm","tn","to","tr","tt","tv","tw","tz","ua","ug","um","us","uy","uz","va","vc","ve","vg","vi","vn","vu","wales","wf","ws","ye","yt","za","zm","zw"],
|
||||
|
||||
dkim: function(result){
|
||||
|
||||
switch(result){
|
||||
|
@ -2,7 +2,7 @@
|
||||
"manifest_version": 2,
|
||||
"name": "__MSG_appName__",
|
||||
"description": "__MSG_appDesc__",
|
||||
"version": "4.3.0",
|
||||
"version": "4.3.1",
|
||||
"author": "Hopsware LLC",
|
||||
"developer": {
|
||||
"name": "Andrew Van Tassel",
|
||||
|
Loading…
x
Reference in New Issue
Block a user