Add CSS for about:preferences (MR 8)
This commit is contained in:
		
							parent
							
								
									c77ba05450
								
							
						
					
					
						commit
						0765d1a25f
					
				
					 3 changed files with 40 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -31,3 +31,19 @@ if (chromeFile.exists() && defaultChrome.exists() &&
 | 
			
		|||
if (!chromeFile.exists()) {
 | 
			
		||||
  defaultChrome.copyTo(chromeDir, "userChrome.css");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Create nsIFile objects for userContent.css in <profile>/chrome/ and in /etc/
 | 
			
		||||
var contentFile = chromeDir.clone();
 | 
			
		||||
contentFile.append("userContent.css");
 | 
			
		||||
var defaultContent = new FileUtils.File("/etc/mobile-config-firefox/userContent.css");
 | 
			
		||||
 | 
			
		||||
// Remove the existing userContent.css if older than the installed one
 | 
			
		||||
if (contentFile.exists() && defaultContent.exists() &&
 | 
			
		||||
    contentFile.lastModifiedTime < defaultContent.lastModifiedTime) {
 | 
			
		||||
  contentFile.remove(false);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Copy userContent.css to <profile>/chrome/
 | 
			
		||||
if (!contentFile.exists()) {
 | 
			
		||||
  defaultContent.copyTo(chromeDir, "userContent.css");
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue