Detect script inside Google Toolbar for enable or disable

Ask for help about NoScript, no registration needed to post
Fred

Detect script inside Google Toolbar for enable or disable

Post by Fred »

Hello, (I'm french ; sorry for my english)

Inside the Google Toolbar ((Version 5.0.20090324W or all versions)) you can find a button "Search news articles" = News previews = The icon with a newspaper.

The equivalent (french) of hidden links (button) to display in a web page is: http://navclient.gmodules.com/ig/ifr?synd=navclient-ff&oe=utf8&up_ned=fr&up_items=6&up_show_image=1&up_font_size=12pt&up_queryList=&url=http%3A%2F%2Fwww.google.com%2Fig%2Fmodules%2Ftabnews.xml&lang=fr&country=FR (Copy and paste the link because it does not work here with Redirect Remover :: Add-ons for Firefox if you have this great add-on but development of RDR = stopped :shock:.)

JavaScript to allow for the button that displays pages prewiews = [url]htttp://navclient.gmodules.com[/url] and http://www.gstatic.com (Both = Before (under 6 months) only [url]htttp://navclient.gmodules.com[/url] been sufficient.)

I would like NoScript is able to detect the scripts in the toolbar to be able to apply rules of blocking or not, without having to find a trick to find out which script is used = it is very difficult = I used IE7Pro - The Ultimate Add-On for Internet Explorer in Internet Explorer 7 (IE8 is still not completely compatible) to find the script used :ugeek:. Otherwise, the only way it work is without any protection ... which is of course unacceptable (even if the scripts whose links are blocked = blocked). Would it be possible to allow the script to a button and not all web pages that use these scripts because it is a little too open for my taste.

Thank you very much.
Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.1.1) Gecko/20090715 Firefox/3.5.1 GTB5 (.NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
User avatar
therube
Ambassador
Posts: 7969
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: Detect script inside Google Toolbar for enable or disable

Post by therube »

Not sure I'm totally following (& I don't use Google Toolbar), but when loading your link, there are only two domain choices to Allow & so in that respect it was easy to get the page to work properly.

At times, trying to figure out what needs to be Allowed can be a crapshoot, but there is no real way around it (knowing what to Allow.)
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.22) Gecko/20090605 SeaMonkey/1.1.17
Fred

Re: Detect script inside Google Toolbar for enable or disable

Post by Fred »

Hello,

The link to see the two choices to allow domain does not exist ! I was challenged to find by searching on the web (After finding the solution = links scripts). The button on the toolbar has a small arrow to display a "*"pop-pup"*" of what you see with the link i find.

Does NoScript could indicate the scripts detected ? BUT NoScript it must retains what he sees (The time to apply a rule), because if i close the "pop-pup" NoScript sees nothing. It's too complicated scripts detected in any toolbars and retains what he sees (The time to apply a rule) ?

Thank you :arrow: for new features :roll: = "Detect scripts in any toolbars (or other) for enable or disable scripts".
Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 GTB5 (.NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
User avatar
Giorgio Maone
Site Admin
Posts: 9524
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Detect script inside Google Toolbar for enable or disable

Post by Giorgio Maone »

How does the following sound?

A "Recently blocked sites" menu item showing "Allow..." menu items from the last 10 web origins which got blocked by NoScript, no matter if the load attempt happened in a web page, in the sidebar or elsewhere.

This should help for those extensions which load content outside the regular browser content area, which is the one "normal" NoScript menu items refer to.
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 (.NET CLR 3.5.30729)
Alan Baxter
Ambassador
Posts: 1586
Joined: Fri Mar 20, 2009 4:47 am
Location: Colorado, USA

Re: Detect script inside Google Toolbar for enable or disable

Post by Alan Baxter »

I like it. It could be useful for some users of Google and Conduit toolbars. It reminds me of the old CookieSafe "Recent Hosts" list of the last ten sites that had either placed a cookie or been blocked. (I use Cookie Monster now because it's sufficient and is actively supported.)

Have more than two users asked for help with this problem? I think having it appear in the NoScript menu by default would make the menu more confusing for most new users. Control its display from the Appearances panel, with the default being off. A FAQ item will need to be added explaining the purpose of the "Recently blocked sites" selection. It should explicitly refer to the Google and Conduit-implemented toolbars. That way we can direct users to the FAQ when they ask why their toolbar dropdown doesn't work.

Aside from more work for Giorgio, the downside is that I'll be compulsively checking "Recently blocked sites" for a while. :)
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2
Grumpy Old Lady
Senior Member
Posts: 240
Joined: Fri Jul 03, 2009 7:20 am

Re: Detect script inside Google Toolbar for enable or disable

Post by Grumpy Old Lady »

Giorgio Maone wrote: items from the last 10 web origins which got blocked by NoScript,


:sob: Oh noes, just when I thought I had all the menu items finally embedded in my Oldtimers memory.
Seriously, good solution Prof. Up go your G stocks :-)
Mozilla/5.0 (X11; U; Linux i686; en-AU; rv:1.9.0.13) Gecko/2009080315 Ubuntu/9.04 (jaunty) Firefox/3.0.13
User avatar
Giorgio Maone
Site Admin
Posts: 9524
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Detect script inside Google Toolbar for enable or disable

Post by Giorgio Maone »

Done in latest development build 1.9.8.5 :)
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 (.NET CLR 3.5.30729)
Fred

Re: Detect script inside Google Toolbar for enable or disable

Post by Fred »

Hello :D ! (Sorry for my English, i'm french.)

"Detect scripts in any toolbars (or other) for enable or disable scripts"

Thank you very much for this new submenu "Recently blocked sites"! Good job!

Problem of privacy (It is the same problem with CS Lite :: Add-ons for Firefox and the last ten sites visited): when i delete the history of Mozilla Firefox 3.5.2 - Windows XP (with: AskForSanitize :: Add-ons for Firefox Version 1.8, (or with the standard new (hidden? bad? kikoolol?) menu of Firefox version 3.5.2 (3.5.*))), the "Recently blocked sites" visited are displayed (or remains displayed in good english?) in the submenu of the "Recently blocked sites" of NoScript 1.9.8.5. This can cause problems in a couple (personally, i'm single).

Improvement / Suggestion (Same subject!!)
▼ ▼ ▼ ▼
+ Please add a system for erasing data. Activated with the menu to delete the history of Mozilla Firefox and a new item in the submenu of the "Recently blocked sites" in NoScript. With a separator at the bottom of the sub-menu of the "Recently blocked sites" from which there would be a new item = "Erase recent data blocked sites". Plus the addition of an automatic deletion system that does not impede the use ? Total = 3 systems.
+ Please add the possibility to cancel the authorization in the submenu of the "Recently blocked sites" in NoScript (Dynamic additional item for each site "all allowed for..." or "all temporarily allowed for..." = "Cancel authorization for...") to avoid having to look in the options what sites are blocked in error or for testing. !!The sites "Allowed for all..." or "all temporarily allowed for..." must not disappear from the list in the submenu of the "Recently blocked sites" if we want to cancel permits.
+ Please add a new submenu "Recently approved sites". If we want to 'block a script' which is not on the page (and unblock) we need a menu "Recently approved sites".
+ Please add a function to allow us to choose how many links of scripts you want to have in history of the submenu "Recently blocked sites" and for the new submenu "Recently approved sites" (10 by default). (Although ten scripts should suffice).

v 1.9.8.5
=====================================================================
+ New "Recently blocked sites" menu to allow active content origins
which have been recently blocked but are unrelated with current
page (e.g. loaded in custom frames provided by extensions)

x Fixed some glitch in temporary permissions handling (thanks
computerfreaker for reporting)
x Simplified bookmarklet permissions granting
x Simplified ABERequest lifecycle management
x Prevented potential memory leak

Thank you ;) and thank you :arrow: :idea: ▲ ▲ ▲ ▲ (Improvement / Suggestion (Same subject!!))
Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 GTB5 (.NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
User avatar
Giorgio Maone
Site Admin
Posts: 9524
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Detect script inside Google Toolbar for enable or disable

Post by Giorgio Maone »

Fred wrote: + Please add a system for erasing data. Activated with the menu to delete the history of Mozilla Firefox and a new item in the submenu of the "Recently blocked sites" in NoScript. With a separator at the bottom of the sub-menu of the "Recently blocked sites" from which there would be a new item = "Erase recent data blocked sites". Plus the addition of an automatic deletion system that does not impede the use ? Total = 3 systems.
I'm gonna add a "Reset" command at the bottom (or the top?) of the list. I'll also probably erase the list whenever user switches from/to Private Browsing.
Fred wrote: + Please add the possibility to cancel the authorization in the submenu of the "Recently blocked sites" in NoScript (Dynamic additional item for each site "all allowed for..." or "all temporarily allowed for..." = "Cancel authorization for...") to avoid having to look in the options what sites are blocked in error or for testing. !!The sites "Allowed for all..." or "all temporarily allowed for..." must not disappear from the list in the submenu of the "Recently blocked sites" if we want to cancel permits.
+ Please add a new submenu "Recently approved sites". If we want to 'block a script' which is not on the page (and unblock) we need a menu "Recently approved sites".
They're more or less the same thing, but I won't add those right away.
The usage of the "recently blocked" feature should be quite rare (after all, NoScript users survived 4 years without it).
If you allow something from it (and I suggest to do so tempoarily, if you're not sure), that's likely a rare event and making reverting your choice slightly more convenient doesn't justify the extra clutter (and development time) IMHO.
Fred wrote: + Please add a function to allow us to choose how many links of scripts you want to have in history of the submenu "Recently blocked sites" and for the new submenu "Recently approved sites" (10 by default). (Although ten scripts should suffice).
The noscript.recentlyBlockedCount about:config preference controls exactly this.
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 (.NET CLR 3.5.30729)
User avatar
Giorgio Maone
Site Admin
Posts: 9524
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Detect script inside Google Toolbar for enable or disable

Post by Giorgio Maone »

Reset for recent items and "Private Browsing"-related features implemented in latest development build 1.9.8.6 :)
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 (.NET CLR 3.5.30729)
Fred

Re: Detect script inside Google Toolbar for enable or disable

Post by Fred »

Hello :D to all and a big thank you for the actual improvements! (Sorry for my english, i'm french),

O...K / Improvements / Suggestions :

I)/3

For privacy reasons (NoScript - v1.9.8.6 - changelog - InformAction) "Recently blocked sites" are MUST (because suggestion of new improvements :mrgreen:) erased everytime user purges history WITH :

Close'n forget :: Add-ons for Firefox (v0.8.2)
closeForget.dtd =
<!ENTITY option.history "Remove current site (whole internet domain) from browser's history">
<!ENTITY option.tabHistory "Remove all pages viewed in the closed tab from the browser's history">
closeforgetcodeOverlay.js =

Code: Select all

/***************************************************************************
Name: close'n forget
Version: 0.7
Description: Close tab and forget about the visit
Author: Benoit Bailleux
Homepage: http://addons.mozilla.org
Email:  skrypz42@yahoo.fr

Copyright (C) 2008 Benoit Bailleux
With large portions of code inspired by the following Firefox add-ons :
  - Close Button, by "Isaac"
    See https://addons.mozilla.org/en-US/firefox/addon/1950
  - Remove Cookie(s) for Site, by "Dwipal"
   See https://addons.mozilla.org/en-US/firefox/addon/1595
A lot of thanks to them !

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to:

Free Software Foundation, Inc.
51 Franklin Street
Fifth Floor
Boston, MA  02110-1301
USA
***************************************************************************/
var cf_prefManager = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
var cf_closeForgetCode = {

  targetedTab: null,

  log: function(txt) {
    Components.utils.reportError("[CF] "+txt);
  },
  
  objectToString: function(obj) {
    r = "[";
    for (objprop in obj) {
      r+=('[' + objprop + ' => ' + obj[objprop] + ']\n');
    }
    return r + "]";
  },

  endsWith : function (string, text) {
    var pos = string.indexOf(text);
    if (pos != -1 && string.length - pos == text.length) {
      return true;
    } else {
      return false;
    }
  },

  beginsWith : function (string, text) {
    var pos = string.indexOf(text);
    if (pos == 0) {
      return true;
    } else {
      return false;
    }
  },

  // Main stuff
  removeThisSiteFromHistory : function (current_url) {
    // Removes also the current page from the browser history , if option is active:
    var browserHistory = Components.classes["@mozilla.org/browser/global-history;2"].getService(Components.interfaces.nsIBrowserHistory);
    var ioService = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);
    var uri = ioService.newURI(current_url, null, null);
    browserHistory.removePagesFromHost(uri.host, false);
  },
  
  cleanThisSiteCookies : function (current_url) {
    var delCookies = cf_prefManager.getBoolPref("extensions.closeforget.cookie");
    var delCookiesSubDomain = cf_prefManager.getBoolPref("extensions.closeforget.cookieSubDomain");

    if (delCookies) {
      // Extract domain name from URL :
      if (cf_closeForgetCode.beginsWith(current_url, "HTTP://")) {
        if(!cf_closeForgetCode.beginsWith(current_url, "HTTP://WWW.")) {
          var s=current_url;
          current_url = s.substring(0, 7) + "." + s.substring(7);
        }
      } else if (cf_closeForgetCode.beginsWith(current_url, "HTTPS://")) {
        if(!cf_closeForgetCode.beginsWith(current_url, "HTTPS://WWW.")) {
          var s=current_url;
          current_url = s.substring(0, 8) + "." + s.substring(8);
        }
      }

      var cookieManager = Components.classes["@mozilla.org/cookiemanager;1"].getService(Components.interfaces.nsICookieManager);
      var iter = cookieManager.enumerator;
      var cookie_count = 0;
      if (delCookiesSubDomain) {
        // Extract TLD and domain :
        var domain = current_url.replace(/^HTTPS?:\/\/.*\.([^\.|:|\/]*\.[^\.|:|\/]*).*/, "$1");
        // Removes all cookies for site, domain and sub domains !
        // Example :
        // For a page like http://www.sample.com/foo/bar.html
        // Will suppress all cookies from :
        //    www.sample.com, .sample.com, pub.sample.com, media.sample.com and so on !
        while (iter.hasMoreElements()) {
          var cookie = iter.getNext();
          if (cookie instanceof Components.interfaces.nsICookie) {
            if (cookie.host.toUpperCase().indexOf(domain) != -1) {
                cookieManager.remove(cookie.host, cookie.name, cookie.path, cookie.blocked);
                cookie_count++;
            }
          }
        }
      } else {
        // Removes all cookies for site, domain BUT NOT from sub domains !
        // Example :
        // For a page like http://www.sample.com/foo/bar.html
        // Will suppress all cookies from :
        //    www.sample.com, .sample.com
        // But will preserve cookies from 
        //    pub.sample.com, media.sample.com and so on !
        while (iter.hasMoreElements()) {
          var cookie = iter.getNext();
          if (cookie instanceof Components.interfaces.nsICookie) {
            if (current_url.indexOf(cookie.host.toUpperCase()) != -1) {
                cookieManager.remove(cookie.host, cookie.name, cookie.path, cookie.blocked);
                cookie_count++;
            }
          }
        }
      }
      // Displays during 3 seconds the # of cookies deleted
      cf_closeForgetCode.setStatusMessage(cookie_count + " cookie(s) removed", 1000*3);
    } else {
      // Displays during 3 seconds that nothing has been done
      cf_closeForgetCode.setStatusMessage("No cookie to remove !", 1000*3);
    }
  },

  setStatusMessage : function (msg, timeToClear) {
    statusBar = document.getElementById("statusbar-display");
    if (!statusBar) return;

    var oldmsg = statusBar.label;
    statusBar.label = msg;
    if(timeToClear) setTimeout(cf_closeForgetCode.setStatusMessage, timeToClear, oldmsg, 0);
  },

  /* Do the main job.
   * @param orig : 0 = tab context menu, 1 = page context menu, 2 = toolbar button
   */
  closebuttonDoIt : function (orig) {
    var delAlsoFromHist = cf_prefManager.getBoolPref("extensions.closeforget.command");
    var delAlsoFromTabHist = cf_prefManager.getBoolPref("extensions.closeforget.clearTabHistory");
    // gets the current tab & URL
    var tab = null;
    if (orig == 0 && document.popupNode != null) {
      tab = (document.popupNode.localName == "tabs") ? gBrowser.mCurrentTab : gBrowser.mContextTab;
    } else {
      tab = gBrowser.selectedTab;
    }
    
    var current_url = tab.linkedBrowser.currentURI.spec;
    if(current_url) {
      current_url = current_url.toUpperCase();
        
      cf_closeForgetCode.cleanThisSiteCookies(current_url);
      // Removes also the current page from the browser history , if option is active:
      if (delAlsoFromHist) {
        cf_closeForgetCode.removeThisSiteFromHistory(current_url);
      }
    }
    
    // We don't want to leave something in the Undo Close Tab list :
    var browser = gBrowser.getBrowserForTab(tab);
    // removes the browse history of the curent tab before closing it
    if (delAlsoFromTabHist) {
      var browserHistory = Components.classes["@mozilla.org/browser/global-history;2"].getService(Components.interfaces.nsIBrowserHistory);
      with (browser.sessionHistory) {
        // As this loop may be long, change the cursor to show that something is in progress :
        window.setCursor('wait');
        // Remove entries from the tab's history
        for (n = count - 1; n >= 0; n--) {
          browserHistory.removePage(getEntryAtIndex(n, false).URI);
        }
        window.setCursor('auto');
      }
    }
    // Thanks to "zeniko" for the trick AND all the advices
    //  ---> Blank documents are NOT elligible to "undo close tab"
    // load a blank document and clear its history
    browser.addEventListener("DOMContentLoaded", function(ev) {
        with (browser.webNavigation.sessionHistory) PurgeHistory(count);
        // Removes the eventListener :
        browser.removeEventListener("DOMContentLoaded", arguments.callee, true);
        try { // Not sure if this is usefull (to be used with TabMixPlus)
          lastWillClose = cf_prefManager.getBoolPref("browser.tabs.closeWindowWithLastTab");
        } catch (e) {
          lastWillClose = false;
        }
        if (gBrowser.tabContainer.itemCount == 1 && lastWillClose) {
          gBrowser.addTab("about:blank");
        }
        gBrowser.removeTab(tab);
      }, true);
    browser.contentDocument.location = "about:blank";
  },
  
  // Options dialog box :
  // Functions to check options consistency when validating.
  // Displays a message if the chosen options imply that nothing will be done :
  option_checkCookie : function(msg) {
    if (!document.getElementById('cook_disable').checked
         && !document.getElementById('hist_domain').checked
         && !document.getElementById('hist_tab').checked)
      alert(msg);
  },
  
  // Options dialog box :
  // Enable or disable the sub option (extension to sub-domains) for controlling cookie deletion
  option_checkSubDomain : function() {
    if (document.getElementById('cook_disable').checked) {
      document.getElementById('cook_subdomain').disabled=false;
    } else {
      document.getElementById('cook_subdomain').disabled=true;
    }
  },

// Adds an event to control if the context menu should be "enriched"
  cf_initOverlay : function() {
    // Managing the context menus :
    var menu = document.getElementById("contentAreaContextMenu");
    if (menu)
      menu.addEventListener("popupshowing", cf_closeForgetCode.cf_contextPopupShowing, false);
    // Getting the tab context menu :
    var TMenu = gBrowser.mStrip.childNodes[1];
    if (TMenu) {
      var tabCtxButton = document.createElement("menuitem");
      var CtxBtnLabel = document.getElementById("cf_contextButton").label;
      tabCtxButton.setAttribute("label", CtxBtnLabel);
      tabCtxButton.setAttribute("oncommand", "cf_closeForgetCode.closebuttonDoIt(0);");
      tabCtxButton.setAttribute("class", "menuitem-iconic");
      tabCtxButton.setAttribute("image", "chrome://closeforget/content/closeForgetBtn.gif");
      TMenu.appendChild(tabCtxButton);
    }
  },

  // Decide wether or not an entry should be added to the contextMenu.
  cf_contextPopupShowing : function() {
    if (cf_prefManager.getBoolPref("extensions.closeforget.ctxMenuEntry")) {
      var menuitem = document.getElementById("cf_contextButton");
      menuitem.hidden = false;
      menuitem = document.getElementById("cf-uctb-separator");
      menuitem.hidden = false;
    } else {
      var menuitem = document.getElementById("cf_contextButton");
      menuitem.hidden = true;
      menuitem = document.getElementById("cf-uctb-separator");
      menuitem.hidden = true;
    }
  }
}
window.addEventListener("load", cf_closeForgetCode.cf_initOverlay, false);
AND
Undo Closed Tabs Button :: Add-ons for Firefox (v3.5.1)
undoclosedtabsbutton.js =

Code: Select all

function undoClosed() {}

undoClosed.prototype = {

	observe: function(subject, topic, data)
	{
		if (topic == 'app-startup')
		{
			this.observerService = Components.classes['@mozilla.org/observer-service;1'].getService(Components.interfaces.nsIObserverService);
			this.observerService.addObserver(this, 'profile-after-change', false);
			this.observerService.addObserver(this, 'xpcom-shutdown', false);
		}
		else if (topic == 'profile-after-change')
		{
			var ioService = Components.classes['@mozilla.org/network/io-service;1'].getService(Components.interfaces.nsIIOService);
			var styleSheetService = Components.classes['@mozilla.org/content/style-sheet-service;1'].getService(Components.interfaces.nsIStyleSheetService);
			var prefBranch = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefService).getBranch('extensions.undoclosedtabsbutton.');
			var prefs = prefBranch.getChildList('', {});
			for (var i = 0; i < prefs.length; i++)
			{
				if (prefBranch.getBoolPref(prefs[i]) && prefs[i].indexOf('.') == -1)
				{
					try
					{
						var sheet = ioService.newURI('chrome://undoclosedtabsbutton/skin/' + prefs[i] + '.css', null, null);
						styleSheetService.loadAndRegisterSheet(sheet, styleSheetService.AGENT_SHEET);
					}
					catch (ex)
					{
						prefBranch.clearUserPref(prefs[i]);
					}
				}
			}
		}
		else if (topic == 'xpcom-shutdown')
		{
			this.observerService.removeObserver(this, 'profile-after-change');
			this.observerService.removeObserver(this, 'xpcom-shutdown');
			this.observerService = null;
		}
	},
	
	QueryInterface: function(iid)
	{
		if (iid.equals(Components.interfaces.nsIObserver) || iid.equals(Components.interfaces.nsISupports))
		{
			return this;
		}
		else
		{
			throw Components.results.NS_ERROR_NO_INTERFACE;
		}
	}
}

var undoClosedModuleFactory = {

	NAME: 'undoclosedtabsbutton@supernova00.biz',
	
	CID: Components.ID('{9e7f8f70-2792-11db-a98b-0800200c9a66}'),
	
	CONTRACT_ID: '@supernova00.biz/undoclosedtabsbutton;1',
	
	IMPLEMENTATION: undoClosed,
	
	registerSelf: function(compMgr, fileSpec, location, type)
	{
		compMgr = compMgr.QueryInterface(Components.interfaces.nsIComponentRegistrar);
		compMgr.registerFactoryLocation(this.CID, this.NAME, this.CONTRACT_ID, fileSpec, location, type);
		
		var categoryManager = Components.classes['@mozilla.org/categorymanager;1'].getService(Components.interfaces.nsICategoryManager);
		categoryManager.addCategoryEntry('app-startup', this.NAME, 'service,' + this.CONTRACT_ID, true, true);
	},
	
	unregisterSelf: function(compMgr, fileSpec, location)
	{
		compMgr = compMgr.QueryInterface(Components.interfaces.nsIComponentRegistrar);
		compMgr.unregisterFactoryLocation(this.CID, fileSpec);
		
		var categoryManager = Components.classes['@mozilla.org/categorymanager;1'].getService(Components.interfaces.nsICategoryManager);
		categoryManager.deleteCategoryEntry('app-startup', this.NAME, true);
	},
	
	getClassObject: function(compMgr, cid, iid)
	{
		if (!iid.equals(Components.interfaces.nsIFactory))
		{
			throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
		}
		
		if (cid.equals(this.CID))
		{
			return this;
		}
		else
		{
			throw Components.results.NS_ERROR_NO_INTERFACE;
		}
	},
	
	canUnload: function(compMgr)
	{
		return true;
	},
	
	createInstance: function(outer, iid)
	{
		if (outer)
		{
			throw Components.results.NS_ERROR_NO_AGGREGATION;
		}
		
		return (new this.IMPLEMENTATION()).QueryInterface(iid);
	}
};

function NSGetModule(compMgr, fileSpec)
{
	return undoClosedModuleFactory;
}
...

II)/3

Page Hacker :: Add-ons for Firefox (v2.0a2)

Please add a function to detect the code editing web pages. When the code is detected by NoScript: The icon (Which I DO FOR YOU! :D) with notepad appears red to indicate that editing is not permitted and the icon "normal" when editing the web page is currently permitted. Do please show a dialog script to ask the user if he wishes to allow editing of the web page being displayed and one or the other icons accordingly as the button ( example) Page Hacker is activated.

/!\ The page you want to edit need not be reloaded to the scripting must be enabled and disabled by security! I would like NoScript Allows editing the page without having to enable scripts on the page = ByPass only for editing the current page or in other tab order separately. With the ability to activate scripts on one page to view everything that we can then edit the = user's choice. :arrow: Options and items in the contextual menu NoScript are also appreciated.
NoScript :: Add-ons for Firefox
https://addons.mozilla.org/addon/722

"document.getElementById("content").webNavigation.loadURI("javascript:document.body.contentEditable='true'; void 0", 0, null, null, null)"

noscript.properties :

us-US:
Allow editing for %S (%S=http:\\*\)
Temporarily allow editing for %S (%S=http:\\*\)
Forbid editing for %S (%S=http:\\*\)

fr-FR:
Autoriser l'édition pour %S (%S=http:\\*\)
Autoriser l'édition pour %S (%S=http:\\*\) temporairement
Interdire l'édition pour %S (%S=http:\\*\)

Images (Create notepad icons with the pen for (icons or logo) NoScript) are Freeware AND OpenSource for "Copyright (C) 2004-2009and++ Giorgio Maone - http://noscript.net/" and for everyone (but "all" only if the icon NoScript is Freeware AND OpenSource).
You can see this comment in the pictures ".png" or ".xcf" with GIMP - The GNU Image Manipulation Program version 2.6.7!
++
"document.getElementById("content").webNavigation.loadURI("javascript:document.body.contentEditable='false'; void 0", 0, null, null, null)"
Direct Link Gallery: http://img25.imageshack.us/gal.php?g=yes16.png
OR
Short Link Gallery http://yfrog.com/0pyes16px
=
Image
Image
Image
Image
OR
ZIP = 4 ".png" (1=yes16.png=InsideNoScript) + 3 SOURCES ".xcf" (GIMP - The GNU Image Manipulation Program version 2.6.7!):
OFFICIEL DIRECT-LINK: AllowEditPage-xcf-gimp2-6-7(WithAdd-onNoScript).zip
OFFICIEL NO-DIRECT-LINK (with counter visit): http://www.cijoint.fr/cjlink.php?file=cj200909/cijDf9bVPJ.zip
MD5:bf10907284998d20f6d7a0e81194ab2b
SHA1:2bde3572391613c4da8a9b4774e934a20e53e6d8

...

III)/3

v 1.9.8.72 ( http://noscript.net/getit#devel )
====================================================================
x Moved the NoScript status label to the left of the status icon,
in order to avoid "jumps" when using the sticky menu (thanks nagan
and frsch for suggestions)

x Improved management of HTTPS forcing during HTTP redirections
x Fixed incompatibility with Minefield/3.7a1pre build 20090827
(thanks Itsnow for reporting)

* Organize Status Bar :: Add-ons for Firefox = !! The changes are not made automatically and this can be done only after the user information about the changes = Ask the Agreement of the user with a dialog if you please, for edit the file "menuedit.rdf" attached to the add-on "Organize Status Bar" in order to move the NoScript status label to the left of the status icon. (Only 1 icon is moved? Is what I understood.) I manually backup files "menuedit.rdf" and "menuedit.bak" for security reasons. Please make a copy of the file before modification = "menuedit.bakNoScript.bak" and / or "copy to menuedit.rdf NoScript" ; Good idea? ...Mozilla\Firefox\Profiles\XXXXXX.default !

* Security Issue with HTTPS pages (yellow padlock + slash red) ( :idea: Redirector :: Add-ons for Firefox = cause of the problem ? ) and you can see the list of my add-ons (165) with infos.

Thank you for the futur improvements ▲ ▲ !
Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 GTB5 (.NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Post Reply