mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 07:48:38 +09:00
Issue #638 - Part 2: Add tooltip to mute/unmute buttons
This commit is contained in:
parent
6dc555939c
commit
d6e21c05d3
2 changed files with 23 additions and 3 deletions
|
|
@ -3084,9 +3084,25 @@
|
|||
event.preventDefault();
|
||||
return;
|
||||
}
|
||||
event.target.setAttribute("label", tab.mOverCloseButton ?
|
||||
tab.getAttribute("closetabtext") :
|
||||
tab.getAttribute("label"));
|
||||
|
||||
var stringID, label;
|
||||
if (tab.mOverCloseButton) {
|
||||
stringID = "tabs.closeTab";
|
||||
} else if (tab._overPlayingIcon) {
|
||||
if (tab.linkedBrowser.audioBlocked) {
|
||||
stringID = "tabs.unblockAudio.tooltip";
|
||||
} else {
|
||||
stringID = tab.linkedBrowser.audioMuted ?
|
||||
"tabs.unmuteAudio.tooltip" :
|
||||
"tabs.muteAudio.tooltip";
|
||||
}
|
||||
} else {
|
||||
label = tab.getAttribute("label");
|
||||
}
|
||||
if (stringID && !label) {
|
||||
label = this.mStringBundle.getString(stringID);
|
||||
}
|
||||
event.target.setAttribute("label", label);
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
|
|
|
|||
|
|
@ -24,3 +24,7 @@ tabs.closeWarningTitle=Confirm close
|
|||
tabs.closeWarningMultipleTabs=You are about to close %S tabs. Are you sure you want to continue?
|
||||
tabs.closeButtonMultiple=Close tabs
|
||||
tabs.closeWarningPromptMe=Warn me when I attempt to close multiple tabs
|
||||
|
||||
tabs.muteAudio.tooltip=Mute tab
|
||||
tabs.unmuteAudio.tooltip=Unmute tab
|
||||
tabs.unblockAudio.tooltip=Play tab
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue