mirror of
				https://github.com/smartfrigde/armcord.git
				synced 2024-08-14 23:56:58 +00:00 
			
		
		
		
	fix: window title fix
This commit is contained in:
		
							parent
							
								
									052ef80e06
								
							
						
					
					
						commit
						a532cb9a72
					
				
					 1 changed files with 9 additions and 10 deletions
				
			
		|  | @ -177,17 +177,16 @@ async function doAfterDefiningTheWindow(): Promise<void> { | ||||||
|                 mainWindow.setIcon(trayPath); |                 mainWindow.setIcon(trayPath); | ||||||
|             } |             } | ||||||
|         }); |         }); | ||||||
| 
 |  | ||||||
|         mainWindow.webContents.on("page-title-updated", async (e, title) => { |  | ||||||
|             const armCordSuffix = " - ArmCord"; /* identify */ |  | ||||||
|             if (!title.endsWith(armCordSuffix)) { |  | ||||||
|                 e.preventDefault(); |  | ||||||
|                 await mainWindow.webContents.executeJavaScript( |  | ||||||
|                     `document.title = '${title.replace("Discord |", "") + armCordSuffix}'` |  | ||||||
|                 ); |  | ||||||
|             } |  | ||||||
|         }); |  | ||||||
|     } |     } | ||||||
|  |     mainWindow.webContents.on("page-title-updated", async (e, title) => { | ||||||
|  |         const armCordSuffix = " - ArmCord"; /* identify */ | ||||||
|  |         if (!title.endsWith(armCordSuffix)) { | ||||||
|  |             e.preventDefault(); | ||||||
|  |             await mainWindow.webContents.executeJavaScript( | ||||||
|  |                 `document.title = '${title.replace("Discord |", "") + armCordSuffix}'` | ||||||
|  |             ); | ||||||
|  |         } | ||||||
|  |     }); | ||||||
|     const userDataPath = app.getPath("userData"); |     const userDataPath = app.getPath("userData"); | ||||||
|     const themesFolder = `${userDataPath}/themes/`; |     const themesFolder = `${userDataPath}/themes/`; | ||||||
|     if (!fs.existsSync(themesFolder)) { |     if (!fs.existsSync(themesFolder)) { | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue