Skip to content
This repository was archived by the owner on Nov 16, 2021. It is now read-only.

Commit 6f0a826

Browse files
committed
Removed jQuery. Thanks to ngyikp: [Unnecessary Javascript could be done with CSS · Issue #2 · zerobase/fb_hide_like_notifs](#2)
1 parent b400490 commit 6f0a826

File tree

6 files changed

+32
-39
lines changed

6 files changed

+32
-39
lines changed

CHANGES.md

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Changes
2+
=======
3+
4+
## Version 1.9
5+
6+
Removed jQuery. Thanks to ngyikp: [Unnecessary Javascript could be done with CSS · Issue #2 · zerobase/fb_hide_like_notifs](https://github.com/zerobase/fb_hide_like_notifs/issues/2)
7+
8+
## Version 1.8
9+
10+
Fixed a critical bug. Version 1.7 didn't work.
11+
12+
## Version 1.7
13+
14+
Complete internationalization with a language independent logic.
15+
16+
## Version 1.6
17+
18+
Fix bug: "(likes your post) on Tumblr." type notifications.
19+
20+
## Version 1.5
21+
22+
Fix bug: sentence end variations (en: [:.], ja: [:。]).

README.md

-16
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,3 @@ This extension hides only "like" notifications. Other types of notifications sta
1414
## Privacy
1515

1616
This extension never collect your personal information.
17-
18-
## Version 1.8
19-
20-
Fixed a critical bug. Version 1.7 didn't work.
21-
22-
## Version 1.7
23-
24-
Complete internationalization with a language independent logic.
25-
26-
## Version 1.6
27-
28-
Fix bug: "(likes your post) on Tumblr." type notifications.
29-
30-
## Version 1.5
31-
32-
Fix bug: sentence end variations (en: [:.], ja: [:。]).

content_script.js

-15
Original file line numberDiff line numberDiff line change
@@ -1,15 +0,0 @@
1-
setInterval(hide_like_notifs, 100);
2-
3-
function hide_like_notifs() {
4-
var notifs = $('#fbNotificationsJewel li._33c');
5-
notifs.each(function(){
6-
hide_notif_if_like( $(this) );
7-
});
8-
}
9-
10-
function hide_notif_if_like(notif) {
11-
var notif_meta = $.parseJSON( notif.attr('data-gt') );
12-
if ( notif_meta['notif_type'] == 'like' ) {
13-
notif.hide();
14-
}
15-
}

content_styles.css

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
._33c[data-gt*='"notif_type":"like"'],
2+
._33c[data-gt*='"notif_type":"like_tagged"'],
3+
._33c[data-gt*='"notif_type":"page_new_likes"'],
4+
._33c[data-gt*='"notif_type":"open_graph_action_like"']
5+
{
6+
display:none !important;
7+
}

jquery.min.js

-6
This file was deleted.

manifest.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
"name": "Hide Likes on Facebook Notifications",
55
"description": "This extension hides 'like' notificatoins on the notification jewel.",
6-
"version": "1.8",
6+
"version": "1.9",
77

88
"icons": {
99
"48": "icon48.png",
@@ -13,7 +13,8 @@
1313
"content_scripts": [
1414
{
1515
"matches": ["https://www.facebook.com/*", "http://www.facebook.com/*"],
16-
"js": ["jquery.min.js", "content_script.js"]
16+
"css": ["content_styles.css"],
17+
"js": ["content_script.js"]
1718
}
1819
]
1920
}

0 commit comments

Comments
 (0)