Skip to content

Commit befe630

Browse files
committed
Autoformat
1 parent 4cfeb43 commit befe630

File tree

3 files changed

+16
-9
lines changed

3 files changed

+16
-9
lines changed

js/background.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
1-
chrome.tabs.onUpdated.addListener(function (tabId, changeInfo, tab) {
1+
chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) {
22
// Match Trello board pages only
33
var regex = new RegExp(/.*:\/\/trello\.com\/b\/.*/);
44
var match = regex.exec(tab.url);
55

66
// Setup page for layout changes and show page action
77
if (match) {
8-
chrome.tabs.executeScript(null, {file: 'js/setup-css.js'});
8+
chrome.tabs.executeScript(null, {
9+
file: 'js/setup-css.js'
10+
});
911
chrome.pageAction.show(tabId);
10-
}
11-
else {
12+
} else {
1213
chrome.pageAction.hide(tabId);
1314
}
1415
});
1516

16-
chrome.pageAction.onClicked.addListener(function (tab) {
17-
chrome.tabs.executeScript(null, {file: 'js/toggle-layout.js'});
17+
chrome.pageAction.onClicked.addListener(function(tab) {
18+
chrome.tabs.executeScript(null, {
19+
file: 'js/toggle-layout.js'
20+
});
1821
});

js/setup-css.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function insertCss() {
1616

1717
insertCss();
1818

19-
chrome.storage.sync.get('classList', function (result) {
19+
chrome.storage.sync.get('classList', function(result) {
2020
if (result.classList) {
2121
board.classList.add(result.classList);
2222
}

js/toggle-layout.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
if (board.classList.contains(classMixed)) {
22
board.classList.remove(classMixed);
33
board.classList.add(classVertical);
4-
chrome.storage.sync.set({'classList': classVertical});
4+
chrome.storage.sync.set({
5+
'classList': classVertical
6+
});
57
} else if (board.classList.contains(classVertical)) {
68
board.classList.remove(classVertical);
79
chrome.storage.sync.remove('classList');
810
} else {
911
board.classList.add(classMixed);
10-
chrome.storage.sync.set({'classList': classMixed});
12+
chrome.storage.sync.set({
13+
'classList': classMixed
14+
});
1115
}

0 commit comments

Comments
 (0)