Recommended Posts

As some of you may know using a userjs opera is able to add a custom string to the opening html tag of pages to allow you to custom style webpages.

With the intoduction of the Technical Preview of Opera the Opera developers have mad it possible to do this without using a userjs.

Here's how:

Site-Specific Stylesheets

In case you missed the news, Opera 9.0 TP1 allows you to use permanent custom stylesheets for web sites without the need to use javascript hacks of any kind.

Overrides

First, you specify which sites need custom stylesheet, by adding this section to opera6.ini

[Overrides]

annevankesteren.nl

freebsd.org

As mentioned elsewhere, (freebsd.org) will match www.freebsd.org and freebsd.org, whilst (www.freebsd.org) will match only www.freebsd.org. Be general, unless you need to be specific.

Case 1: Removing Author Styles, Using a Custom Stylesheet

[annevankesteren.nl]

Author Display Mode|Author CSS=0

Author Display Mode|User CSS=1

User Prefs|Local CSS File=/home/moose/opera-admin/css-site/annevankesteren.css

You can cram various settings for this particular site, but for the purposes of illustration, I choose to present only application of the custom stylesheet. The first line, (Author Display Mode|Author CSS=0) tells Opera to not use the author's stylesheet. The second line tells Opera to use your own stylesheet (this line is not necessary if you have user CSS enabled in author mode). Finally, the third line points Opera to your custom stylesheet.

I have a directory with outsourced Opera settings, which are used by several separate installations I maintain. The paths are that of unix - adjust for Windows/mac as necessary.

Case 2: Keeping Author Styles, Using a Custom Stylesheet

[freebsd.org]

Author Display Mode|Author CSS=1

Author Display Mode|User CSS=1

User Prefs|Local CSS File=/home/moose/opera-admin/css-site/freebsd.css

The first line, (Author Display Mode|Author CSS=1) tells Opera to keep the author's stylesheet. The second line tells Opera to use your own stylesheet. neither the first, nor the second line is necessary if you have both author and user CSS enabled in author mode). Finally, the third line points Opera to your custom stylesheet.

Summary

Since I have both author and user CSS enabled in author mode, I need only the following additions to opera6.ini:

[Overrides]

annevankesteren.nl

freebsd.org

[annevankesteren.nl]

Author Display Mode|Author CSS=0

User Prefs|Local CSS File=/home/moose/opera-admin/css-site/annevankesteren.css

[freebsd.org]User Prefs|Local CSS File=/home/moose/opera-admin/css-site/freebsd.css

Benefits

Why use this?

1. No need to run user scripts that insert hooks for styling

2. No need to invoke scripting environment for all sites, even those which do not have any scripts, by always running user javascript

3. Easy management of site profiles

4. Support for local directories of site stylesheets

5. User js quirks and imperfections, particularly related to page load time - matter no more

<abba>Gimme, Gimme, Gimme</abba>

What else do we need to make this more of a killer feature than it already is?

1. UI — myself, I do not need it - but some of you may

2. Support for @import in user stylesheets — Opera does not yet support it, but we're working on it

enjoy and share,

M.

SOURCE

IMO this is excellent news, being able to style pages without using a userjs which doesn't load until the page gets loaded anyway is a brilliant addition.

Link to comment
https://www.neowin.net/forum/topic/389938-site-specific-stylesheets/
Share on other sites

I have found a gmail stylesheet which fixes some of the eye candy of the site, it does however make the background behind emails a grey color which I'm going to change.

There is also a small piece of css to make the rich text buttons appear in one line like they should.

  • 2 weeks later...
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • I agree when are you going to read this (really poor BTW) article?
    • I disagree; they come off very "bitchy" and "whiny". Make a great product and combine that with a great price (free) and people will come over to your side. Or build it and they will come as they say. Constantly trying to get attention by complaining all the time, will turn people off to your product.
    • It use to be a nightmare, with LibreOffice supporting a newer draft ODF standard by default, and Microsoft Office supporting the older non-draft standard. Now that they both support the same version of ODF, they should be interoperable.
    • Brave Browser 1.91.171 by Razvan Serea Brave Browser is a lightning-fast, secure web browser that stands out from the competition with its focus on privacy, security, and speed. With features like HTTPS Everywhere and built-in tracker blocking, Brave keeps your online activities safe from prying eyes. Brave is one of the safest browsers on the market today. It blocks third-party data storage. It protects from browser fingerprinting. And it does all this by default. Speed - Brave is built on Chromium, the same technology that powers Google Chrome, and is optimized for speed, providing a fast and responsive browsing experience. Brave Browser also features Brave Rewards, a system that rewards users with Basic Attention Tokens (BAT) for viewing opt-in ads. This innovative system provides an alternative revenue model for content creators and a way to support the Brave community. SlimBrave Neo takes all the good things about Brave and makes them even better by keeping everything clean, light, and privacy-focused. It removes the extra clutter, turns off features you might not need, and cuts down on anything that could slow you down or collect unnecessary data. Because it relies on simple settings and policies instead of modifying the browser itself, you still get full Brave compatibility—just in a smoother, lighter, and more privacy-friendly package. Brave Browser 1.91.171 changelog: General Fixed Cardano not being disabled on upgrade to Brave Origin. Upgraded Chromium to 149.0.7827.103. Origin Removed “Survey Panelist” setting from brave://settings/privacy. Fixed P3A and usage ping under brave://settings/privacy being displayed on first launch on Linux. Upgraded Chromium to 149.0.7827.103. Download: Brave Browser 64-bit | 1.2 MB (Freeware) Download: Brave Browser 32-bit View: Brave Homepage | Offline Installers | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • Hi. As the title suggests, I can't access the forum on my phone. I'm using Edge on Android and when I try to navigate to the forum I get a "we value your privacy" popup and none of the buttons are clickable. It effectively stonewalls me from reading any forum content.
  • Recent Achievements

    • Rookie
      Marzoid went up a rank
      Rookie
    • Community Regular
      coch went up a rank
      Community Regular
    • One Year In
      slackerzz earned a badge
      One Year In
    • One Year In
      highriskpaym earned a badge
      One Year In
    • One Month Later
      highriskpaym earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      519
    2. 2
      PsYcHoKiLLa
      190
    3. 3
      +Edouard
      156
    4. 4
      Steven P.
      84
    5. 5
      ATLien_0
      75
  • Tell a friend

    Love Neowin? Tell a friend!