Added jquery $ and better format for events
This commit is contained in:
parent
dbab516ae3
commit
91da22e827
2 changed files with 8 additions and 20 deletions
|
@ -3,24 +3,16 @@ function change_chat_tabs() {
|
|||
inject_image('._d97', 'emoticon');
|
||||
}
|
||||
|
||||
|
||||
jq('.fbNubFlyout').on('DOMNodeInserted DOMNodeRemoved change load', function() { // Something changes inside the chat tab
|
||||
change_chat_tabs();
|
||||
$('.fbNubFlyout').on('DOMNodeInserted DOMNodeRemoved change load', change_chat_tabs);
|
||||
});
|
||||
|
||||
|
||||
jq('._d97').on('change load', function(){ // Chat Bubble messages
|
||||
change_chat_tabs();
|
||||
$('._d97').on('change load', change_chat_tabs);
|
||||
});
|
||||
|
||||
|
||||
jq('.fbNub').on('click', function() { // Facebook tab button is clicked
|
||||
change_chat_tabs();
|
||||
$('.fbNub').on('click', change_chat_tabs);
|
||||
});
|
||||
|
||||
|
||||
jq('._55ln').on('click', function() { //Facebook sidebar person is clicked
|
||||
change_chat_tabs();
|
||||
$('._55ln').on('click', change_chat_tabs);
|
||||
})
|
||||
|
||||
change_chat_tabs();
|
|
@ -5,19 +5,15 @@ function change_comments() {
|
|||
|
||||
function change_readme() {
|
||||
console.log("readme event");
|
||||
inject_image('.comment-body');
|
||||
inject_image('#readme');
|
||||
}
|
||||
|
||||
$("button.btn[name='comment_and_close']").prev().on('click', change_comments);
|
||||
|
||||
|
||||
jq("button.btn[name='comment_and_close']").prev().on('click', function(){ // When the comment button is clicked
|
||||
change_comments();
|
||||
$('.js-comment-container').on('load change', change_comments);
|
||||
});
|
||||
|
||||
|
||||
jq('.js-comment-container').on('load change', function(){ // when another comment comes in
|
||||
change_comments();
|
||||
});
|
||||
$('#readme').on('load change', change_readme);
|
||||
|
||||
|
||||
change_comments();
|
||||
|
|
Reference in a new issue