mirror of
				https://github.com/anticensority/runet-censorship-bypass.git
				synced 2025-10-31 16:07:31 +03:00 
			
		
		
		
	Autoclose the consent screen after user choice. Show consent screen only in FireFox
This commit is contained in:
		
							parent
							
								
									1c38137200
								
							
						
					
					
						commit
						2f5d425f34
					
				|  | @ -280,8 +280,10 @@ console.log('Extension started.'); | |||
| 
 | ||||
|   const compareVersions = (a, b) => versionToInt(a) - versionToInt(b); | ||||
| 
 | ||||
|   const ifFirefox = navigator.userAgent.toLowerCase().includes('firefox'); | ||||
| 
 | ||||
|   let give; | ||||
|   const promise = new Promise((resolve) => { | ||||
|   const promise = !ifFirefox ? Promise.resolve() : new Promise((resolve) => { | ||||
|     give = resolve; | ||||
|   }); | ||||
| 
 | ||||
|  | @ -291,7 +293,7 @@ console.log('Extension started.'); | |||
|       give, | ||||
|     }, | ||||
|     platform: { | ||||
|       ifFirefox: navigator.userAgent.toLowerCase().includes('firefox'), | ||||
|       ifFirefox, | ||||
|     }, | ||||
|     version: { | ||||
|       ifMini: false, | ||||
|  |  | |||
|  | @ -3,8 +3,10 @@ | |||
| chrome.runtime.getBackgroundPage( (backgroundPage) => | ||||
|   backgroundPage.apis.errorHandlers.installListenersOn( | ||||
|     window, 'CONSENT', () => { | ||||
|       agreeBtn.onclick = () => | ||||
|       agreeBtn.onclick = () => { | ||||
|         backgroundPage.apis.consent.give(); | ||||
|         window.close(); | ||||
|       } | ||||
|       rejectBtn.onclick = () => | ||||
|         chrome.management.uninstallSelf(); | ||||
|     }, | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user