Skip to content

Commit 10ffd43

Browse files
committed
Add mute button shortcut option
1 parent 2f5454f commit 10ffd43

File tree

4 files changed

+27
-16
lines changed

4 files changed

+27
-16
lines changed

chrome/src/options/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
<div class="wrapper">
1212
<div id="options"></div>
13-
<div class="notice">Make sure you refresh both the extensions page (chrome://extensions/) and the gmail tab after updating the settings.</div>
13+
<div class="notice">Make sure to refresh both the extensions page (chrome://extensions/) and the gmail tab after updating the settings.</div>
1414
<button id="save">Save</button>
1515
</div>
1616

chrome/src/options/options.css

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@ body, * {
1111
}
1212

1313
.wrapper {
14-
width: 500px;
14+
width: 540px;
1515
margin: auto;
16-
padding: 0 20px;
1716
}
1817

1918
.notice {
@@ -22,12 +21,13 @@ body, * {
2221
border-left: 2px solid #c1c5cd;
2322
border-radius: 0 5px 5px 0;
2423
padding: 12px;
25-
margin: 30px 0;
24+
margin: 20px 15px 30px;
2625
font-weight: bold;
2726
}
2827

2928
.option {
30-
margin: 30px 0 0;
29+
margin: 10px 0 0;
30+
padding: 15px;
3131
transition: all 0.6s;
3232
}
3333

@@ -41,6 +41,11 @@ body, * {
4141
color: #666;
4242
}
4343

44+
.help {
45+
color: #c58989;
46+
font-size: 12px;
47+
}
48+
4449
input[type]:focus {
4550
background-color: #fff;
4651
border: 1px solid #49d;
@@ -56,7 +61,7 @@ input[type] {
5661
font-family: menlo, monospace;
5762
}
5863

59-
input[type], button {
64+
input[type] {
6065
display: block;
6166
line-height: 1;
6267
width: 100%;
@@ -69,7 +74,7 @@ label {
6974
button {
7075
background: #4a6;
7176
border: 0;
72-
padding: 15px 10px;
77+
padding: 10px 20px;
7378
color: #fff;
7479
font-weight: bold;
7580
cursor: pointer;
@@ -78,7 +83,8 @@ button {
7883
text-transform: uppercase;
7984
box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .1);
8085
transition: all .6s;
81-
margin: 20px 0;
86+
margin: 20px 15px;
87+
display: block;
8288
font-size: 12px;
8389
}
8490

chrome/src/options/options.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ function initOptions (defaultOptions) {
1313
optionsWrapper = document.getElementById('options')
1414

1515
for (var key in options) {
16-
html = '<div class=\'option\'><label>' + key + ' ' + options[key].hint + '</label>'
17-
html += '<p class=\'description\'>' + options[key].description + '</p>'
16+
html = '<div class=\'option\'><label>' + key + '</label>'
17+
html += '<p class=\'description\'>' + options[key].description + '<br><span class=\'help\'>*' + options[key].hint + '</span></p>'
1818
html += '<input name=\'' + key + '\' value=\'' + options[key].val +'\' type=\'text\' /></div>'
1919
$(optionsWrapper).append(html)
2020
}
2121

2222
}
2323

24-
$(document).on('keypress', '[name=Shortcut], [name=BackgroundShortcut]', function(e) {
24+
$(document).on('keypress', '[name=Shortcut], [name=BackgroundShortcut], [name=MuteShortcut]', function(e) {
2525
if (e.keyCode == 13 && !e.shiftKey && !e.metaKey && !e.altKey && !e.ctrlKey ) return false
2626
code = ''
2727
keys = ['shift', 'alt', 'meta', 'ctrl']

chrome/src/options/options.json

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,21 @@
22
"Domains" : {
33
"description": "Specify GitHub enterprise domain, or other domains you'd like to grab links for. There's no need to add github.com, protocol is also not required unless you'd like to be explicit.",
44
"val": "",
5-
"hint": "(comma separated if multiple)"
5+
"hint": "Comma separated if multiple."
66
},
77
"Shortcut" : {
8-
"description": "The shortcut that triggers button clicking on the mail view.",
8+
"description": "Triggers view button on the mail view.",
99
"val": "shift + 71",
10-
"hint": " (press shortcut in the input field)"
10+
"hint": "Press shortcut in the input field."
1111
},
1212
"BackgroundShortcut" : {
13-
"description": "The shortcut that triggers button clicking on the mail view, opens the link in the background.",
13+
"description": "Triggers iew button on the mail view, opens the link in the background.",
1414
"val": "shift + 66",
15-
"hint": " (press shortcut in the input field)"
15+
"hint": "Press shortcut in the input field."
16+
},
17+
"MuteShortcut" : {
18+
"description": "Triggers mute button on the mail view.",
19+
"val": "shift + 72",
20+
"hint": "Press shortcut in the input field."
1621
}
1722
}

0 commit comments

Comments
 (0)