mirror of
				https://github.com/smartfrigde/armcord.git
				synced 2024-08-14 23:56:58 +00:00 
			
		
		
		
	add abillity to load custom bundles
This commit is contained in:
		
							parent
							
								
									d450cad7a5
								
							
						
					
					
						commit
						3c840791d8
					
				
					 1 changed files with 9 additions and 3 deletions
				
			
		
							
								
								
									
										12
									
								
								src/utils.ts
									
										
									
									
									
								
							
							
						
						
									
										12
									
								
								src/utils.ts
									
										
									
									
									
								
							|  | @ -54,6 +54,8 @@ export function setup(): void { | |||
|         startMinimized: false, | ||||
|         dynamicIcon: false, | ||||
|         tray: true, | ||||
|         customJsBundle: "https://armcord.app/placeholder.js", | ||||
|         customCssBundle: "https://armcord.app/placeholder.css", | ||||
|         disableAutogain: false, | ||||
|         useLegacyCapturer: false, | ||||
|         mobileMode: false, | ||||
|  | @ -257,6 +259,8 @@ export interface Settings { | |||
|     mobileMode: boolean; | ||||
|     skipSplash: boolean; | ||||
|     performanceMode: string; | ||||
|     customJsBundle: RequestInfo | URL; | ||||
|     customCssBundle: RequestInfo | URL; | ||||
|     startMinimized: boolean; | ||||
|     useLegacyCapturer: boolean; | ||||
|     tray: boolean; | ||||
|  | @ -334,12 +338,14 @@ async function updateModBundle(): Promise<void> { | |||
|             const clientMods = { | ||||
|                 vencord: "https://github.com/Vendicated/Vencord/releases/download/devbuild/browser.js", | ||||
|                 cordwood: "https://raw.githubusercontent.com/Cordwood/builds/master/index.js", | ||||
|                 shelter: "https://raw.githubusercontent.com/uwu/shelter-builds/main/shelter.js" | ||||
|                 shelter: "https://raw.githubusercontent.com/uwu/shelter-builds/main/shelter.js", | ||||
|                 custom: await getConfig("customJsBundle") | ||||
|             }; | ||||
|             const clientModsCss = { | ||||
|                 vencord: "https://github.com/Vendicated/Vencord/releases/download/devbuild/browser.css", | ||||
|                 cordwood: "https://armcord.app/placeholder.css", | ||||
|                 shelter: "https://armcord.app/placeholder.css" | ||||
|                 shelter: "https://armcord.app/placeholder.css", | ||||
|                 custom: await getConfig("customCssBundle") | ||||
|             }; | ||||
|             let bundle: string = await (await fetch(clientMods[name as keyof typeof clientMods])).text(); | ||||
|             fs.writeFileSync(`${distFolder}bundle.js`, bundle, "utf-8"); | ||||
|  | @ -401,7 +407,7 @@ export async function installModLoader(): Promise<void> { | |||
|     } | ||||
| } | ||||
| 
 | ||||
| export async function registerGlobalKeybinds() { | ||||
| export async function registerGlobalKeybinds(): Promise<void> { | ||||
|     const keybinds = await getConfig("keybinds"); | ||||
|     keybinds.forEach((keybind) => { | ||||
|         globalShortcut.register(keybind, () => { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue