mirror of
				https://github.com/smartfrigde/armcord.git
				synced 2024-08-14 23:56:58 +00:00 
			
		
		
		
	Add barebones theme loading!
This commit is contained in:
		
							parent
							
								
									9608851fa2
								
							
						
					
					
						commit
						41306d6cde
					
				
					 1 changed files with 9 additions and 2 deletions
				
			
		|  | @ -1,7 +1,14 @@ | ||||||
| const themeFolder = __dirname + "/themes/"; | const themeFolder = __dirname + "/themes/"; | ||||||
| const fs = require("fs"); | const fs = require("fs"); | ||||||
| const armcord = require("./armcord.js") | const armcord = require("./armcord.js") | ||||||
|  | window.addEventListener("DOMContentLoaded", () => { | ||||||
| fs.readdirSync(themeFolder).forEach((file) => { | fs.readdirSync(themeFolder).forEach((file) => { | ||||||
|   armcord.addStyle(fs.readFileSync(file)) |   console.log(file); | ||||||
|   console.log(file) |   try { | ||||||
|  |     const style = fs.readFileSync(`${__dirname}/themes/${file}`, "utf8"); | ||||||
|  |     armcord.addStyle(style) | ||||||
|  |   } catch (err) { | ||||||
|  |     console.error(err); | ||||||
|  |   } | ||||||
| }); | }); | ||||||
|  | }) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue