/* TKM v2.0.2.3 by there.is.only.xul */

/*
Directions to use this full profile backup:
- Download and install the Firefox Environment Backup Extension (FEBE)
- Exit Firefox, go into run (Win+R), type in "firefox -p" to invoke the profile manager
- Create a new profile and run it
- Exit the new profile
- Invoke profile manager again and use the profile with FEBE installed
- Go to Tools > FEBE > Restore Backup
- Select the newly-made profile and use the received .fbu file to restore onto it
- Exit Firefox
- Go into the profile manager, tell it never to invoke itself again (if applicable) and configure from there.
---> Optionally, delete the profile you used to restore the TKM2 profile, or password-protect it.

If keyconfig and Tab Killer go MIA, reinstall them; get Tab Killer from it's homepage (latest version from GitHub)
and grab keyconfig from the MozillaZine forums (Look it up.) Also this information is probably redundant, but it helps to repeat it.

/* CHANGELOG
1.0 - Release
1.1 - Added searchbar entities, notes, among other things, including, but not limited to recommended extensions
1.1.1 - Credit fix, some note improvements
1.1.3 - Some more notes, tab bar entities, search bar padding fix when menu is removed added
1.1.4 - EMERGENCY RELEASE; A comment was not closed and was ruining this style's functionality.
1.1.5 - Omnibar added to style.
2.0.0 - Obsoleted prior versions, cleaned up things, added Firefox 7-specific things
2.0.1 - Bad advice fixup (extensions.checkCompatibility.7.0)
2.0.2 - Minor notes update, downloadable profile (Use FEBE)
2.0.2.1 - Stupid fix.
2.0.2.2 - Added awesomebar country code ID, renamed and re-uploaded profile on style page.
2.0.2.3 - EMERGENCY RELEASE; Comments again, stupid fix redux.

This new version of True Kiosk Mode is made to be simpler, relying on addons
more than anything else. Due to this, the browser may be more easily compromised.
Rest assured, advice will be offered throughout the code to prevent a compromise
from happening.

A note about extensions: The best options I can find that work with Firefox 11
and up will be offered in each block of code. Below is a list of other extensions
not mentioned in the code at all, as well as their (potential) purpose(s). Some
extensions listed below may need compatibility checking disabled. This is due to
the maxVersion tags for said extensions not being updated for compatibility.

Do the following to disable extension compatibility checking in Firefox:
- Go to about:config in your browser and proceed past the "Warning" screen
- Right click anywhere in the page (below the "Filter" field
- Select New > Booleen (True/False)
- Make the booleen string "extensions.checkCompatibility.X.X" (X being installed version) and proceed
- Pick "False" in the next window, and verify by examining the add-ons tab
---> If this did not work, attempt to use other version numbers or consult the
     mozillaZine kb in order to find the appropriate booleen string name
---> If successful, the add-ons tab will request to re-enable compatibility
     checking. Ignore it.

Other extensions that  may be helpful in configuring Firefox into the best
kiosk browser it can be:

- RSS Ticker
  Use this extension to advertise special offers and broadcast news via
  a ticker-style toolbar. Toolbar ID is #RSS-Ticker

- Adblock Plus
  Block unwanted ads from popping up, and permit ads for your company or
  affiliates. This can also prevent viruses from bad sites linked by popups.

- Menu Editor
  Required to modify the menubar options in Firefox. Can also disable/modify
  right-click and context-sensitive menus.

- Public Fox
  Disable editing of most Firefox features and block out websites. Accessing
  a blocked webpage requires a password, as well as changing Firefox settings.
  Also seems to disable the toolbar customization window on activate.

- FoxFilter (Not sure anymore about this)
  One of the best parental control apps for Firefox. Copies of version 6
  (The last one that was free before 7 crippled it and turned it into nagware)
  still exist, and is easy to customize. Odd behavior in Fx 7 though:
  Switching between tabs unloads the content. Requires compatibility checking
  to be disabled before using outdated, non-supported versions.

- Tab Killer
  Outdated as it is, it still works to disable tabs and turn Firefox into a
  Single Document Interface (SDI) browser.

- Status-4-Evar
  Neat addon that makes the address bar have a progress bar in a few different
  styles, taking the place of Fission, as well as re-introducing older design
  mechanics before Firefox revolutionized the way it looks and feels.

- keyconfig
  While not available through outlets other than mozillaZine, this nifty addon
  permits modification of keyboard shortcuts. Combined with scripting in either
  AutoHotkey (Windows) or xmodmap (Linux), can minimize available actions on a
  machine, whether or not a full keyboard is attached

- Personas
  Add that finishing touch. There are also Persona-related addons that cycle
  through a bunch of images, do different colors can be for different days,
  different variations can randomly rotate, etc.
*/

/* CODE BEGINS HERE */
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);

/* Hide close/min/max in fullscreen
   Older builds of Firefox kinda required this. Might not be useful today. */

#window-controls 
{
display: none !important;
}

/* Hide RSS and bookmarks button in address bar, tab close and new tab button
   Some of these were required for older builds of Firefox. Today, the RSS button
   can be removed, as it isn't a prominent part of the address bar anymore. */

#feed-button,
#star-button,
.tab-close-button,
.tabs-newtab-button,
.tabs-alltabs-button
{
display: none !important;
}

/* Keep elements in fullscreen
   Use FF Fullscreen, as that is compatible with Firefox 7 and has good options.
   Don't confuse disabled code and comments! Use DOM Inspector to find IDs for
   toolbars not already specified here. If you intend to use the menubar, then
   move all buttons into the menubar, comment out #nav-bar, then enable
   #toolbar-menubar, omitting the comma that comes before it. */

#nav-bar /* Address bar, search, back, forward etc. */
/*,#toolbar-menubar*/ /* Menubar, where all the menu items (File, Edit, View etc.) are located */
/*,#PersonalToolbar*/ /* Bookmarks toolbar */
/*,toolbar[id^="__customToolbar"]*/ /* Custom toolbars made within Firefox's "Customize" window. */
/*,#addon-bar*/ /* Firefox 7's new (and improved?) addon bar, that replaces #status-bar. */
{
visibility: visible !important;
}

/* Remove ability to manage and add to the search engine list
   Install Omnibar for a merged address and search bar. Perfect for
   research institutions, companies with a product search DB, or
   educational facilities. */

#search-container .searchbar-engine-menuitem+menuseparator,
#search-container .open-engine-manager,
#search-container .addengine-separator, 
#search-container menuitem.addengine-item+menuseparator:not([class]),
#search-container menuitem.searchbar-engine-menuitem+menuseparator:not([class]),
#search-container menuitem.addengine-item,
#search-container .open-engine-manager,
/* Omnibar entries */
#omnibar-context-popup,
#omnibar-context-menuitem-manageengines,
#omnibar-engine-menu menuseparator,
#omnibar-context-menuitem-suggestenabled,
#omnibar-engine-menu menuitem.addengine-item

/* Note:
   The code below disables the search icon, which bars users from selecting
   a search engine. Disabled by default, but you can enable it on your own. */

/*.searchbar-engine-button
{
display: none !important;
}*/

/* Note:
   The button may had added some extra height to the search bar. In the past.
   this was a clear issue, but it may not be today. Kept for legacy purposes. */

/*.searchbar-textbox
{
padding-left: 4px !important;
}*/

/* Hide security verification address on address bar
   Add address bar space by not adding text to the left side, where the security
   verification is. Clicking on the favicon still displays relevant security
   information, so this removes redundancy and simplifies the interface.*/

#identity-icon-label
/*,#identity-icon-country-label*/ /* Country code. Enable to hide it. */
{
display: none !important;
}

/* CODE ENDS HERE */

/* Blah blah blah, thanks for using the style.

   All you, the reader of this message have to do is tweak it a little and apply it.
   I hope you enjoy this work, and that it gives you a sigh of relief, a paycheck,
   appreciation (from your superiors), and those you care about most. Enjoy.
*/