File tree 1 file changed +2
-10
lines changed
1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -103,20 +103,12 @@ export function TransformFileHostUrls (urls)
103
103
{
104
104
for ( let i = 0 ; i < urls . length ; i ++ ) {
105
105
let url = urls [ i ] ;
106
- if ( url . search ( / w w w \ .d r o p b o x \ .c o m / u ) !== - 1 ) {
106
+ if ( url . indexOf ( ' www.dropbox.com' ) !== - 1 ) {
107
107
url = url . replace ( 'www.dropbox.com' , 'dl.dropbox.com' ) ;
108
- let separatorPos = url . indexOf ( '?' ) ;
109
- if ( separatorPos !== - 1 ) {
110
- url = url . substring ( 0 , separatorPos ) ;
111
- }
112
108
urls [ i ] = url ;
113
- } else if ( url . search ( / g i t h u b \ .c o m / u ) !== - 1 ) {
109
+ } else if ( url . indexOf ( ' github.com' ) !== - 1 ) {
114
110
url = url . replace ( 'github.com' , 'raw.githubusercontent.com' ) ;
115
111
url = url . replace ( '/blob' , '' ) ;
116
- let separatorPos = url . indexOf ( '?' ) ;
117
- if ( separatorPos !== - 1 ) {
118
- url = url . substring ( 0 , separatorPos ) ;
119
- }
120
112
urls [ i ] = url ;
121
113
}
122
114
}
You can’t perform that action at this time.
0 commit comments