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

  • SEARCH
  • Home
  • 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 7027535
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:15:39+00:00 2026-05-28T00:15:39+00:00

Im writing Userscript for one page. It is working under chrome. On that page

  • 0

Im writing Userscript for one page. It is working under chrome.
On that page are same elements that have rounded corners in firefox. I want to fix it so that those element will have rounded edges in google chrome.

I just want to replace Firefox syntax with chrome syntax in all linked CSS style sheets.
What is the best way to do it?

I’m using jquery.

  • 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-28T00:15:40+00:00Added an answer on May 28, 2026 at 12:15 am

    This is not a trivial thing to do with a userscript.

    The smartest thing to do would be to install something like Stylish and use it to override the styles you really want.


    The difficulties with trying to do this with a userscript are:

    1. You can’t use getComputedStyle(), because this only returns parsed, applicable styles. You won’t see “-moz” styles in Chrome nor “-webkit” styles in Firefox.

    2. Likewise, document.styleSheets also only shows parsed style rules with alien-browser-specific rules filtered out.

    3. You would have to parse the raw, CSS source-text. That is the textContent of every <style> and the AJAXed-in text obtained by following the href of every "text/css" <link>.

      This can get tricky and don’t even think about using RegEx if you want the solution to be robust at all.

    4. Cross-domain restrictions will also hamper fetching the <link> text, but this can be reduced by using GM_xmlhttpRequest().

    5. Once the raw CSS is parsed, then and only then can you go about overriding select CSS rules like so:

      Change Mozilla                      To CSS3                        
      ------------------------------      --------------------------
      -moz-border-radius-topright         border-top-right-radius     
      -moz-border-radius-bottomright      border-bottom-right-radius  
      -moz-border-radius-bottomleft       border-bottom-left-radius   
      -moz-border-radius-topleft          border-top-left-radius      
      -moz-border-radius                  border-radius               
      
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So, I'm writing a little Greasemonkey Userscript and its working fine in Firefox however
Writing a JSP page, what exactly does the <c:out> do? I've noticed that the
I'm writing a Chrome userscript to locally auto-save content in a CKEditor . I'm
I'm writing some javascript (a greasemonkey/userscript) that will insert some input fields into a
I'm writing a userscript for a website that uses Prototype. Rather than use the
I have been writing a userscript for the past few months, for my company,
I'm interested in writing some Chrome compatible Greasemonkey scripts, but I'm finding that there
I was writing user script for Google Chrome that would automatically open a specific
Writing a PHP app and have several classes that only have static methods (no
I'm writing a UserScript (=Greasemonkey) which I am developing in FireFox but works in

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.