mirror of
				https://github.com/smartfrigde/armcord.git
				synced 2024-08-14 23:56:58 +00:00 
			
		
		
		
	Notifications Test
This commit is contained in:
		
							parent
							
								
									3e379d9580
								
							
						
					
					
						commit
						15eb2f867f
					
				
					 1 changed files with 11 additions and 1 deletions
				
			
		
							
								
								
									
										10
									
								
								main.js
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								main.js
									
										
									
									
									
								
							|  | @ -37,7 +37,17 @@ function createWindow() { | ||||||
| app.whenReady().then(() => { | app.whenReady().then(() => { | ||||||
|   createWindow() |   createWindow() | ||||||
|   session.defaultSession.loadExtension(`${require('electron').app.getAppPath()}/goosemod/`) |   session.defaultSession.loadExtension(`${require('electron').app.getAppPath()}/goosemod/`) | ||||||
|  |   session | ||||||
|  |     .fromPartition("some-partition") | ||||||
|  |     .setPermissionRequestHandler((webContents, permission, callback) => { | ||||||
|  |       const url = webContents.getURL(); | ||||||
| 
 | 
 | ||||||
|  |       if (permission === "notifications") { | ||||||
|  |         // Approves the permissions request
 | ||||||
|  |         callback(true); | ||||||
|  |        | ||||||
|  |       } | ||||||
|  |     }); | ||||||
|   app.on('activate', function () { |   app.on('activate', function () { | ||||||
|     // On macOS it's common to re-create a window in the app when the
 |     // On macOS it's common to re-create a window in the app when the
 | ||||||
|     // dock icon is clicked and there are no other windows open.
 |     // dock icon is clicked and there are no other windows open.
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue