Quote
JohnHell
Mozillazine is not up to date nowadays, even being a wiki.
I don't know you, but when I search for an explanation for new features I end very often in the developer pages of Mozilla :/
About updates and predefined lists :-? I don't think K-meleon auto-updates it or it has a predefined one. At least in a fresh profile it only has the permission addons.mozilla.org with install type permissions and probably was added by Dorian.
I don't think it is hardcoded in K-meleon aside the above, but I may be wrong, of course. Only Dorian must know.
You are right. I meanwhile installed the Addon and went to chrome://sqlitemanager/content/sqlitemanager.xul I was out off date again.
BTW. I wonder whether Yogy has tried to set permission for facebook & co to Zero (or was it 2 for block?) and controlled with HTTPLiveheaders or HTTPFox whether that blocks contact?
Mozillazine is out of date again too.
Yes I also often end up on dev pages or bug number pages.
No, I think the list is updated when the browser is. That how it reads to me.
The list is always somewhere in the GRE unless there is an option to turn it off during build.
Turning off would show in about:buildconfig unless Dorian edited something manually or patched the GRE.
While I looked for sqlitemanager I also searched for other Addons with a string "block facebook".
There are several and I looked into the codes of one that blocks the beacon and the like button. I have not inspected more yet.
fbbeaconblocker@codeismightier.com.xpi. It works with a regular expession. It would be interesting to find out whether this approach could work for K-Meleon and could be extended to the other pages Yogy does not want.
I wonder whether the regular expression is compatible with BlUHell Firewaqll's.
That add blocker has regualar espressions in a comma separated list. If all is compatible we could use that code combination.
The core of the beacon blocker consist of two java scripts, one of which is not refenced anywhere, and a XUL file.
fbbeaconblocker.js is hoocked to each page with a simple browser_overlay.xul:
<?xml version="1.0" encoding="UTF-8"?>
<overlay id="fbbeaconblocker-overlay"
xmlns="
http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/x-javascript"
src="chrome://fbbeaconblocker/content/fbbeaconblocker.js"/>
</overlay>
fbbeaconblocker.js begin code:
// Code for blocking based on BlockSite
// Observer for HTTP - block all requests to .*\\.facebook.com/beacon/.*
// and
http://www.facebook.com/sharer.php
var FbBeaconBlockerObserver =
{
observe: function(aSubject, aTopic, aData)
{
if(aTopic != 'http-on-modify-request')
{
return;
}
aSubject.QueryInterface(Components.interfaces.nsIHttpChannel);
var urlRegExp = new RegExp("http(?:|s)://(.*\\.)?facebook\\.com/(beacon/.*|sharer.*)");
var match = urlRegExp.exec(aSubject.URI.spec);
if(match != null)
{
aSubject.loadFlags = Components.interfaces.nsICachingChannel.LOAD_ONLY_FROM_CACHE;
aSubject.cancel(Components.results.NS_ERROR_FAILURE);
}
},
QueryInterface: function(iid)
{
if (!iid.equals(Components.interfaces.nsISupports) &&
!iid.equals(Components.interfaces.nsIObserver))
{
throw Components.results.NS_ERROR_NO_INTERFACE;
}
return this;
}
};
// Add our observer
var observerService = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);
observerService.addObserver(FbBeaconBlockerObserver, "http-on-modify-request", false);
// Remove observer when current window closes
window.addEventListener("unload", function()
{
observerService.removeObserver(FbBeaconBlockerObserver, "http-on-modify-request");
}, false);
Edited 1 time(s). Last edit at 10/17/2014 03:48PM by guenter.