mirror of
				https://github.com/smartfrigde/armcord.git
				synced 2024-08-14 23:56:58 +00:00 
			
		
		
		
	Added channels (settings.json)
This commit is contained in:
		
							parent
							
								
									253ff66cc3
								
							
						
					
					
						commit
						adece2efc9
					
				
					 7 changed files with 48 additions and 3 deletions
				
			
		
							
								
								
									
										21
									
								
								index.html
									
										
									
									
									
								
							
							
						
						
									
										21
									
								
								index.html
									
										
									
									
									
								
							|  | @ -3,8 +3,22 @@ | |||
| 
 | ||||
| <head> | ||||
|   <meta charset="UTF-8" /> | ||||
|   <meta http-equiv="refresh" content="5; URL=https://discord.com/app" /> | ||||
|   <title>ArmCord</title> | ||||
|   <script> | ||||
|     window.onload = setTimeout(function() { | ||||
|       if (document.getElementById("ac-channel").innerHTML == "stable") { | ||||
|         window.location.href = "https://discord.com/app"; | ||||
|       } else if (document.getElementById("ac-channel").innerHTML == "canary") { | ||||
|         window.location.href = "https://canary.discord.com/app"; | ||||
|       } else if (document.getElementById("ac-channel").innerHTML == "ptb") { | ||||
|         window.location.href = "https://ptb.discord.com/app"; | ||||
|       } else if (document.getElementById("ac-channel").innerHTML == "foss") { | ||||
|         window.location.href = "https://dev.fosscord.com/app"; | ||||
|       } else { | ||||
|         window.location.href = "https://discord.com/app"; | ||||
|       }; | ||||
|     }, 3000); | ||||
|     </script> | ||||
|   <style> | ||||
|      @import url("https://kckarnige.github.io/femboi_owo/discord-font.css"); | ||||
| 
 | ||||
|  | @ -71,6 +85,10 @@ | |||
|       color: #fff; | ||||
|       transform: translate(-50%, -50%); | ||||
|     } | ||||
| 
 | ||||
|     #ac-channel { | ||||
|       display: none; | ||||
|     } | ||||
|   </style> | ||||
|   <style> | ||||
|      | ||||
|  | @ -84,6 +102,7 @@ | |||
|   </video> | ||||
|   <p>Loading...</p> | ||||
|     <h1></h1> | ||||
|   <p id="ac-channel"></p> | ||||
| </div> | ||||
| 
 | ||||
| </body> | ||||
|  |  | |||
|  | @ -135,6 +135,10 @@ button#open-themes-btn:active { | |||
|     width: 75%; | ||||
| } | ||||
| 
 | ||||
| #ac-channel { | ||||
|     display: none; | ||||
|   } | ||||
| 
 | ||||
| ::-webkit-scrollbar { | ||||
|     width: 0.4em; | ||||
|     background: transparent; | ||||
|  |  | |||
|  | @ -7,9 +7,10 @@ | |||
|   </head> | ||||
| 
 | ||||
|   <body> | ||||
|     <a href="https://discord.com/app"><button class="back-btn">Back to Discord</button></a> | ||||
|     <button class="back-btn">Back to Discord</button> | ||||
|     <button id="open-themes-btn">Themes Folder</button> | ||||
|     <p class="logo">Cord Manager</p> | ||||
|     <div id="tm-list"></div> | ||||
|     <p id="ac-channel"></p> | ||||
|   </body> | ||||
| </html> | ||||
|  | @ -20,7 +20,7 @@ window.addEventListener("DOMContentLoaded", () => { | |||
|     require("shell").openExternal("https://support.discord.com/"); | ||||
|   }); | ||||
|   electronLocalshortcut.register(currentWindow, "F2", () => { | ||||
|     window.location.href = "https://discord.com/invite/F25bc4RYDt"; | ||||
|     window.location.href = "/invite/F25bc4RYDt"; | ||||
|   }); | ||||
|   electronLocalshortcut.register(currentWindow, "F4", () => { | ||||
|     currentWindow.loadFile("./manager.html") | ||||
|  | @ -92,4 +92,7 @@ div.menubar[role="menubar"] { | |||
|   text-transform: none; | ||||
| }` | ||||
|   ); | ||||
| 
 | ||||
|   document.getElementById("ac-channel").innerHTML = ArmCord.Channel; | ||||
|    | ||||
| }); | ||||
|  |  | |||
							
								
								
									
										3
									
								
								settings.json
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								settings.json
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,3 @@ | |||
| { | ||||
|     "channel": "foss" | ||||
| } | ||||
|  | @ -1,5 +1,7 @@ | |||
| exports.Version = require("../package.json").version; | ||||
| 
 | ||||
| exports.Channel = require("../settings.json").channel; | ||||
| 
 | ||||
| exports.addStyle = function(styleString) { | ||||
|  const style = document.createElement('style'); | ||||
|  style.textContent = styleString; | ||||
|  |  | |||
|  | @ -28,4 +28,17 @@ window.addEventListener("DOMContentLoaded", () => { | |||
|     } | ||||
|   }); | ||||
|   document.getElementById("open-themes-btn").onclick = function () {shell.openPath(`${__dirname}/themes`);}; | ||||
|   document.getElementsByClassName("back-btn")[0].onclick = function () { | ||||
|     if (document.getElementById("ac-channel").innerHTML == "stable") { | ||||
|       window.location.href = "https://discord.com/app"; | ||||
|     } else if (document.getElementById("ac-channel").innerHTML == "canary") { | ||||
|       window.location.href = "https://canary.discord.com/app"; | ||||
|     } else if (document.getElementById("ac-channel").innerHTML == "ptb") { | ||||
|       window.location.href = "https://ptb.discord.com/app"; | ||||
|     } else if (document.getElementById("ac-channel").innerHTML == "foss") { | ||||
|       window.location.href = "https://dev.fosscord.com/app"; | ||||
|     } else { | ||||
|       window.location.href = "https://discord.com/app"; | ||||
|     }; | ||||
|   }; | ||||
| }); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue