Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7639805
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T08:30:56+00:00 2026-05-31T08:30:56+00:00

I just wrote a simple extension that has permission to *.google.com and changes some

  • 0

I just wrote a simple extension that has permission to *.google.com and changes some CSS on one class, and I think I overlooked something simple. I’m changing the +1 button, which is implemented like so:

<button ... class="esw eswd BRowJd Jt">  

In my style.css I say:

button.eswa { border: 2px solid #000000; }

the change never appears. I also tried switching the class to Jt in case that was overriding my CSS, no luck. The class that defines the unclicked +1 button is the “eswa”, fyi.

As per the documentation I also set permissions to the sites I want to alter in my manifest.json

{
“name”: “G+ Rebrander”,
“version”: “0.92”,
“description”: “Returns the original branding for G+ (pre March 2012) such as the +1 button.”,
“browser_action”: {
“default_icon”: “g-plus.png”
},

"icons":{
    "128":"g-plus128.png"
},

"permissions": [
    "http://plus.google.com/",
    "https://plus.google.com/",
    "http://*.google.com/",
    "https://*.google.com/",
    "tabs"
]

}

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T08:30:57+00:00Added an answer on May 31, 2026 at 8:30 am

    In the future listing your whole manifest.json file would be extremely helpful, since your didnt its hard for me to know exactly what your doing and thus what your error could be….so Ill just list a few possibilities.

    Using !important in your css rule is always a good idea when overriding css.

    Permissions is for if your injecting code from say the background page, not content scripts that get automatically added. The docs are slightly vague on that.

    For content scripts that get added automatically you only need to set the matches field of the content script.

    Your matches dont have a * at the end of them and as such would only match the front page and not any search results, which is what I assume your targeting.

    Keep in mind that google will typically redirect to a server in your country, so for me going to http://www.google.com will be redirected to http://www.google.com.au.

    The unlicked +1 for me was ewsd, not ewsa.

    If your only injecting css and not a script aswell then its a good idea to use the run_at field with a value of document_start. This will make sure your css is applied before the page is visible and thus avoid the page changing later when it gets applied. If you use this then you must use !important or the css added by the page later will override your css rule.

    So with all that a working manifest and css file looks like this…..
    manifest.json

    {
        "name": "css rules",
        "content_scripts": [
            {
             "matches": [
                "*://*.google.com/*",
                "*://*.google.com.au/*"
             ],
             "css": ["new.css"],
             "run_at" : "document_start"
            }
        ],
        "version":"1.0"
    }
    

    new.css

    button.eswd { border: 2px solid #000000 !important;}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just wrote some new utility methods within a non-page class for an existing
I'm trying to write a simple google extension that will upon clicking ctrl+alt+x search
I've never really written a real Chrome extension. I did one that was just
I wrote a simple web service in C# using SharpDevelop (which I just got
I just want a simple tool that will help me quickly write scripts/packages that
I just wrote my first web service so lets make the assumption that my
I'm trying to implement the simple-linkedinphp library (it's found at http://code.google.com/p/simple-linkedinphp/ ) It runs
I have a simple bookmarking app that I am developing to learn Google App
I'm using msysgit on Windows and wrote a simple shell script that I would
how can I write just a simple disassembler for linux from scratches? Are there

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.