mirror of
https://github.com/gorhill/uBlock.git
synced 2024-09-15 15:32:28 +02:00
add further fixes as per feedback (#2072)
This commit is contained in:
parent
d3d522ac46
commit
7b27e8f08a
@ -133,9 +133,7 @@ vAPI.i18n.render = function(context) {
|
||||
for ( i = 0; i < n; i++ ) {
|
||||
elem = elems[i];
|
||||
text = vAPI.i18n(elem.getAttribute('data-i18n'));
|
||||
if ( !text ) {
|
||||
continue;
|
||||
}
|
||||
if ( !text ) { continue; }
|
||||
// TODO: remove once it's all replaced with <input type="...">
|
||||
if ( text.indexOf('{') !== -1 ) {
|
||||
text = text.replace(/\{\{input:([^}]+)\}\}/g, '<input type="$1">');
|
||||
@ -148,9 +146,8 @@ vAPI.i18n.render = function(context) {
|
||||
for ( i = 0; i < n; i++ ) {
|
||||
elem = elems[i];
|
||||
text = vAPI.i18n(elem.getAttribute('title'));
|
||||
if ( text ) {
|
||||
elem.setAttribute('title', text);
|
||||
}
|
||||
if ( !text ) { continue; }
|
||||
elem.setAttribute('title', text);
|
||||
}
|
||||
|
||||
elems = root.querySelectorAll('[placeholder]');
|
||||
@ -164,10 +161,13 @@ vAPI.i18n.render = function(context) {
|
||||
n = elems.length;
|
||||
for ( i = 0; i < n; i++ ) {
|
||||
elem = elems[i];
|
||||
elem.setAttribute(
|
||||
'data-tip',
|
||||
vAPI.i18n(elem.getAttribute('data-i18n-tip')).replace(/<br>/g, '\n').replace(/\n{3,}/g, '\n\n')
|
||||
);
|
||||
text = vAPI.i18n(elem.getAttribute('data-i18n-tip'))
|
||||
.replace(/<br>/g, '\n')
|
||||
.replace(/\n{3,}/g, '\n\n');
|
||||
elem.setAttribute('data-tip', text);
|
||||
if ( elem.getAttribute('aria-label') === 'data-i18n-tip' ) {
|
||||
elem.setAttribute('aria-label', text);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -13,12 +13,12 @@
|
||||
<span id="appinfo"><span id="appname"> </span> <span id="version"> </span></span>
|
||||
<div id="panes">
|
||||
<div class="tooltipContainer">
|
||||
<p id="switch" data-tip-position="under"><span class="fa"></span></p>
|
||||
<p id="switch" role="button" aria-label data-tip-position="under" tabindex="0"><span class="fa"></span></p>
|
||||
<p id="basicTools">
|
||||
<span id="gotoZap" class="fa tool" data-i18n-tip="popupTipZapper" data-tip-position="under"></span>
|
||||
<span id="gotoPick" class="fa tool" data-i18n-tip="popupTipPicker" data-tip-position="under"></span>
|
||||
<a href="logger-ui.html" class="fa tool enabled" data-i18n-tip="popupTipLog" data-tip-position="under" target="uBOLogger"></a>
|
||||
<a href="dashboard.html" class="fa tool enabled" data-i18n-tip="popupTipDashboard" data-tip-position="under" target="uBODashboard"></a>
|
||||
<a href="logger-ui.html" class="fa tool enabled" aria-label="data-i18n-tip" data-i18n-tip="popupTipLog" data-tip-position="under" target="uBOLogger" tabindex="0"></a>
|
||||
<a href="dashboard.html" class="fa tool enabled" aria-label="data-i18n-tip" data-i18n-tip="popupTipDashboard" data-tip-position="under" target="uBODashboard" tabindex="0"></a>
|
||||
</p>
|
||||
<h2 id="dfToggler" data-i18n="popupBlockedRequestPrompt"> </h2>
|
||||
<p class="statName">
|
||||
@ -33,10 +33,10 @@
|
||||
<h2 data-i18n="popupHitDomainCountPrompt"> </h2>
|
||||
<p class="statValue" id="popupHitDomainCount"> </p>
|
||||
<div id="extraTools">
|
||||
<span id="no-popups" class="hnSwitch fa"><span class="badge"></span><span><svg viewBox="0 0 20 20"><path d="M1,1 19,19M1,19 19,1" /></svg></span></span>
|
||||
<span id="no-large-media" class="hnSwitch fa"><span class="badge"></span><span><svg viewBox="0 0 20 20"><path d="M1,1 19,19M1,19 19,1" /></svg></span></span>
|
||||
<span id="no-cosmetic-filtering" class="hnSwitch fa"><span class="badge"></span><span><svg viewBox="0 0 20 20"><path d="M1,1 19,19M1,19 19,1" /></svg></span></span>
|
||||
<span id="no-remote-fonts" class="hnSwitch fa"><span class="badge"></span><span><svg viewBox="0 0 20 20"><path d="M1,1 19,19M1,19 19,1" /></svg></span></span>
|
||||
<span id="no-popups" class="hnSwitch fa" role="button" aria-label tabindex="0"><span class="badge"></span><span><svg viewBox="0 0 20 20"><path d="M1,1 19,19M1,19 19,1" /></svg></span></span>
|
||||
<span id="no-large-media" class="hnSwitch fa" role="button" aria-label tabindex="0"><span class="badge"></span><span><svg viewBox="0 0 20 20"><path d="M1,1 19,19M1,19 19,1" /></svg></span></span>
|
||||
<span id="no-cosmetic-filtering" class="hnSwitch fa" role="button" aria-label tabindex="0"><span class="badge"></span><span><svg viewBox="0 0 20 20"><path d="M1,1 19,19M1,19 19,1" /></svg></span></span>
|
||||
<span id="no-remote-fonts" class="hnSwitch fa" role="button" aria-label tabindex="0"><span class="badge"></span><span><svg viewBox="0 0 20 20"><path d="M1,1 19,19M1,19 19,1" /></svg></span></span>
|
||||
</div>
|
||||
</div><!-- DO NOT REMOVE --><div class="tooltipContainer">
|
||||
<div id="firewallContainer" class="minimized">
|
||||
|
Loading…
Reference in New Issue
Block a user