Add favicons only in Firefox
This commit is contained in:
		
							parent
							
								
									9228a22c6c
								
							
						
					
					
						commit
						4250f89ed3
					
				
							
								
								
									
										12
									
								
								dom.js
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								dom.js
									
									
									
									
									
								
							|  | @ -11,6 +11,18 @@ for (const type of [NodeList, NamedNodeMap, HTMLCollection, HTMLAllCollection]) | |||
|   } | ||||
| } | ||||
| 
 | ||||
| // add favicon in Firefox
 | ||||
| if (/Firefox/.test(navigator.userAgent)) { | ||||
|   for (const size of [128, 38, 32, 19, 16]) { | ||||
|     document.head.appendChild($element({ | ||||
|       tag: 'link', | ||||
|       rel: 'icon', | ||||
|       href: `/images/icon/${size}.png`, | ||||
|       sizes: size + 'x' + size, | ||||
|     })); | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| function onDOMready() { | ||||
|   if (document.readyState != 'loading') { | ||||
|  |  | |||
|  | @ -1,9 +1,6 @@ | |||
| <html id="stylus"> | ||||
| 	<head> | ||||
| 		<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> | ||||
| 		<link rel="icon" href="/images/icon/128.png" sizes="128x128"> | ||||
| 		<link rel="icon" href="/images/icon/32.png" sizes="32x32"> | ||||
| 		<link rel="icon" href="/images/icon/16.png" sizes="16x16"> | ||||
| 
 | ||||
| 		<script src="dom.js"></script> | ||||
| 		<script src="messaging.js"></script> | ||||
|  |  | |||
|  | @ -3,9 +3,6 @@ | |||
| <head> | ||||
|   <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> | ||||
|   <title i18n-text="manageTitle"></title> | ||||
|   <link rel="icon" href="/images/icon/128.png" sizes="128x128"> | ||||
|   <link rel="icon" href="/images/icon/32.png" sizes="32x32"> | ||||
|   <link rel="icon" href="/images/icon/16.png" sizes="16x16"> | ||||
|   <link rel="stylesheet" href="manage.css"> | ||||
|   <link rel="stylesheet" href="msgbox/msgbox.css"> | ||||
| 
 | ||||
|  |  | |||
|  | @ -3,9 +3,6 @@ | |||
| <head> | ||||
|   <title i18n-text-append="optionsHeading">Stylus </title> | ||||
|   <link rel="stylesheet" href="index.css"> | ||||
|   <link rel="icon" href="/images/icon/128.png" sizes="128x128"> | ||||
|   <link rel="icon" href="/images/icon/32.png" sizes="32x32"> | ||||
|   <link rel="icon" href="/images/icon/16.png" sizes="16x16"> | ||||
|   <script src="/dom.js"></script> | ||||
|   <script src="/messaging.js"></script> | ||||
|   <script src="/localization.js"></script> | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user