Opera FAQs, Tips, Tricks & Tweaks

Tips for Opera browser since 2005

Quickly enable or disable a style using keyboard shortcut/mouse gesture

, , , , , , , , ,

Author mode and user mode styles can be switched quickly using the default keyboard shortcut, Shift+G but there is no shortcut to enable or disable other styles except View > Style menu.

Any style can be enabled or disabled quickly by using action codes Select user CSS file and Deselect user CSS file respectively. Create a new keyboard shortcut or mouse gesture in Document Window section with the following action code.

Select user CSS file, X | Deselect user CSS file, X

For Windows OS, X = Style sheet number (files sorted in ascending order) - 1. If you don't have any additional CSS style files inside profile\styles\user directory except the default ones, you can use the X value from the following table.

# Style file name Style name X value for Windows OS
1 accessibility.css Accessibility Layout  0 
2 altdebugger.css Alt Debugger 1
3 classid.css Class and Id 2
4 contrastbw.css High Contrast (B/W) 3
5 contrastwb.css High Contrast (W/B) 4
6 disablebreaks.css Disable Breaks 5
7 disablefloats.css Disable Floats 6
8 disableforms.css Disable Forms 7
9 disablepositioning.css Disable Positioning 8
10 disabletables.css Disable Tables 9
11 outline.css Outline 10
12 structureblock.css Block Structure 11
13 structureinline.css Inline Structure 12
14 structuretables.css Table Structure 13
15 tablelayout.css Fixed Table Layout 14
16 toc.css Table of Contents 15

For Linux OS, open terminal and copy & paste the following command to find the X value.

ls ~/.opera/styles/user/ -U | awk '{ print FNR-1 " " $1 }'

Command to find X value in Linux OS
Command to find X value in Linux OS

Example: Action code to enable or disable accessibility layout

For Windows OS,

Select user CSS file, 0 | Deselect user CSS file, 0
For Linux OS,
Select user CSS file, 5 | Deselect user CSS file, 5

If you add additional CSS style files later you may have to change the X value.

The MahabharataReduce integration drag area in non-maximized Opera window

Comments

Abhinavdecodedthought Sunday, February 28, 2010 3:59:15 PM

up

Charles SchlossChas4 Sunday, February 28, 2010 5:38:33 PM

up banana

d4rkn1ght Sunday, February 28, 2010 6:22:04 PM

cool

Unregistered user Sunday, February 28, 2010 6:33:04 PM

Anonymous writes: I think you accidentally switched the linux values for disabletables.css and contrastbw.css. I had to switch them to make it work, anyways.

Angelikiellinidata Sunday, February 28, 2010 7:06:32 PM

cool! up + banana

Tamil Sunday, February 28, 2010 11:07:18 PM

I think you accidentally switched the linux values for disabletables.css and contrastbw.css.

It is correct for me. Which Linux distribution you are using?

@Chas4, ellinidata: http://files.myopera.com/Tamil/Smilies/Drool.gif -

Unregistered user Monday, March 1, 2010 5:24:09 PM

Anonymous writes: I'm using Ubuntu Karmic. The high contrast was definitely 4 for me and not three. It's a wonderful tip either way; I use high contrast a lot, and it was a pain to have to go to menu all the time ^_^

Tamil Monday, March 1, 2010 5:29:00 PM

I'm using Ubuntu Karmic.

Same here. sherlock

Unregistered user Monday, March 1, 2010 5:49:08 PM

Anonymous writes: Huh, that's weird. I don't have any extra styles or anything, so it should be the same. *shrugs* Oh well. It's working, so I suppose it doesn't matter all that much.

beavidal Saturday, March 6, 2010 1:58:17 AM

Hi Tamil

just passing by wink

Tamil Saturday, March 6, 2010 3:34:39 AM

LéazzBabyJay99 Saturday, March 6, 2010 2:12:06 PM

banana up

Tamil Saturday, March 6, 2010 4:10:03 PM

Charles SchlossChas4 Saturday, March 6, 2010 10:08:08 PM

banana

Originally posted by b_laudanum:

just passing by



http://files.myopera.com/Tamil/Smilies/Whistle.gif -

LéazzBabyJay99 Sunday, March 7, 2010 8:29:34 AM

bigsmile

MosesMosesTheDog Friday, March 12, 2010 11:45:11 PM

I just use my paws and I get all kinds of neat stuff happen.

Tamil Friday, March 12, 2010 11:46:28 PM

bigsmile

MosesMosesTheDog Saturday, March 13, 2010 12:00:25 AM

arf! arf! arf!
banana banana banana banana banana banana banana banana banana banana banana banana banana banana banana banana banana banana banana banana banana banana banana banana banana banana banana banana banana banana banana banana banana banana banana banana banana banana banana banana banana banana banana banana banana banana banana banana banana banana

Tamil Saturday, March 13, 2010 12:15:15 AM

Unregistered user Saturday, March 13, 2010 1:40:12 AM

Avila writes: Thanks for the post. It's help me a lot. I think in Linux (I use Ubuntu) Opera uses de order of directory to make the menu of styles, so we can use the following commands: ls -U | awk '{ print FNR-1 " " $1 }' The option "-U" in "ls" means, as describe in "man ls": "-U do not sort; list entries in directory order" The option "FNR-1" of awk means: Print the line number minus 1. The first line will be 1 if we don't use "-1". As we need a zero-based count we need to use "-1". The result will be a list with styles names with a number at left side. We will use this number as parameter after the second comma as you taught above in your post. Here it works. I expect that it works for you. Avila.

Unregistered user Saturday, March 13, 2010 2:32:55 AM

Avila writes: Another detail. If you create a new file in the directory of styles the order is changed in the directory and then the number in menu of style is changed too. If you after remove the recently created file the old order won't come back. You need to execute the commands again and correct the numbers in .ini. Avila.

Tamil Sunday, March 14, 2010 4:21:51 PM

I think in Linux (I use Ubuntu) Opera uses de order of directory to make the menu of styles

Thanks. up

Unregistered user Sunday, March 14, 2010 6:56:22 PM

Nesh writes: This is great. I always wanted this. Thank you so much!

Mad Scientistqlue Friday, April 2, 2010 1:52:40 AM

up.

tunayx Friday, April 16, 2010 4:11:05 PM

Can you create a button that enable/disable my style sheet?

Tamil Friday, April 16, 2010 4:43:52 PM

tunayx Saturday, April 17, 2010 1:22:14 PM

I created "deselect user css file" button but it doesn't work.

Tamil Saturday, April 17, 2010 3:20:13 PM

You have to mention X value in code as mentioned in post.

tunayx Saturday, April 17, 2010 5:42:39 PM

I created a button that switch to author/user mode, on user I unchecked "my style sheet" and check the rest, now I can instatly turn off my css.

How to use Quote function:

  1. Select some text
  2. Click on the Quote link

Write a comment

Comment
(BBcode and HTML is turned off for anonymous user comments.)

If you can't read the words, press the small reload icon.


Smilies