File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,10 @@ browser = browser || chrome;
1212const menus = browser . menus || browser . contextMenus ;
1313
1414function createMpvSchemeURI ( url ) {
15- return `mpv://watch#${ url . replace ( / ' / g, "%27" ) } ` ;
15+ const decodedURL = decodeURI ( url ) ;
16+ const encodedURL = encodeURI ( decodedURL ) . replace ( / ' / g, "%27" ) ;
17+ console . debug ( { url, encodedURL, same : decodedURL === decodeURI ( encodedURL ) } ) ;
18+ return `mpv://watch#${ encodedURL } ` ;
1619}
1720
1821async function openInMpv ( url ) {
Original file line number Diff line number Diff line change @@ -15,7 +15,10 @@ const settings = {
1515} ;
1616
1717function createMpvSchemeURI ( url ) {
18- return `mpv://watch#${ url . replace ( / ' / g, "%27" ) } ` ;
18+ const decodedURL = decodeURI ( url ) ;
19+ const encodedURL = encodeURI ( decodedURL ) . replace ( / ' / g, "%27" ) ;
20+ // console.debug({url, encodedURL, same: decodedURL === decodeURI(encodedURL)});
21+ return `mpv://watch#${ encodedURL } ` ;
1922}
2023
2124function contextMenuPatch ( tree , context ) {
You can’t perform that action at this time.
0 commit comments