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/trello.js

60 lines
1.3 KiB
JavaScript

function change_card_title() {
insert_emoticons('.list-card-title');
insert_emoticons('.window-title-text');
}
function change_list_title() {
insert_emoticons('.list-header-name');
insert_emoticons('.window-header-inline-content');
}
function change_comment() {
insert_emoticons('.action-comment');
}
$('.list-header-name').on('change load', function() {
change_list_title();
});
$('.active-card').on('click', function() {
change_list_title();
change_card_title();
change_comment();
});
$('.card-detail-edit textarea').on('change input', function() {
markdown_decoder('.card-detail-edit textarea');
});
$('.phenom-action').on('DOMNodeInserted DOMNodeRemoved change load', function() {
change_card_title();
change_list_title();
change_comment();
});
$('.js-add-card').on('click', function() {
change_card_title();
});
$('.action-card').on('click', function() {
change_card_title();
change_list_title();
change_comment();
});
$('.action-comment').on('click', function() {
change_comment();
});
$('.js-save-edit').on('click', function() {
change_card_title();
change_list_title();
change_comment();
});
$(document).on('ready', function() {
change_comment();
change_card_title();
change_card_list();
});