1
Fork 0

Added basic trello support

This commit is contained in:
Jake Howard 2015-08-26 09:55:35 +01:00
parent d48503cffa
commit 75b56a3214
4 changed files with 71 additions and 21 deletions

View file

@ -2,27 +2,27 @@
"content_scripts": [
{
"js": [
"data/lib/jquery.js",
"data/injector.js",
"data/lib/jquery.js",
"data/injector.js",
"data/injections/facebook.js"
],
],
"matches": [
"*://facebook.com/*"
]
},
},
{
"js": [
"data/lib/jquery.js",
"data/injector.js",
"data/lib/jquery.js",
"data/injector.js",
"data/injections/github.js"
],
],
"matches": [
"*://github.com/*"
]
}
],
"description": "Use hipchat emoticons on other websites. Some sites may require this plugin in order to see the emoticons.",
"manifest_version": 2,
"name": "Hipchat-Emoticons-for-all",
],
"description": "Use hipchat emoticons on other websites. Some sites may require this plugin in order to see the emoticons.",
"manifest_version": 2,
"name": "Hipchat-Emoticons-for-all",
"version": "0.0.0"
}

View file

@ -1,14 +1,14 @@
{
"author": "TheOrangeOne",
"description": "Use hipchat emoticons on other websites. Some sites may require this plugin in order to see the emoticons.",
"author": "TheOrangeOne",
"description": "Use hipchat emoticons on other websites. Some sites may require this plugin in order to see the emoticons.",
"engines": {
"fennec": ">=38.0a1",
"fennec": ">=38.0a1",
"firefox": ">=38.0a1"
},
"id": "Hipchat-Emoticons-for-all@jetpack",
"license": "MIT",
"main": "index.js",
"name": "hipchat emoticons for all",
"title": "Hipchat-Emoticons-for-all",
},
"id": "Hipchat-Emoticons-for-all@jetpack",
"license": "MIT",
"main": "index.js",
"name": "hipchat emoticons for all",
"title": "Hipchat-Emoticons-for-all",
"version": "0.0.0"
}

View file

@ -1,6 +1,7 @@
{
"sites": [
{"facebook.com":"facebook.js"},
{"github.com":"github.js"}
{"github.com":"github.js"},
{"trello.com":"trello.js"}
]
}

49
src/injections/trello.js Normal file
View file

@ -0,0 +1,49 @@
function change_card_title() {
inject_image('.list-card-title');
inject_image('.window-title-text');
}
function change_list_title() {
inject_image('.list-header-name');
inject_image('.window-header-inline-content');
}
function change_comment() {
inject_image('.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_injector('.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();
});