Skip to content

Commit

Permalink
Add card number to lightbox, version 2.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
dewyze committed May 14, 2016
1 parent df3cb00 commit f3d0168
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 2.2.4 (2016-05-14)
- Change lightbox card number to block style to deal with Trello DOM changes.

## 2.2.3 (2015-11-28)
- Change lightbox card number to inline style.
- Change lightbox card number css selectors.
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

"name": "Trello Card Numbers",
"description": "Adds card numbers to a variety of places when using Trello.",
"version": "2.2.3",
"version": "2.2.4",

"options_ui": {
"page": "options.html",
Expand Down
9 changes: 7 additions & 2 deletions trello-card-numbers.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var LIGHTBOX_SELECTOR = "window-title-text current hide-on-edit js-card-title";
var LIGHTBOX_SELECTOR = "window-title";
var CARD_LINK_QUERY_SELECTOR = "a.list-card-title.js-card-name";
var LIST_NUM_CARDS_CLASS = "list-header-num-cards";
var CARD_SHORT_ID = "card-short-id";
Expand Down Expand Up @@ -207,7 +207,12 @@ window.addEventListener("load", function() {
header.innerHTML = id;
} else {
var obj = getByClass(LIGHTBOX_SELECTOR)[0];
obj.innerHTML = "<span class='" + TCN_HEADER + " quiet' style='display: inline-block; margin-right: 10px'>" + id + "</span>" + obj.innerHTML;
var h2 = document.createElement('h2');
h2.className = TCN_HEADER + ' quiet';
h2.style.display = 'inline-block';
h2.style.marginRight = '10px';
h2.innerHTML = '<span>' + id + '</span>';
obj.insertBefore(h2, obj.lastChild);
}
}, function (err) {
null;
Expand Down

0 comments on commit f3d0168

Please sign in to comment.