File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change 33// service worker/client communication channel
44
55
6+ const ORIGIN_URL = self . location . origin ;
7+
68// internal paths
79const INTERNAL_PATHS = {
810
9- internal : 'https://codeit.codes/' ,
10- internal_ : 'https://dev.codeit.codes/' ,
11+ internal : ORIGIN_URL ,
1112
12- run : 'https://codeit.codes/run' ,
13- run_ : 'https://dev.codeit.codes/run' ,
13+ run : ORIGIN_URL + '/run' ,
1414
1515 relLivePath : ( '/run/' + '_/' . repeat ( 15 ) ) ,
1616
17- clientId : 'https://codeit.codes/worker/getClientId' ,
18- clientId_ : 'https://dev.codeit.codes/worker/getClientId' ,
17+ clientId : ORIGIN_URL + '/worker/getClientId'
1918
2019} ;
2120
2221
2322const isSafari = / ^ ( (? ! c h r o m e | a n d r o i d ) .) * s a f a r i / i. test ( navigator . userAgent ) ;
2423
25- const isDev = ( self . origin === 'https://dev.codeit.codes' ) ;
24+ const isDev = ( ORIGIN_URL === 'https://dev.codeit.codes' ) ;
2625
2726
2827// key : value
@@ -39,7 +38,7 @@ function getPathType(path) {
3938
4039 if ( path . startsWith ( type [ 1 ] ) ) {
4140
42- pathType = type [ 0 ] . replaceAll ( '_' , '' ) ;
41+ pathType = type [ 0 ] ;
4342
4443 }
4544
You can’t perform that action at this time.
0 commit comments