Forum Discussion

Heinz_Berecz's avatar
Heinz_Berecz
Copper Contributor
Jun 23, 2023

CSS file that applies to all websites on the Internet

Can I create a CSS file that applies to all websites on the Internet?
I would like to find a way to uniformly determine the color of the links to already visited websites.

  •  Yes. You can make an Edge Add-On/Chrome Extension. Chrome extensions are compatible with Edge.

     

    You will need this in the manifest.json file:

     

     

     

    {
      "manifest_version": 3
      ...
      "content_scripts": [ 
        { 
          "css": ["yourCSS.css"], 
          "run_at": "document_idle", 
          "all_frames": true, 
          "matches": [ "https://*/*" ] 
        } 
      ]
    }

     

     

     

     

    You will then need a file in that directory called `yourCSS.css` or whatever you want to name it, with whatever CSS you want. You might need to adjust "run_at" and "matches" for it to work properly based on your use-case.

     
    If this doesn't work at all, you might need the scripting permission :

     

     

     

     

    {
      "manifest_version": 3,
      ...,
      "permissions": ["scripting"],
      ...
    }

     

     

     

     

    Heinz_Berecz

    • Heinz_Berecz's avatar
      Heinz_Berecz
      Copper Contributor
      Hi alteredbrainchemistry,
      Until now, I never made an Edge Add-On/Chrome Extension.
      How can I do this and which tools are necessary?