Pārlūkot izejas kodu

Added (currently inoperative) help button to popup

master
Said Achmiz pirms 6 gadiem
vecāks
revīzija
52d68df2d7
3 mainītis faili ar 44 papildinājumiem un 15 dzēšanām
  1. 38
    15
      popup.css
  2. 1
    0
      popup.html
  3. 5
    0
      popup.js

+ 38
- 15
popup.css Parādīt failu

@@ -103,35 +103,58 @@ button.main-button.whitelist.active::after {

.aux-button-container {
display: flex;
flex-flow: column;
border-top: 1px solid #ddd;
flex: 1 1 auto;
padding: 0 8px;
}

/*==================*/
/*= OPTIONS BUTTON =*/
/*==================*/

button.options-button {
font-size: 1.125rem;
padding: 10px;
color: #777;
width: 100%;
.aux-button-container button {
font-size: 1.25rem;
padding: 0;
flex: 1 1 auto;
font-family: Font Awesome, Inconsolata, sans-serif;
display: flex;
flex-flow: column;
align-items: center;
justify-content: center;
min-width: 0;
}
button.options-button:hover {
.aux-button-container button::before {
padding: 4px 0 0 0;
}
.aux-button-container button:hover::before {
color: #000;
}
.aux-button-container button::after {
text-transform: uppercase;
color: #777;
font-size: 0.75rem;
padding: 4px 0 0 0;
}

/*==================*/
/*= OPTIONS BUTTON =*/
/*==================*/

button.options-button::before {
content: "\F1DE";
font-family: Font Awesome;
font-size: 0.875em;
margin: 0 6px 0 0;
color: #777;
}
button.options-button::after {
content: "Options";
margin: 0 3px 0 0;
}

/*===============*/
/*= HELP BUTTON =*/
/*===============*/

button.help-button::before {
content: "\F128";
font-weight: 900;
color: #999;
}
button.help-button::after {
content: "Help";
}

/********/

+ 1
- 0
popup.html Parādīt failu

@@ -17,6 +17,7 @@
<button type='button' class='reload-button'></button>
</div>
<div class='aux-button-container'>
<button type='button' class='help-button'></button>
<button type='button' class='options-button'></button>
</div>
</body>

+ 5
- 0
popup.js Parādīt failu

@@ -198,6 +198,11 @@ function initialize() {
document.querySelector("button.options-button").addActivateEvent(() => {
chrome.runtime.openOptionsPage(null);
});
// Listener for the Help button.
document.querySelector("button.help-button").addActivateEvent(() => {
// TODO: code!
});

// Listener for reload button (appears when sticky-killing is toggled OFF).
document.querySelector("button.reload-button").addActivateEvent(() => {

Notiek ielāde…
Atcelt
Saglabāt