Skip to content

Commit 8648f4d

Browse files
committed
[refactor] improve state module
1 parent 5d6ccdc commit 8648f4d

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

‎src/js/state.js‎

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
varstate=(function(){
22

3-
varcurrent={
3+
varmod={};
4+
5+
mod.current={
46
header: {
57
area: {
68
width: 100,
@@ -218,24 +220,29 @@ var state = (function(){
218220
autoSuggest: false,
219221
};
220222

221-
varget=function(){
223+
mod.get=function(){
222224
returncurrent;
223225
};
224226

225-
varrestore=function(data){
227+
mod.restore=function(data){
226228
if("state"indata){
227229
current=data.state;
228230
};
229231
};
230232

231233
varinit=function(){
232234
if(data.load()){
233-
restore(data.load());
235+
mod.restore(data.load());
234236
};
235237
};
236238

239+
varget=function(){
240+
returnmod.get();
241+
};
242+
237243
return{
238244
init: init,
245+
mod: mod,
239246
get: get
240247
};
241248

‎src/js/version.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
varversion=(function(){
22

3-
varcurrent="3.57.0";
3+
varcurrent="3.58.0";
44

55
varcompare=function(a,b){
66
varpa=a.split(".");

‎src/manifest.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "nightTab",
33
"short_name": "nightTab",
44
"description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.",
5-
"version": "3.57.0",
5+
"version": "3.58.0",
66
"manifest_version": 2,
77
"chrome_url_overrides":{
88
"newtab": "index.html"

0 commit comments

Comments
(0)