Hello

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

) 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!

) 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.

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
=

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) (
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)