Permalink
Browse files

Set the button grey when clicking it for visual feedback.

  • Loading branch information...
1 parent 35bbf6c commit e89ef4e6f0343ce9e0fbddfb788c68c841b5278a Sören committed Jun 16, 2012
Showing with 22 additions and 2 deletions.
  1. +1 −0 README.rst
  2. +2 −1 manifest.json
  3. +14 −0 read_button.css
  4. +5 −1 read_button.js
View
@@ -7,6 +7,7 @@ Blocks the "seen" feature of the facebook messenger.
Sick of the new "seen" feature of facebook? Block the read receipts with this
extensions and your friends will no longer be able to see if you read their
messages. You will still be able to see if they read your messages.
+Additionally you get a button to mark messages explicit as read.
Attention: If you are loading the "full conversation" page (Messages » Name of
your friend), it will get marked as "read" and your friend will see it!
View
@@ -9,7 +9,8 @@
"content_scripts": [
{
"matches": ["*://*.facebook.com/*"],
- "js": ["jquery.js", "read_button.js"]
+ "js": ["jquery.js", "read_button.js"],
+ "css": ["read_button.css"]
}
],
"permissions": [
View
@@ -0,0 +1,14 @@
+.mark_as_read {
+ margin: 2px;
+ cursor: pointer;
+}
+
+.mark_as_read:hover {
+ text-decoration: underline;
+}
+
+.mark_as_read.inactive {
+ background-color: #989898;
+ cursor: default;
+ text-decoration: none;
+}
View
@@ -1,15 +1,19 @@
function add_read_buttons() {
$('.fbMercuryChatTab').each(function(i) {
if ($(this).find('.mark_as_read').length == 0) {
- $(this).find('.typingIndicator').after('<a><div class="mark_as_read inputbutton">Mark as read</div></a>')
+ $(this).find('.typingIndicator').after('<div class="mark_as_read inputbutton">Mark as read</div>')
var thread_url = $(this).find('a.itemAnchor[href*="facebook.com/messages/"]').attr('href')
$(this).find('.mark_as_read').click(function() {
+ $(this).addClass('inactive')
$.ajax({
type: 'GET',
url: thread_url
})
})
}
+ else {
+ $(this).find('.mark_as_read').removeClass('inactive')
+ }
})
}

0 comments on commit e89ef4e

Please sign in to comment.