File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 55export const apps = {
66 Spotify : {
77 hostnames : [ "open.spotify.com" , "spotify.link" ] ,
8- protocol : "spotify://" ,
8+ protocolName : "spotify" ,
9+ applyProtocol : ( url ) => `spotify:/${ url . pathname } ` ,
910 default : true
1011 } ,
1112 Steam : {
@@ -14,12 +15,14 @@ export const apps = {
1415 "steamcommunity.com" ,
1516 "help.steampowered.com"
1617 ] ,
17- protocol : "steam://openurl/" ,
18+ protocolName : "steam" ,
19+ applyProtocol : ( url ) => `steam://openurl/${ url } ` ,
1820 default : true
1921 } ,
2022 SoundCloud : {
2123 hostnames : [ "soundcloud.com" , "on.soundcloud.com" ] ,
22- protocol : "soundpout://" ,
24+ protocolName : "soundpout" ,
25+ applyProtocol : ( url ) => `soundpout:/${ url . pathname } ` ,
2326 default : false
2427 }
2528} ;
@@ -54,7 +57,7 @@ async function openInApp(url) {
5457 }
5558
5659 const [ appName , app ] = getEnabledApp ( url ) ;
57- const replacedUrl = app . protocol + url ;
60+ const replacedUrl = app . applyProtocol ( url ) ;
5861
5962 window . open ( replacedUrl , "_blank" ) ?. close ( ) ;
6063 } catch ( e ) {
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ export const settings = () => {
1414 onChange = { ( value ) => {
1515 store [ appName ] = value ;
1616 } }
17- note = { app . protocol }
17+ note = { "Opens with this protocol: " + app . protocolName + "://" }
1818 >
1919 { appName }
2020 </ SwitchItem >
You can’t perform that action at this time.
0 commit comments