Skip to content

Commit 26ef4d7

Browse files
committed
[bug] improve demo page check when saving data
1 parent 6d23807 commit 26ef4d7

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

‎js/data.js‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,16 @@ var data = (function(){
1515
};
1616

1717
varsave=function(){
18-
vardata={
19-
version: version.get(),
20-
state: state.get(),
21-
bookmarks: bookmarks.get()
22-
};
2318
if("runtime"inchrome){
24-
set(saveName,JSON.stringify(data));
19+
if("getManifest"inchrome.runtime){
20+
vardata={
21+
version: version.get(),
22+
state: state.get(),
23+
bookmarks: bookmarks.get()
24+
};
25+
set(saveName,JSON.stringify(data));
26+
};
2527
};
26-
// console.log("data saved");
2728
};
2829

2930
varwipe=function(){

0 commit comments

Comments
(0)