Firefox Browser Add-ons
  • Extensions
  • Themes
    • for Firefox
    • Dictionaries & Language Packs
    • Other Browser Sites
    • Add-ons for Android
Log in
Preview of domain.cls

domain.cls by Bruce Wen

Add 'domain' to body class

0 (0 reviews)0 (0 reviews)
1 User1 User
You’ll need Firefox to use this extension
Download Firefox and get the extension
Download file

Extension Metadata

About this extension
Most web sites pages don't use the domain name as body class to distinguish from other web sites' pages. That makes web page appearance customization hard in some degree. The reason is that people have to distinguish web sites by specific configuration (by domain name, regex etc).

By adding domain name to body classList, the problem could be solved. Web/UI/UX developers can create customized styl, css scripts to re-design web page appearance easily - they can put all customization script together for different web sites and don't need to care about collision.

For example, after using the add-on, the web page will be changed to add domain name to body class attribute.
<body class="mozilla ">
<body class="apache">

Then, in styl or css script file, developer can make customization like below:
body.mozilla {font-size: 15px}
body.apache {font-size: 16px}
Developer comments
This is for developers working on web site appearance customization.
By adding domain name to body classList, it's easier to define styl, css scripts for specific web sites/pages belong to the same domain without worry about collision among different domains.
Rated 0 by 0 reviewers
Sign in to rate this extension
There are no ratings yet

Star rating saved

5
0
4
0
3
0
2
0
1
0
No reviews yet
Permissions and dataLearn more

Required permissions:

  • Access your data for all websites
More information
Add-on Links
  • Homepage
  • Support site
  • Support Email
Version
1.6
Size
68.21 KB
Last updated
3 years ago (Feb 22, 2022)
Related Categories
  • Web Development
License
Mozilla Public License 2.0
Version History
  • See all versions
Add to collection
Report this add-on
Support this developer

The developer of this extension asks that you help support its continued development by making a small contribution.

Contribute now

Release notes for 1.6
To support sub-domain like en.wikipedia.org, we need to use en_wikipedia as body class to distinguish other language version of wikipedia. Similar, google translate should have different body class from gmail.
More extensions by Bruce Wen
  • There are no ratings yet

  • There are no ratings yet

  • There are no ratings yet

  • There are no ratings yet

  • There are no ratings yet

  • There are no ratings yet

Go to Mozilla’s homepage

Add-ons

  • About
  • Firefox Add-ons Blog
  • Extension Workshop
  • Developer Hub
  • Developer Policies
  • Community Blog
  • Forum
  • Report a bug
  • Review Guide

Browsers

  • Desktop
  • Mobile
  • Enterprise

Products

  • Browsers
  • VPN
  • Relay
  • Monitor
  • Pocket
  • Bluesky (@firefox.com)
  • Instagram (Firefox)
  • YouTube (firefoxchannel)
  • Privacy
  • Cookies
  • Legal

Except where otherwise noted, content on this site is licensed under the Creative Commons Attribution Share-Alike License v3.0 or any later version.