Skip to content

this trick really do not works anymore...pls Tsaost fix it we pray... #9

Description

@p060477

tried and ri-tried...do not works
i've portable firefox 89 vers:
D:\DESKTOP\BROWSERS\FIREFOX\FirefoxPortable_89

i've dl config-prefs.js and put in : D:\DESKTOP\BROWSERS\FIREFOX\FirefoxPortable_89\App\Firefox\defaults\pref\config-prefs.js
and edit as:
// config-prefs.js file for [Firefox program folder]D:\DESKTOP\BROWSERS\FIREFOX\FirefoxPortable_89\App\Firefox\defaults\pref\config-prefs.js pref("general.config.obscure_value", 0); // the file named in the following line must be in [Firefox program folder] pref("general.config.filename", "userChrome.js"); // disable the sandbox to run unsafe code pref("general.config.sandbox_enabled", false);

then edited also userChrome.js as:

`// First line is always a comment

/*
This is the actual code that autoload Firefox addons from a local directory.

The file must be copied to your Firefox installation directory. For example
on Windows this is usually "c:\Program Files (x86)\Mozilla Firefox" for the
32-bit version of Firefox. You can rename the file, but remember to modify
the corresponding line pref("general.config.filename", "userChrome.js") in
defaults/pref/config-prefs.js

For best security, on Winndows it is best to leave your Firefox install in
"c:\Program Files" so that your config-prefs.js and userChrome.js can only
be modified when you are in root/admin mode.
*/

// https://mike.kaply.com/2016/09/08/debugging-firefox-autoconfig-problems/
lockPref("a.b.c.d", "1.2.3.4"); // Debugging Firefox AutoConfig Problems

// userChrome.js file for [Firefox program folder]
// file name must match the name in [Firefox program folder]\defaults\pref

function reportError(ex) {
Components.utils.reportError("userChrome.js Ex(" + ex + ")");
}

function printDebut(text) {
Components.utils.reportError("userChrome.js " + text);
}

// Based on class Addon { static async install(path, temporary = false) ... }
// d:\Files\Firefox102.2.0esr\omni_ja\chrome\remote\content\marionette\addon.js
// from https://developer.mozilla.org/en-US/Add-ons/Add-on_Manager/AddonManager#AddonInstall_errors
const ERRORS = {
[-1]: "ERROR_NETWORK_FAILURE: A network error occured.",
[-2]: "ERROR_INCORECT_HASH: The downloaded file did not match the expected hash.",
[-3]: "ERROR_CORRUPT_FILE: The file appears to be corrupt.",
[-4]: "ERROR_FILE_ACCESS: There was an error accessing the filesystem.",
[-5]: "ERROR_SIGNEDSTATE_REQUIRED: The addon must be signed and isn't.",
};

// Untested...
async function installAddon(file) {
let install = await AddonManager.getInstallForFile(file, null,
{ source: "internal", });
if (install.error) {
reportError(ERRORS[install.error]);
}
return install.install().catch(err => {
reportError(ERRORS[install.error]);
});
}

async function installExtension(path, temporary) {
let addon;
let file;

printDebut("installTemporaryExtension(" + path + ")");
try {
  file = new FileUtils.File(path);
} catch (ex) {
	reportError(`Expected absolute path: ${ex}`, ex);
}

if (!file.exists()) {
	reportError(`No such file or directory: ${path}`);
}

try {
    // addon = await AddonManager.installTemporaryAddon(file);
	if (temporary) {
		addon = await AddonManager.installTemporaryAddon(file);
	} else {
		addon = installAddon(file);
	}
} catch (ex) {
	reportError(`Could not install add-on: ${path}: ${ex.message}`, ex);
}

}

function installUnpackedExtensions(D:\DESKTOP\BROWSERS\FIREFOX\FirefoxPortable_89\Data\profile\extensions) {
// If you want to have more security, put your personal extension in
// your Firefox install directory so that they can be modified only
// with admin access (just like config-prefs.js and userChrome.js)
installExtension("d:\workspace\go\src\chrome\selectsearch", true);
installExtension("d:\workspace\go\src\chrome\copylink", true);
installExtension("d:\workspace\go\src\chrome\linkurlcopy", true);
}

/*
Single function userChrome.js loader to run the above init function
(no external scripts) derived from
https://www.reddit.com/r/firefox/comments/kilmm2/
*/
try {
let { classes: Cc, interfaces: Ci, manager: Cm } = Components;
const {Services} = Components.utils.
import('resource://gre/modules/Services.jsm');
function ConfigJS() {
//Services.obs.addObserver(this, 'chrome-document-global-created', false);
// Use this if your extension needs to be loaded after UI is ready

  // Wait for 'final-ui-startup' to avoid the error
  // "AddonManager is not initialized"
  Services.obs.addObserver(this, 'final-ui-startup', false);

}

const { AddonManager } =
Components.utils.import("resource://gre/modules/AddonManager.jsm");

const { FileUtils } =
Components.utils.import("resource://gre/modules/FileUtils.jsm");

ConfigJS.prototype = {

  observe: async function observe(subject, topic, data) {
	  switch (topic) {

// case 'chrome-document-global-created':
// subject.addEventListener('DOMContentLoaded', this, {once: true});
// break;
case 'final-ui-startup':
installUnpackedExtensions();
break;
}
}
};

if (!Services.appinfo.inSafeMode) {
new ConfigJS();
}

} catch(ex) {
reportError(ex);
};

lockPref("e.f.g.h", "5.6.7.8"); // Debugging Firefox AutoConfig Problems`

and put in :
D:\DESKTOP\BROWSERS\FIREFOX\FirefoxPortable_89\App\Firefox

then at last i edited also manifest.jason file of my dark reader unpacked extension:

{ "manifest_version": 2, "name": "Dark Reader", "version": "3.5.4", "author": "Alexander Shutov", "description": "Dark theme for every website. Care your eyes, use Dark Reader for night and daily browsing.", "browser_action": { "default_title": "Dark Reader", "default_icon": { "19": "img/dr_active_19.png", "38": "img/dr_active_38.png" }, "default_popup": "popup/popup.html" }, "icons": { "16": "img/dr_16.png", "48": "img/dr_48.png", "128": "img/dr_128.png" }, "background": { "page": "background/background.html" }, "permissions": [ "storage", "tabs", "<all_urls>" ], "commands": { "toggle": { "suggested_key": { "default": "Alt+Shift+D" }, "description": "Toggle On/Off" }, "addSite": { "suggested_key": { "default": "Alt+Shift+A" }, "description": "Toggle current site" } }, "applications": { "gecko": { "id": "addon@darkreader.org", "strict_min_version": "54.0" } }, "browser_specific_settings": { "gecko": { "id": "addon@darkreader.org", "strict_min_version": "54.0" } } }

and put in:

D:\DESKTOP\BROWSERS\FIREFOX\FirefoxPortable_89\Data\profile\extensions\manifest.json

but when i start my .
D:\DESKTOP\BROWSERS\FIREFOX\FirefoxPortable_89\FirefoxPortable.exe
which starts my firefox 89 vers portable
i always get error:
"Failed to read configuration file. Contact your system administrator."

is yr project EOL or are you still able to fix it helping us

we really thxs you so much indeed from the very deep of our hearts
and we anxiously waiting for the fix of this bug
cheers

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions