File tree Expand file tree Collapse file tree 4 files changed +5
-22
lines changed
Expand file tree Collapse file tree 4 files changed +5
-22
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,3 @@ export async function unregisterContentScriptIfExists(
5555
5656 return true ;
5757}
58-
59- export async function setStorageValues ( payload : any ) : Promise < void > {
60- await browser . storage . sync . set ( payload ) ;
61- }
Original file line number Diff line number Diff line change @@ -4,15 +4,8 @@ import { MessageType } from "src/types";
44import { Codecov } from "src/service" ;
55import {
66 registerContentScript ,
7- setStorageValues ,
87 unregisterContentScriptIfExists ,
98} from "./dynamic_content_scripts" ;
10- import {
11- selfHostedCodecovApiToken ,
12- selfHostedCodecovURLStorageKey ,
13- selfHostedGitHubURLStorageKey ,
14- useSelfHostedStorageKey ,
15- } from "src/constants" ;
169
1710async function main ( ) : Promise < void > {
1811 browser . runtime . onMessage . addListener ( handleMessages ) ;
@@ -38,8 +31,6 @@ async function handleMessages(message: {
3831 return registerContentScript ( message . payload ) ;
3932 case MessageType . UNREGISTER_CONTENT_SCRIPTS :
4033 return unregisterContentScriptIfExists ( message . payload ) ;
41- case MessageType . SET_STORAGE_VALUES :
42- return setStorageValues ( message . payload ) ;
4334 }
4435}
4536
Original file line number Diff line number Diff line change @@ -142,14 +142,11 @@ const Popup = () => {
142142 }
143143 }
144144
145- await browser . runtime . sendMessage ( {
146- type : MessageType . SET_STORAGE_VALUES ,
147- payload : {
148- [ useSelfHostedStorageKey ] : useSelfHosted ,
149- [ selfHostedCodecovURLStorageKey ] : codecovUrl ,
150- [ selfHostedGitHubURLStorageKey ] : githubUrl ,
151- [ selfHostedCodecovApiToken ] : codecovApiToken ,
152- } ,
145+ await browser . storage . sync . set ( {
146+ [ useSelfHostedStorageKey ] : useSelfHosted ,
147+ [ selfHostedCodecovURLStorageKey ] : codecovUrl ,
148+ [ selfHostedGitHubURLStorageKey ] : githubUrl ,
149+ [ selfHostedCodecovApiToken ] : codecovApiToken ,
153150 } ) ;
154151
155152 resetEphemeralState ( ) ;
Original file line number Diff line number Diff line change @@ -43,5 +43,4 @@ export enum MessageType {
4343 FETCH_COMPONENTS_LIST = "fetch_components_list" ,
4444 REGISTER_CONTENT_SCRIPTS = "register_content_scripts" ,
4545 UNREGISTER_CONTENT_SCRIPTS = "unregister_content_scripts" ,
46- SET_STORAGE_VALUES = "set_storage_values" ,
4746}
You can’t perform that action at this time.
0 commit comments