Skip to content
This repository has been archived by the owner on Feb 21, 2021. It is now read-only.

Add group blocking #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
I've tried to add blocking for groups, however have not testet it yet.

# Unseen extension for Firefox

![Screenshot of Facebook's 'seen' status](http://i45.tinypic.com/2yv44r7.png)
Expand Down
5 changes: 3 additions & 2 deletions src/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ function httpObserve() {
httpObserve.prototype = {
registerTopic: "http-on-modify-request",
facebookReadStatusUrl: /http(s)?:\/\/(www.)?facebook.com\/ajax\/mercury\/change_read_status.php(\?(.)+)?/,
facebookGroupStatusUrl : /http(s)?:\/\/(www.)?facebook.com\/ajax\/ufi\/seen_tooltip.php(\?(.)+)?/,

observe: function(subject, topic, data) {
if (topic == this.registerTopic) {
subject.QueryInterface(Components.interfaces.nsIHttpChannel);
var url = subject.URI.spec;

if (this.facebookReadStatusUrl.test(url)) {
if (this.facebookReadStatusUrl.test(url) || this.facebookGroupStatusUrl.test(url)) {
subject.cancel(Components.results.NS_BINDING_ABORTED);
}
}
Expand All @@ -45,4 +46,4 @@ function startup(data, reason) {
function shutdown(data, reason) {
obs.unregister();
obs = null;
}
}