File tree Expand file tree Collapse file tree 6 files changed +9
-9
lines changed
Expand file tree Collapse file tree 6 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 22 "manifest_version" : 3 ,
33 "name" : " __MSG_extensionName__" ,
44 "description" : " __MSG_extensionDescription__" ,
5- "version" : " 6.0.0 " ,
5+ "version" : " 6.0.1 " ,
66 "homepage_url" : " https://tosdr.org" ,
77 "permissions" : [" tabs" , " storage" ],
88 "background" : {
Original file line number Diff line number Diff line change 22 "manifest_version" : 3 ,
33 "name" : " __MSG_extensionName__" ,
44 "description" : " __MSG_extensionDescription__" ,
5- "version" : " 6.0.0 " ,
5+ "version" : " 6.0.1 " ,
66 "homepage_url" : " https://tosdr.org" ,
77 "permissions" : [" tabs" , " storage" ],
88 "background" : {
Original file line number Diff line number Diff line change @@ -21,8 +21,8 @@ chrome.tabs.onActivated.addListener((activeInfo) => {
2121 } ) ;
2222} ) ;
2323
24- chrome . runtime . onInstalled . addListener ( ( ) => {
25- void handleExtensionInstalled ( ) ;
24+ chrome . runtime . onInstalled . addListener ( ( reason ) => {
25+ void handleExtensionInstalled ( reason ) ;
2626} ) ;
2727
2828chrome . runtime . onStartup . addListener ( ( ) => {
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ export async function downloadDatabase(apiUrl?: string): Promise<void> {
3535 }
3636}
3737
38- export async function checkIfUpdateNeeded ( firstStart = false ) : Promise < void > {
38+ export async function checkIfUpdateNeeded ( firstStart = false , addonInstallReason ?: chrome . runtime . InstalledDetails ) : Promise < void > {
3939 const data = await getLocal ( [
4040 'db' ,
4141 'lastModified' ,
@@ -62,7 +62,7 @@ export async function checkIfUpdateNeeded(firstStart = false): Promise<void> {
6262
6363 await downloadDatabase ( api ) ;
6464
65- if ( firstStart ) {
65+ if ( firstStart && addonInstallReason && [ "update" , "install" ] . includes ( addonInstallReason ?. reason ) ) {
6666 chrome . runtime . openOptionsPage ( ) ;
6767 }
6868}
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import { checkIfUpdateNeeded } from './database';
33import { donationReminderAllowed } from './donation' ;
44import { initializePageAction } from './pageAction' ;
55
6- export async function handleExtensionInstalled ( ) : Promise < void > {
6+ export async function handleExtensionInstalled ( reason : chrome . runtime . InstalledDetails ) : Promise < void > {
77 const donationAllowed = donationReminderAllowed ( navigator . userAgent ) ;
88
99 await setLocal ( {
@@ -15,7 +15,7 @@ export async function handleExtensionInstalled(): Promise<void> {
1515 } ,
1616 } ) ;
1717
18- await checkIfUpdateNeeded ( true ) ;
18+ await checkIfUpdateNeeded ( true , reason ) ;
1919
2020 const [ activeTab ] = await queryActiveTab ( ) ;
2121 if ( activeTab ) {
Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ <h3 style="display: none">
105105 < a >
106106 < button id ="toggleButton "> Toggle Darkmode</ button > -
107107 < button id ="settingsButton "> Settings</ button > -
108- < button id ="sourceButton "> Source Code</ button > - v6.0.0
108+ < button id ="sourceButton "> Source Code</ button > - v6.0.1
109109 </ a >
110110 < p id ="translationWarning " class ="translationWarning " style ="display: none ">
111111 Translations are machine translated. You can turn them off in Settings by choosing English.
You can’t perform that action at this time.
0 commit comments