File tree Expand file tree Collapse file tree 4 files changed +17
-7
lines changed 
java/dev/vendicated/vencord Expand file tree Collapse file tree 4 files changed +17
-7
lines changed Original file line number Diff line number Diff line change 1+ package  dev .vendicated .vencord ;
2+ 
3+ public  class  Constants  {
4+     public  static  final  String  JS_BUNDLE_URL  = "https://github.com/Vendicated/Vencord/releases/download/devbuild/browser.js" ;
5+ }
Original file line number Diff line number Diff line change 1111import  java .util .Locale ;
1212
1313public  class  HttpClient  {
14-     public  static  final  String  VENCORD_BUNDLE_URL  = "https://github.com/Vendicated/Vencord/releases/download/devbuild/browser.js" ;
15- 
1614    public  static  final  class  HttpException  extends  IOException  {
1715        private  final  HttpURLConnection  conn ;
1816        private  String  message ;
@@ -53,7 +51,7 @@ public static void fetchVencord(Activity activity) throws IOException {
5351            VencordMobileRuntime  = readAsText (is );
5452        }
5553
56-         var  conn  = fetch (VENCORD_BUNDLE_URL );
54+         var  conn  = fetch (Constants . JS_BUNDLE_URL );
5755        try  (var  is  = conn .getInputStream ()) {
5856            VencordRuntime  = readAsText (is );
5957        }
Original file line number Diff line number Diff line change @@ -114,12 +114,11 @@ private void explodeAndroid() {
114114
115115    public  void  handleUrl (Uri  url ) {
116116        if  (url  != null ) {
117-             if  (!url .getAuthority ().contains ("discord" )) return ;
117+             if  (!url .getAuthority ().equals ("discord.com " )) return ;
118118            if  (!wvInitialized ) {
119119                wv .loadUrl (url .toString ());
120120            } else  {
121-                 wv .evaluateJavascript ("Vencord.Webpack.Common.NavigationRouter.transitionTo(\" "  + url .getPath () + "\" )" , (result ) -> {
122-                 });
121+                 wv .evaluateJavascript ("Vencord.Webpack.Common.NavigationRouter.transitionTo(\" "  + url .getPath () + "\" )" , null );
123122            }
124123        }
125124    }
@@ -130,5 +129,4 @@ protected void onNewIntent(Intent intent) {
130129        Uri  data  = intent .getData ();
131130        if  (data  != null ) handleUrl (data );
132131    }
133- 
134132}
Original file line number Diff line number Diff line change 3434            return  false ; 
3535        } 
3636    } ; 
37+ 
38+     document . addEventListener ( "DOMContentLoaded" ,  ( )  =>  document . documentElement . appendChild ( 
39+         Object . assign ( document . createElement ( "link" ) ,  { 
40+             rel : "stylesheet" , 
41+             type : "text/css" , 
42+             href : "https://github.com/Vendicated/Vencord/releases/download/devbuild/browser.css" 
43+         } ) , 
44+         {  once : true  } 
45+     ) ) ; 
3746} ) ( ) ; 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments