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

19 lines
566 B
JavaScript
Raw Normal View History

function change_comments() {
inject_image('.comment-body');
}
2015-08-24 14:57:19 +01:00
function change_readme() {
inject_image('#readme');
2015-08-24 14:57:19 +01:00
}
$('#partial-new-comment-form-actions').append('<button id="#markdown-inject-btn" class="btn">Inject Emoticons</button>');
$("button.btn[name='comment_and_close']").prev().on('click', change_comments);
2015-08-24 14:57:19 +01:00
$('.js-comment-container').on('load change', change_comments);
$('#readme').on('load change', change_readme);
$('#markdown-inject-btn').on('click', function() { markdown_injector('#new-comment-field');})
change_comments();
change_readme();