1
Fork 0
This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
hipchat-emoticons-for-all/src/injections/github.js

55 lines
1.2 KiB
JavaScript
Raw Normal View History

function change_comments() {
insert_emoticons('.comment-body');
}
2015-08-24 14:57:19 +01:00
function change_readme() {
insert_emoticons('#readme');
2015-08-24 14:57:19 +01:00
}
2015-08-28 14:49:03 +01:00
function change_wiki() {
2015-08-28 15:52:12 +01:00
console.log("Changing wiki");
insert_emoticons('#wiki-body');
2015-08-28 14:49:03 +01:00
}
2015-09-22 15:59:12 +01:00
function change_commits() {
insert_emoticons('table.files a.message');
2015-09-22 16:09:24 +01:00
insert_emoticons('table.timeline-commits commit-message a.message');
2015-09-22 15:59:12 +01:00
}
$('.js-comment-container').on('load change', change_comments);
$('#readme').on('load change', change_readme);
$('form .timeline-comment textarea[placeholder="Leave a comment"]').on('change input', function() {
markdown_decoder('form .timeline-comment textarea[placeholder="Leave a comment"]');
});
$('#wiki-body').on('load change', change_wiki);
2015-09-22 15:59:12 +01:00
$('table.timeline-commits').on('load chang', change_commits);
$('a.wiki-page-link').on('click', function() {
change_comments();
change_commits();
change_readme();
change_wiki();
});
$('a.sunken-menu-item').on('click', function() {
change_comments();
change_commits();
change_readme();
change_wiki();
});
2015-09-22 15:59:12 +01:00
$(document).on('ready', function() {
2015-08-28 15:52:12 +01:00
console.log("Ready");
change_comments();
2015-09-22 15:59:12 +01:00
change_commits();
change_readme();
2015-09-22 15:30:37 +01:00
change_wiki();
});
2015-09-22 15:59:12 +01:00
2015-09-22 15:30:37 +01:00
console.log('Github');