Add: display the actual rule in the title

This commit is contained in:
eight 2019-03-22 09:40:36 +08:00
parent c663c02333
commit 162e5fe744

View File

@ -335,6 +335,7 @@ function createStyleElement(style) {
entry.classList.toggle('regexp-partial', style.sloppy); entry.classList.toggle('regexp-partial', style.sloppy);
$('.exclude-by-domain-checkbox', entry).checked = styleExcluded(style, 'domain'); $('.exclude-by-domain-checkbox', entry).checked = styleExcluded(style, 'domain');
$('.exclude-by-domain', entry).title = getExcludeRule('domain');
const excludeByUrlCheckbox = $('.exclude-by-url-checkbox', entry); const excludeByUrlCheckbox = $('.exclude-by-url-checkbox', entry);
const isRedundant = getExcludeRule('domain') === getExcludeRule('url'); const isRedundant = getExcludeRule('domain') === getExcludeRule('url');
@ -344,7 +345,7 @@ function createStyleElement(style) {
const excludeByUrlLabel = $('.exclude-by-url', entry); const excludeByUrlLabel = $('.exclude-by-url', entry);
excludeByUrlLabel.classList.toggle('disabled', isRedundant); excludeByUrlLabel.classList.toggle('disabled', isRedundant);
excludeByUrlLabel.title = isRedundant ? excludeByUrlLabel.title = isRedundant ?
chrome.i18n.getMessage('excludeStyleByUrlRedundant') : ''; chrome.i18n.getMessage('excludeStyleByUrlRedundant') : getExcludeRule('url');
return entry; return entry;
} }