1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-02 17:19:38 +02:00
This commit is contained in:
gorhill 2014-08-24 10:04:22 -04:00
parent e811fd2958
commit 8accb1f347
5 changed files with 62 additions and 15 deletions

View File

@ -32,8 +32,8 @@
"description":"appears as tab name in dashboard."
},
"popupPowerSwitchInfo":{
"message":"click the power button to <br>permanently disable or enable <br>µBlock for the current site",
"description":"English (mind the horizontal extent): click the power button to <br>permanently disable or enable <br>µBlock for the current site"
"message":"Click: permanently disable/enable µBlock for this site.\n\n<Ctrl>-click: disable µBlock only on this page.",
"description":"English: Click: permanently disable/enable µBlock for this site.\n\n<Ctrl>-click: disable µBlock only on this page."
},
"popupBlockedRequestPrompt":{
"message":"requests blocked",

View File

@ -14,4 +14,47 @@
}
#dashboard-nav-widgets {
direction: __MSG_@@bidi_dir__;
}
}
/* https://developer.mozilla.org/en-US/docs/Web/CSS/::after#Tooltips */
*[data-tip] {
cursor: pointer;
position: relative;
}
*[data-tip]:hover:after {
background-color: #ffffee;
border: 1px solid gray;
border-radius: 3px;
box-shadow: 1px 1px 3px gray;
color: black;
content: attr(data-tip);
direction: __MSG_@@bidi_dir__;
font: 11px sans-serif;
left: 0;
line-height: 130%;
min-width: 55vw;
padding: 4px 6px;
position: absolute;
text-align: __MSG_@@bidi_start_edge__;
top: 110%;
white-space: pre-line;
z-index: 20;
animation: tooltip 0.8s;
-webkit-animation: tooltip 0.8s;
}
*[data-tip][data-tip-anchor="top"]:hover:after {
bottom: 105%;
__MSG_@@bidi_start_edge__: auto;
__MSG_@@bidi_end_edge__: -10vw;
top: auto;
}
@keyframes tooltip {
0% { opacity: 0; }
85% { opacity: 0; }
100% { opacity: 1; }
}
@-webkit-keyframes tooltip {
0% { opacity: 0; }
85% { opacity: 0; }
100% { opacity: 1; }
}

View File

@ -5,6 +5,7 @@ body {
font: 13px sans-serif;
background-color: white;
direction: __MSG_@@bidi_dir__;
min-width: 160px;
}
h1,h2,h3,h4 {
margin: 0;
@ -36,7 +37,8 @@ p {
text-align: center;
}
#switch .fa {
font-size: 64px;
margin: 0;
font-size: 96px;
color: green;
cursor: pointer;
}
@ -74,11 +76,3 @@ p {
.tool:hover {
color: #444;
}
#options {
margin: 16px 0 0 0;
font-size: 12px;
}
.dim {
color: #888;
text-decoration: none;
}

View File

@ -31,4 +31,10 @@ uDom.onLoad(function() {
this.setAttribute('title', title);
}
});
uDom('[data-i18n-tip]').forEach(function() {
this.setAttribute(
'data-tip',
chrome.i18n.getMessage(this.getAttribute('data-i18n-tip')).replace(/<br>/g, '')
);
});
});

View File

@ -11,10 +11,14 @@
<body>
<h4 title="popupTipDashboard">µBlock<span id="version"></span></h4>
<div>
<p id="switch"><span class="fa">&#xf011;</span></p>
<p id="switch-hint" data-i18n="popupPowerSwitchInfo"></p>
<p id="switch" data-i18n-tip="popupPowerSwitchInfo"><span class="fa">&#xf011;</span></p>
<p id="switch-hint"></p>
<p style="font-size: 16px;" data-i18n="popupBlockedRequestPrompt"></p>
<p id="stats"><span data-i18n="popupBlockedOnThisPagePrompt"></span>&ensp;<span id="gotoPick" class="fa tool" title="popupTipPicker">&#xf070;</span>&ensp;<span id="gotoLog" class="fa tool" title="popupTipLog">&#xf06e;</span></p>
<p id="stats">
<span data-i18n="popupBlockedOnThisPagePrompt"></span>&ensp;
<span id="gotoPick" class="fa tool" data-i18n-tip="popupTipPicker" data-tip-anchor="top">&#xf070;</span>&ensp;
<span id="gotoLog" class="fa tool" data-i18n-tip="popupTipLog" data-tip-anchor="top">&#xf06e;</span>
</p>
<p id="page-blocked">?</p>
<p id="stats" data-i18n="popupBlockedSinceInstallPrompt"></p>
<p id="total-blocked">?</p>