Skip to content

Commit

Permalink
Tool tip for alert words.
Browse files Browse the repository at this point in the history
  • Loading branch information
chdinesh1089 committed Dec 28, 2020
1 parent 6615a6e commit 78a9a7f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -228,3 +228,7 @@ input[type="number"] {
vertical-align: middle;
padding-bottom: 16px;
}

.tooltipped {
font-size: 1.2rem;
}
6 changes: 6 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,15 @@ getPageURL().then((url) => {
}
});

function setupTooltip() {
const elems = document.querySelectorAll('.tooltipped');
M.Tooltip.init(elems, {});
}

setUpSettingsFromStorage(state).then((joinTime) => {
setupTimepickers(joinTime);
setupChips(state.alertWords);
setupTooltip();
browser.tabs.query({ active: true, currentWindow: true }).then((tabs) => {
browser.tabs
.sendMessage(tabs[0].id, { message: "sendState", state })
Expand Down
2 changes: 1 addition & 1 deletion src/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h3 id='leave_text'>
</h3>
</div>

<div class="chips"> </div>
<div class="chips"><a class="tooltipped" data-position="top" data-tooltip="Notifies if appeared in captions"></a></div>

<button id="submit">Submit</button>
</div>
Expand Down

0 comments on commit 78a9a7f

Please sign in to comment.