add userChrome CSS enablement for Firefox app mode
Former-commit-id: ccdfeac71a
Former-commit-id: b3e477a84e261e12c65b514b620cb5cec5ca8acf
This commit is contained in:
@ -227,3 +227,4 @@ user_pref("webgl.enable-webgl2", false);
|
||||
user_pref("dom.w3c_touch_events.enabled", false);
|
||||
user_pref("browser.privatebrowsing.autostart", false);
|
||||
user_pref("browser.display.use_system_colors", false);
|
||||
user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", false);
|
@ -227,3 +227,4 @@ user_pref("webgl.enable-webgl2", false);
|
||||
user_pref("dom.w3c_touch_events.enabled", false);
|
||||
user_pref("browser.privatebrowsing.autostart", false);
|
||||
user_pref("browser.display.use_system_colors", false);
|
||||
user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", false);
|
@ -232,10 +232,19 @@ public class I2PFirefoxProfileBuilder extends I2PCommonBrowser {
|
||||
logger.info("Error copying base profile to profile" + e);
|
||||
return false;
|
||||
}
|
||||
// if user-overrides.js does not exist yet, make an empty one.
|
||||
// if (!touch(profileDir.toString(), "user-overrides.js")) {
|
||||
// return false;
|
||||
//}
|
||||
if (userOverrides.exists()) {
|
||||
if (app) {
|
||||
I2PFirefoxProfileChecker.undoValue(
|
||||
"user_pref(\"toolkit.legacyUserProfileCustomizations.stylesheets\", false);",
|
||||
"user_pref(\"toolkit.legacyUserProfileCustomizations.stylesheets\", true);",
|
||||
userOverrides);
|
||||
} else {
|
||||
I2PFirefoxProfileChecker.undoValue(
|
||||
"user_pref(\"toolkit.legacyUserProfileCustomizations.stylesheets\", true);",
|
||||
"user_pref(\"toolkit.legacyUserProfileCustomizations.stylesheets\", false);",
|
||||
userOverrides);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -134,8 +134,8 @@ public class I2PFirefoxProfileChecker extends I2PCommonBrowser {
|
||||
return true;
|
||||
}
|
||||
|
||||
private static boolean undoValue(String oldString, String newString,
|
||||
File fileToBeModified) {
|
||||
public static boolean undoValue(String oldString, String newString,
|
||||
File fileToBeModified) {
|
||||
String oldContent = "";
|
||||
BufferedReader reader = null;
|
||||
FileWriter writer = null;
|
||||
|
Reference in New Issue
Block a user