We're calling on all EU-based Mozillians with iOS or iPadOS devices to help us monitor Apple’s new browser choice screens. Join the effort to hold Big Tech to account!

সহায়তা খুঁজুন

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

আরও জানুন

What file is Firefox using for userContent.css

  • 2 উত্তরসমূহ
  • 2 এই সমস্যাটি আছে
  • 1 দেখুন
  • শেষ জবাব দ্বারা rccharles

more options

I'd like to know if Firefox has found my css modifications. Is there a way of querying the location of the file that Firefox is using? I had a situation where Firefox didn't find my userContent.css. How would I diagnose this.

I find this code fragment around the internet. I attempted to run it, but got an error.

Components.classes["@mozilla.org/file/directory_service;1"].getService( Components.interfaces.nsIProperties).get("ProfD", Components.interfaces.nsIFile).path

I got these errors. Use of getPreventDefault() is deprecated. Use defaultPrevented instead. common-min.0cd8251fe9d4.js:4:25928 Error: Error retrieving geoip data

common-min.0cd8251fe9d4.js:10:17360

"The version of Tabzilla you are using is deprecated and will be removed in the future.

Please update to the new static version here: https://github.com/mozilla/tabzilla/" tabzilla.js:612:17 The Components object is deprecated. It will soon be removed.

I'd like to know if Firefox has found my css modifications. Is there a way of querying the location of the file that Firefox is using? I had a situation where Firefox didn't find my userContent.css. How would I diagnose this. I find this code fragment around the internet. I attempted to run it, but got an error. Components.classes["@mozilla.org/file/directory_service;1"].getService( Components.interfaces.nsIProperties).get("ProfD", Components.interfaces.nsIFile).path I got these errors. Use of getPreventDefault() is deprecated. Use defaultPrevented instead. common-min.0cd8251fe9d4.js:4:25928 Error: Error retrieving geoip data common-min.0cd8251fe9d4.js:10:17360 "The version of Tabzilla you are using is deprecated and will be removed in the future. Please update to the new static version here: https://github.com/mozilla/tabzilla/" tabzilla.js:612:17 The Components object is deprecated. It will soon be removed.

সমাধান চয়ন করুন

You need to evaluate that code in the Browser Console to find the path to the current profile folder.

Components.classes["@mozilla.org/file/directory_service;1"].getService( Components.interfaces.nsIProperties).get("ProfD", Components.interfaces.nsIFile).path

You need to set devtools.chrome.enabled to true on the about:config page to enable the command line in the Browser Console.

Paste the JavaScript code in the command line. Press the Enter key to evaluate the JavaScript code.


The built-in Page Inspector also shows rules added via userContent.css to a website as (user agent) rules with a link to the userContent.css file.


You can use the DOM Inspector to see what rules are applied to an element. This includes rules added via userChrome.css and userContent.css.

See also:

প্রেক্ষাপটে এই উত্তরটি পড়ুন। 👍 1

All Replies (2)

more options

চয়ন করা সমাধান

You need to evaluate that code in the Browser Console to find the path to the current profile folder.

Components.classes["@mozilla.org/file/directory_service;1"].getService( Components.interfaces.nsIProperties).get("ProfD", Components.interfaces.nsIFile).path

You need to set devtools.chrome.enabled to true on the about:config page to enable the command line in the Browser Console.

Paste the JavaScript code in the command line. Press the Enter key to evaluate the JavaScript code.


The built-in Page Inspector also shows rules added via userContent.css to a website as (user agent) rules with a link to the userContent.css file.


You can use the DOM Inspector to see what rules are applied to an element. This includes rules added via userChrome.css and userContent.css.

See also: