Prefbar - One Mozilla Toolbar Extension to rule them all

ClippyBeer

Moderator
Prefbar is a legacy Mozilla extension that provides several features normally handled by other extensions. Like a Swiss Army Knife it combines several tools into one neat package.
Features include: Enable/Disable Javascript, Cookies, Adobe Flash, Silverlight, inline images, Auto-refresh, Java, Fonts, Referrer etc.
It also has a built-in User Agent switcher that can be modified to include your custom user agents.

I have tested it with MyPal, Centaury and Serpent 55 but it should work with other XP Mozilla browsers.

Begin by downloading the latest package (7.1.1).

http://prefbar.tuxfamily.org/archive.html

It will download a zip file - extract the XPI file and install it in your browser by selecting 'Install Add-on From File...'

image.png


After installation it will require a browser restart. It will install a few default buttons and the User Agent switcher.

image.png


Click on the 'Customize' button and you will get a dialogue that will allow you to add/remove buttons of your choice:

There 2 columns - the left pane is the available buttons while the right pane show the buttons currently displayed on the toolbar.

Adding/removing buttons is done by dragging and dropping - to add drag from left pane to right, to remove drag from right pane to left

image.png


There are other buttons available on prefbar's site by clicking the 'Get more buttons' link on the 'Customize' dialogue.

Find a button you want to add and click on the 'Download' link (Import doesn't work). It will download a file with the .'BTN extension (It's actually just a text file).

image.png


Click on the 'Customize' button again on the toolbar and this time right-click on the left pane, choose 'Import' and select the .BTN file you just downloaded.

image.png


The button you just imported should now show on the toolbar.

image.png


Plenty of buttons to choose from.

The User Agent Switcher.

If you click on the 'Real UA' button you will be presented with a drop-down menu of some generic browser user agents to spoof on websites.

image.png


The included ones aren't that useful but you can easily add/delete/modify them to suit your needs

Right-click on the 'Real UA' and select 'Edit button "User Agent"'.

image.png


The left column is the label that appears in the drop down menu. The right column is the actual user agent string sent to the website.

image.png


Roll your own buttons

Many of you are familiar with Mozilla's advanced settings by entering 'about:config' in the URL bar. You can convert practically any of those settings to a Prefbar button.

As an example I am going to create a toggle button for the 'layout.css.dpi' setting that has a default value of -1. Clicking on the button will change it to 1.6.

image.png


Here's the code:

Code:
{
  "prefbar:info": {
    "formatversion": 3
  },
  "prefbar:menu:enabled": {
    "items": [
      "prefbar:button:dpi"
    ]
  },
  "prefbar:button:dpi": {
    "type": "check",
    "label": "dpi",
    "prefstring": "layout.css.dpi",
    "topref": "value ? 1.6 : -1",
    "frompref": "value == 1.6"
  }
}

Copy/paste that code into notepad and save it as mobileview.btn (the actual filename doesn't matter as long as it has the .BTN extension).

Now import it into Prefbar and try it out.

It's pretty self-explanatory.

"type": "check" - this is the type of button. This one is a toggle, a button with a tick box. Clicking on the box will switch from one predefined value to another
"label": "dpi" - the button label that will appear on the toolbar
"prefstring": "layout.css.dpi" - the actual setting that will be modified
"topref": "value ? 3 : -1" the values that will be switched between, the original value is at the end
"frompref": "value == 3" the new value when the button is checked.

You can analyze other buttons simply by exporting them to BTN files that can be viewed/editied in Notepad. If you are going to experiment by modifyng existing button make sure you change the label tag and the 2 prefbar:button:xxx" tags so the original ones won't get overwritten.
 
Back
Top