Toggle Style Lite

Toggle Style Lite

Postby srazzano » Fri Feb 22, 2013 8:50 pm

Image Toggle Style Lite
Updated Nov 27, 2017

Toggles a single style enabled/disabled with the click of toolbar button.
Ctrl + left-click or middle-click button for Options/Settings Dialog (pic 1).
Settings for entering style id and keyboard shortcut. Default is (ctrl + x).
Pops an alert box if id is not found. Enter an id number with an r behind it for an auto restart (pic 2).
For key code: Click button"Get Key Code" (pic 1) from Settings dialog. Press a key on keyboard and popup displays the Key Code number. Cancel allows for another selection and OK inserts the number into the script.
Option Use Help CSS for enabling help tab section for css entries.
Option to change Enabled/Disabled state toolbarbutton icons.
Change any/all text labels from Options/Settings Dialog.
Last edited by srazzano on Wed Dec 13, 2017 6:41 pm, edited 218 times in total.
srazzano
 
Posts: 1508
Joined: Sat Mar 31, 2012 6:42 pm
Location: Las Vegas, Nevada

Re: Toggle Style Lite

Postby LL25255252 » Sat Mar 30, 2013 1:03 am

Thank you Sonny for this (I've waited a long time for something like this).

Clicking the button works .

The Custom Button has also an option to assign a keyboard shortcut to the button. So I tried to assign a keyboard shortcuts, restarted FF but it didn't work - nothing happened. :cry:
Tried to assign other keyboard shortcuts - no change.
I have another button (it toggles stylish on/off) for which I assigned a keyboard shortcut successfully.

custombuttons-0.0.5.6pre4
Firefox 20 beta
LL25255252
 
Posts: 20
Joined: Sat Mar 30, 2013 12:35 am

Re: Toggle Style Lite

Postby timefox » Sat Jul 06, 2013 4:45 pm

I added two of this button but the settings sync between the two buttons and I can only toggle one style.
Why do the settings sync between the two buttons? Is there any way to fix this?
timefox
 
Posts: 7
Joined: Sat Jun 08, 2013 8:33 pm

Re: Toggle Style Lite

Postby srazzano » Sat Jul 06, 2013 11:25 pm

Updated Toggle Style Lite so if cloned, will not interact on each other: viewtopic.php?f=4&t=875
To toggle more than one style, use Style Toggler: viewtopic.php?f=4&t=493
srazzano
 
Posts: 1508
Joined: Sat Mar 31, 2012 6:42 pm
Location: Las Vegas, Nevada

Re: Toggle Style Lite

Postby LL25255252 » Sat Aug 01, 2015 11:28 pm

Thanks a lot Sonny for keeping this great button alive. (see the updated opening thread post).

BTW:
For those who prefer a small button instead of the a big one:

Edit the "initalization" part. Scroll to about the middle of the "initalization" part and "Un-remark " these 32 lines:

Code: Select all
/*
var icons = nSpace1 + "\
  %23" + idFD + " %23imageIcon {\
    -moz-image-region: auto !important;\
    max-height: 16px !important;\
    max-width: 16px !important;\
  }\
";
loadSheet(icons);
var smallIcons = nSpace1 + "\
  %23" + this.id + " .toolbarbutton-icon {\
    height: 16px !important;\
    padding: 0 !important;\
    width: 16px !important;\
  }\
";
var largeIcons = nSpace1 + "\
  %23" + this.id + " .toolbarbutton-icon {\
    height: 24px !important;\
    padding: 0 !important;\
    width: 24px !important;\
  }\
";
if (toolbox == "small" || toolbar == "addon-bar") {
  loadSheet(smallIcons);
  unloadSheet(largeIcons);
} else {
  loadSheet(largeIcons);
  unloadSheet(smallIcons);
}
*/


IMO:
The 2015 icon looks better when it's big.
The 2013 icon looks good both small and big.

So for those who haven't decided yet which one you prefer, here are all the 4 options. You can install all them and delete afterwards the ones you don't like.
http://www.mediafire.com/view/2spkj2el0 ... ptions.htm
Download the htm file. And open it in Firefox.
LL25255252
 
Posts: 20
Joined: Sat Mar 30, 2013 12:35 am

Re: Toggle Style Lite

Postby jcarerra » Fri Nov 27, 2015 8:36 pm

So, can you help someone who can follow instructions but who doesn't understand anything about how all this works...
to get a different button icon to show?

I did get that shown earlier (un-commenting the 32 lines) to present the different icon,but it is a bit TOO small and too subdued. Ideally, I like the 'original' one, but reduced in size. But how do I "invoke" the ones referred to at
http://www.mediafire.com/view/2spkj2el0 ... ptions.htm

the post says we can install all of them and delete afterwards the ones you don't like, but I have no knowledge of how to do that.
jcarerra
 
Posts: 16
Joined: Fri Sep 11, 2015 6:23 pm

Re: Toggle Style Lite

Postby srazzano » Fri Nov 27, 2015 8:54 pm

Middle-click on the button and the Settings dialog will show. In the Toolbarbutton Icons section, click on the Disabled Icon or Enabled Icon button and the file picker will pop up. Select an icon image from your local drive and then click on Accept button.
srazzano
 
Posts: 1508
Joined: Sat Mar 31, 2012 6:42 pm
Location: Las Vegas, Nevada

Re: Toggle Style Lite

Postby jcarerra » Fri Nov 27, 2015 8:59 pm

Ah, I can do that!
Now how do I get images of the 2013, small, disabled, and enabled icons onto my hard drive (in the correct format...png? base64?)
?
I suppose I am supposed to use the mediafire page referenced, but I don't understand how to "move' from that into it being applied to the Toggle Style button--and the page also seems to have only the 'enabled' icons, not the 'disabled' ones.


LATER: just discovered
rt click the button>edit..
could I not post the base64 code for the image I want into the Image line there?
jcarerra
 
Posts: 16
Joined: Fri Sep 11, 2015 6:23 pm

Re: Toggle Style Lite

Postby srazzano » Fri Nov 27, 2015 10:04 pm

Need to put the base64 info in your about:config under extensions.custombuttons.toggleStyleLite.disabledIcon and extensions.custombuttons.toggleStyleLite.enabledIcon prefs
srazzano
 
Posts: 1508
Joined: Sat Mar 31, 2012 6:42 pm
Location: Las Vegas, Nevada

Re: Toggle Style Lite

Postby jcarerra » Fri Nov 27, 2015 10:20 pm

OK, see that.
Now (maybe last question) where do I get the base64 code for the 2013, small, disabled and enabled icons?

LATER
I put the base 64 code that I found in the page source of the mediafire page for the 2013 Small icon into the about config
extensions.custombuttons.toggleStyleLite1.enabledIcon
for the enabled icon, but it did not change the icon (closed and restarted Firefox)

Code: Select all
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAEmElEQVR42sWXa0wUVxTH/7MPIC1olbLTFBLiIyJCgUSxu8WkTa3bpn5omiaQpq02EhNDbNKukfLQb+CCBEhsjDHR+hlNE6XFJitoo7S8FndtfOE2C6XWdH0gKBVcFqZnZh8zd3YWdttQ7uTuuTtz55zf3HPvPedyPM9jKQunBvDZfNkk3ocAE8mZ+d8OSWFBOwbqO0byPN/Ce2MC+L7y1VPHr5EBferKVASEAAQhWvscNwedoFvwnmSA42DgDJgcmwQeYJZgG/lWvjYKgIzboUfVYcth7C/ZvyjD3fRzEy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OvqPUtZ8YfhtLyVZvaX/nI/jHojFrPMzM4g6SSt1ceoJICm8AiIx7Fza/PWFnq2exYVYP359Ri6PnSdmlvIBRPyycjm20CiG5lY0bqmFQV8gZTTax3NxLOApgdi9BXD960Ht1Bxp0JMXh+HjN+UnjNnQ5svi8QXVD8iV74CNq0IaYzjM6Pf0NOvmLJ+R/UbMn438nCpj+f/AHkOy9/5F4JkAAAAAElFTkSuQmCC
================================
above is what I entered; following trailed that in the page source...
">Small 2013 Icon - Toggle Style Lite (srazzano)</a><label>#17</label>
Last edited by jcarerra on Sat Nov 28, 2015 12:29 am, edited 2 times in total.
jcarerra
 
Posts: 16
Joined: Fri Sep 11, 2015 6:23 pm

Next

Return to Buttons made by forum users