1
0
Fork 0
mirror of https://github.com/gorhill/uMatrix.git synced 2024-05-20 12:13:19 +12:00

add tooltip for global scope + setting to disable tooltips (see https://github.com/gorhill/uMatrix/issues/936#issuecomment-361936827)

This commit is contained in:
Raymond Hill 2018-01-31 10:00:33 -05:00
parent d0a41e09d0
commit c2a46c5da4
No known key found for this signature in database
GPG key ID: 25E1490B761470C2
8 changed files with 41 additions and 23 deletions

View file

@ -91,6 +91,14 @@
"message": "No net traffic seen for this tab so far.",
"description": ""
},
"matrixLocalScopeTip" : {
"message": "Select a local scope to see/create rules which apply only in that scope",
"description": "Tool tip for the local scope button"
},
"matrixGlobalScopeTip" : {
"message": "Select the global scope to see/create rules which apply everywhere",
"description": "Tool tip for the global scope button"
},
"matrixMtxButtonTip" : {
"message": "Disable/enable matrix filtering for this scope",
"description": "Tool tip for matrix button"
@ -104,7 +112,7 @@
"description": "Tool tip for the revert local permission button"
},
"matrixReloadButton" : {
"message": "Reload the page.\n Press Shift to bypass the browser cache.",
"message": "Reload the page. \nPress Shift to bypass the browser cache.",
"description": "Tool tip for the reload button"
},
"matrix1stPartyLabel" : {
@ -282,13 +290,9 @@
"message": "Text size:",
"description": ""
},
"settingsMatrixDisplayTextSizeNormal" : {
"message": "Normal",
"description": ""
},
"settingsMatrixDisplayTextSizeLarge" : {
"message": "Large",
"description": ""
"settingsIconBadgeEnabled":{
"message":"Show the number of distinct requests on the icon",
"description":""
},
"settingsMatrixDisplayColorBlind" : {
"message": "Color-blind friendly",
@ -342,10 +346,6 @@
"message": "Opacity",
"description": "English: Opacity"
},
"settingsIconBadgeEnabled":{
"message":"Show the number of distinct requests on the icon",
"description":"English: Show the number of distinct requests on the icon"
},
"settingsCollapseBlocked" : {
"message": "Collapse placeholder of blocked elements",
"description": "English: Collapse placeholder of blocked elements"
@ -362,6 +362,10 @@
"message": "Enable cloud storage support",
"description": ""
},
"settingsMatrixNoTooltips" : {
"message": "Disable tooltips",
"description": ""
},
"privacyPageTitle" : {
"message": "uMatrix – Privacy",
@ -516,7 +520,7 @@
"description":""
},
"hostsFilesExternalListsHint":{
"message":"Import external assets here:\n One URL per line; invalid URLs will be silently ignored.",
"message":"Import external assets here: \nOne URL per line; invalid URLs will be silently ignored.",
"description":""
},
"hostsFilesExternalListsParse":{

View file

@ -43,11 +43,11 @@ body[dir="rtl"] {
position: relative;
cursor: pointer;
}
*[data-i18n-tip]:after {
*[data-i18n-tip]::after {
content: "";
opacity: 0;
}
*[data-i18n-tip]:hover:after {
*[data-i18n-tip]:hover::after {
background-color: #fffffa;
border: 1px solid gray;
border-radius: 3px;
@ -68,14 +68,18 @@ body[dir="rtl"] {
white-space: pre-line;
z-index: 20;
}
body[dir="ltr"] .tip-anchor-left[data-i18n-tip]:hover:after,
body[dir="rtl"] .tip-anchor-right[data-i18n-tip]:hover:after {
body[dir="ltr"] .tip-anchor-left[data-i18n-tip]:hover::after,
body[dir="rtl"] .tip-anchor-right[data-i18n-tip]:hover::after {
left: -3vw;
}
body[dir="ltr"] .tip-anchor-right[data-i18n-tip]:hover:after,
body[dir="rtl"] .tip-anchor-left[data-i18n-tip]:hover:after {
body[dir="ltr"] .tip-anchor-right[data-i18n-tip]:hover::after,
body[dir="rtl"] .tip-anchor-left[data-i18n-tip]:hover::after {
right: -3vw;
}
body.noTooltips *[data-i18n-tip]::after {
display: none;
}
button.custom {
padding: 0.6em 1em;
border: 1px solid transparent;

View file

@ -181,6 +181,7 @@ return {
externalRecipeFiles: [],
iconBadgeEnabled: false,
maxLoggedRequests: 1000,
noTooltips: false,
popupCollapseAllDomains: false,
popupCollapseBlacklistedDomains: false,
popupScopeLevel: 'domain',

View file

@ -196,6 +196,7 @@ var matrixSnapshot = function(pageStore, details) {
userSettings: {
colorBlindFriendly: µmuser.colorBlindFriendly,
displayTextSize: µmuser.displayTextSize,
noTooltips: µmuser.noTooltips,
popupScopeLevel: µmuser.popupScopeLevel
}
};

View file

@ -1,7 +1,7 @@
/*******************************************************************************
uMatrix - a Chromium browser extension to black/white list requests.
Copyright (C) 2014-2017 Raymond Hill
Copyright (C) 2014-2018 Raymond Hill
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -1070,11 +1070,15 @@ function initMenuEnvironment() {
'font-size',
getUserSetting('displayTextSize')
);
uDom.nodeFromId('version').textContent = matrixSnapshot.appVersion || '';
document.body.classList.toggle(
'colorblind',
getUserSetting('colorBlindFriendly')
);
uDom.nodeFromId('version').textContent = matrixSnapshot.appVersion || '';
document.body.classList.toggle(
'noTooltips',
getUserSetting('noTooltips')
);
var prettyNames = matrixHeaderPrettyNames;
var keys = Object.keys(prettyNames);

View file

@ -1,7 +1,7 @@
/*******************************************************************************
uMatrix - a Chromium browser extension to black/white list requests.
Copyright (C) 2014-2017 Raymond Hill
Copyright (C) 2014-2018 Raymond Hill
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -101,6 +101,7 @@ function onInputChanged(ev) {
case 'deleteLocalStorage':
case 'deleteUnusedSessionCookies':
case 'iconBadgeEnabled':
case 'noTooltips':
case 'processHyperlinkAuditing':
changeUserSettings(target.id, target.checked);
break;

View file

@ -16,7 +16,7 @@
<div id="toolbarContainer">
<div class="toolbar">
<span class="scope" id="specificScope"><span>&nbsp;</span></span><!--
--><span class="scope" id="globalScope" data-scope="*"><span><span>&#x2217;</span></span></span>
--><span class="scope" id="globalScope" data-scope="*" data-i18n-tip="matrixGlobalScopeTip"><span><span>&#x2217;</span></span></span>
<button id="mtxSwitch_matrix-off" type="button" class="fa scopeRel tip-anchor-left" data-i18n-tip="matrixMtxButtonTip">&#xf011;<span class="badge"></span></button>
<button id="buttonMtxSwitches" type="button" class="fa scopeRel" tabindex="-1" data-dropdown-menu="dropDownMenuSwitches">&#xf142;<span class="badge"></span></button>
<button id="buttonPersist" type="button" class="fa scopeRel tip-anchor-left" data-i18n-tip="matrixPersistButtonTip">&#xf023;<span class="badge"></span></button>

View file

@ -45,6 +45,9 @@ ul > li.separator {
<label data-i18n="settingsNoscriptTagsSpoofed" for="noscriptTagsSpoofed"></label>
<li><input id="cloudStorageEnabled" type="checkbox" data-setting-bool>
<label data-i18n="settingsCloudStorageEnabled" for="cloudStorageEnabled"></label>
<li>
<input id="noTooltips" type="checkbox" data-setting-bool>
<label data-i18n="settingsMatrixNoTooltips" for="noTooltips"></label>
</ul>
<h2 data-i18n="settingsMatrixDisplayHeader"></h2>
<ul>