clarify the tooltip for USO userstyle "configure" icon

This commit is contained in:
tophf 2017-12-07 20:58:02 +03:00
parent 6a838e9d5e
commit fbcd3cc965
2 changed files with 6 additions and 1 deletions

View File

@ -105,7 +105,11 @@
}, },
"configureStyle": { "configureStyle": {
"message": "Configure", "message": "Configure",
"description": "Label for the button to configure userstyle" "description": "Label for the button to configure usercss userstyle"
},
"configureStyleOnHomepage": {
"message": "Configure on homepage",
"description": "Label for the button to configure userstyles.org userstyle"
}, },
"checkForUpdate": { "checkForUpdate": {
"message": "Check for update", "message": "Check for update",

View File

@ -282,6 +282,7 @@ function createStyleElement({
if (!style.usercssData && style.updateUrl && style.updateUrl.includes('?') && style.url) { if (!style.usercssData && style.updateUrl && style.updateUrl.includes('?') && style.url) {
config.href = style.url; config.href = style.url;
config.target = '_blank'; config.target = '_blank';
config.title = t('configureStyleOnHomepage');
$('use', config).attributes['xlink:href'].nodeValue = '#svg-icon-config-uso'; $('use', config).attributes['xlink:href'].nodeValue = '#svg-icon-config-uso';
} else if (!style.usercssData || !Object.keys(style.usercssData.vars || {}).length) { } else if (!style.usercssData || !Object.keys(style.usercssData.vars || {}).length) {
config.style.display = 'none'; config.style.display = 'none';