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

View file

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

View file

@ -1,6 +1,7 @@
{ {
"sites": [ "sites": [
{"facebook.com":"facebook.js"}, {"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();
});