@@ -6,6 +6,7 @@ var tabInfos = {};
6
6
7
7
chrome . runtime . onMessage . addListener ( onMessage ) ;
8
8
chrome . tabs . onUpdated . addListener ( onTabUpdated ) ;
9
+ chrome . runtime . onInstalled . addListener ( onExtensionInstalled ) ;
9
10
10
11
// fill login form & submit
11
12
function fillLoginForm ( login , tab ) {
@@ -90,8 +91,9 @@ function onMessage(request, sender, sendResponse) {
90
91
// object that has current settings. Update this as new settings
91
92
// are added (or old ones removed)
92
93
if ( request . action == "getSettings" ) {
93
- const use_fuzzy_search = localStorage . getItem ( "use_fuzzy_search" ) != "false" ;
94
- sendResponse ( { use_fuzzy_search : use_fuzzy_search } )
94
+ const use_fuzzy_search =
95
+ localStorage . getItem ( "use_fuzzy_search" ) != "false" ;
96
+ sendResponse ( { use_fuzzy_search : use_fuzzy_search } ) ;
95
97
}
96
98
}
97
99
@@ -113,3 +115,30 @@ function getHostname(url) {
113
115
a . href = url ;
114
116
return a . hostname ;
115
117
}
118
+
119
+ function onExtensionInstalled ( details ) {
120
+ // No permissions
121
+ if ( ! chrome . notifications ) {
122
+ return ;
123
+ }
124
+
125
+ if ( details . reason != "update" ) {
126
+ return ;
127
+ }
128
+
129
+ var changelog = {
130
+ "2.0.13" : "Breaking change: please update the host app to at least v2.0.12"
131
+ } ;
132
+
133
+ var version = chrome . runtime . getManifest ( ) . version ;
134
+ if ( ! ( version in changelog ) ) {
135
+ return ;
136
+ }
137
+
138
+ chrome . notifications . create ( version , {
139
+ title : "browserpass: Important changes" ,
140
+ message : changelog [ version ] ,
141
+ iconUrl : "icon-lock.png" ,
142
+ type : "basic"
143
+ } ) ;
144
+ }
0 commit comments