Skip to content
This repository has been archived by the owner on Mar 1, 2018. It is now read-only.

Commit

Permalink
Version 2.0.5 Fixed a bug when toggling CSS
Browse files Browse the repository at this point in the history
//Version 2.0.5 Fixed a bug when toggling CSS

Fixed timing issue with button not showing appropriate color, also fixed
an issue when the stylesheet not selecting when multiples existed.

#18
  • Loading branch information
ThatOneGuyDotNet committed Nov 3, 2014
1 parent 6332916 commit 7b1c9fa
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 4 deletions.
1 change: 1 addition & 0 deletions ReadMe.txt
Expand Up @@ -5,6 +5,7 @@
//from the Add-on bar and/or Toolbar.
//
//Version History
//Version 2.0.5 Fixed a bug when toggling CSS
//Version 2.0.4 Fixed a bug when using the dropdown of the QJ Favorites to toggle settings
//Version 2.0.3 Fixed a bug causing issues with other addons.
//Version 2.0.2 Major update! Favorite toolbar button added (auto-install for new users or 1.8.0 and below). Middle click only toggles visible status bar values. Customizable startup options. Update icons after customization.
Expand Down
25 changes: 23 additions & 2 deletions content/browserOverlay.js
Expand Up @@ -121,7 +121,7 @@ versionCheck: function(addon)
}
},

installButton: function(toolbarId, id, afterId)
installButton: function(toolbarId, id, afterId)
{
if (!document.getElementById(id)) {
var toolbar = document.getElementById(toolbarId);
Expand Down Expand Up @@ -340,6 +340,14 @@ GetTypeFromId: function(id)
updateIcons: function()
{
//this.consoleLog('updateIcons');
//do as setTimeout so any other processes can finish first
setTimeout('thatoneguydotnet.QuickJava.updateIconsNow();',10);
this.updateIconsNow();
},

updateIconsNow: function()
{
//this.consoleLog('updateIconsNow');
if(!this.massToggle)
{
//Set the icons
Expand Down Expand Up @@ -520,6 +528,8 @@ checkForReload: function(whichIcon)
{
return this.prefs.getBoolPref(this.qj_Prefix_Pref_Reload + whichIcon);
},


setStyleDisabledExtended: function(turnOff)
{
if (turnOff)
Expand All @@ -537,7 +547,18 @@ setStyleDisabledExtended: function(turnOff)
{
if ("gPageStyleMenu" in window)
{
gPageStyleMenu.switchStyleSheet('');
var setSheet = '';
var firstSheet = '';
var curSheetAry = gPageStyleMenu.getAllStyleSheets();
for (curSheetIdx in curSheetAry) {
//this.consoleLog('gPageStyleMenu *' + curSheetAry[curSheetIdx].title + '*');
setSheet = curSheetAry[curSheetIdx].title;
if (curSheetAry[curSheetIdx].title == 'screen') { break; }
if (firstSheet == '') { firstSheet = setSheet; }
}
//if we didn't find one named 'screen' then use the first one we found
if (setSheet != 'screen') { setScreen = firstSheet; }
gPageStyleMenu.switchStyleSheet(setSheet);
}
else
{
Expand Down
4 changes: 2 additions & 2 deletions install.rdf
Expand Up @@ -5,7 +5,7 @@ xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<Description about="urn:mozilla:install-manifest">
<em:id>{E6C1199F-E687-42da-8C24-E7770CC3AE66}</em:id>
<em:name>QuickJava</em:name>
<em:version>2.0.4</em:version>
<em:version>2.0.5</em:version>
<em:description>Enable/Disable Javascript, Java, Flash, Silverlight, Animated Images, Cookies, Images, CSS, and Proxy from Toolbar.</em:description>
<em:creator>Doug Greene</em:creator>
<em:homepageURL>http://quickjavaplugin.blogspot.com/</em:homepageURL>
Expand All @@ -16,7 +16,7 @@ xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
<em:minVersion>20.0</em:minVersion>
<em:maxVersion>29.*</em:maxVersion>
<em:maxVersion>36.*</em:maxVersion>
</Description>
</em:targetApplication>
<em:translator>strel</em:translator> <!-- es -->
Expand Down

0 comments on commit 7b1c9fa

Please sign in to comment.