Tweaks
This commit is contained in:
parent
2d28a7520d
commit
3c1ee1cd9e
|
@ -771,23 +771,29 @@
|
|||
"optionsOpenManager": {
|
||||
"message": "Manage styles"
|
||||
},
|
||||
"optionsPopupActionElements": {
|
||||
"message": "Action elements",
|
||||
"description": "Label in the options page to alter the popup action elements to show either text or icons"
|
||||
},
|
||||
"optionsPopupClassicUI": {
|
||||
"message": "Text and buttons"
|
||||
"message": "Text and buttons",
|
||||
"description": "Tooltip displayed when hovering the popup action elements option to choose the classic text & button format"
|
||||
},
|
||||
"optionsPopupIconUI": {
|
||||
"message": "Vector icons"
|
||||
"message": "Vector icons",
|
||||
"description": "Tooltip displayed when hovering the popup action elements option to choose displaying vector icons instead of text"
|
||||
},
|
||||
"optionsPopupTitleClickAction": {
|
||||
"message": "Style name click action"
|
||||
"optionsPopupClickAction": {
|
||||
"message": "Style name click action",
|
||||
"description": "Label in the options page for the action performed when clicking on a style name in the popup"
|
||||
},
|
||||
"optionsPopupClickActionLink": {
|
||||
"message": "Edit style"
|
||||
"message": "Edit style",
|
||||
"description": "Tooltip displayed when hovering the popup click action option to choose to edit the style when clicking on the style name in the popup"
|
||||
},
|
||||
"optionsPopupClickActionToggle": {
|
||||
"message": "Toggle style"
|
||||
},
|
||||
"optionsPopupTitle": {
|
||||
"message": "Action elements"
|
||||
"message": "Toggle style",
|
||||
"description": "Tooltip displayed when hovering the popup click action option to choose to toggle a style (on or off) when clicking the style name in the popup"
|
||||
},
|
||||
"optionsPopupWidth": {
|
||||
"message": "Popup width (in pixels)"
|
||||
|
@ -1211,7 +1217,7 @@
|
|||
"description": "Note in the popup when opened on addons.mozilla.org in Firefox >= 59"
|
||||
},
|
||||
"unreachableAMOHintNewFF": {
|
||||
"message": "In Firefox 60 and newer you'll also have to to remove AMO domain from <extensions.webextensions.restrictedDomains> in <about:config>.",
|
||||
"message": "In Firefox 60 and newer you'll also have to remove AMO domain from <extensions.webextensions.restrictedDomains> in <about:config>.",
|
||||
"description": "Note in the popup when opened on addons.mozilla.org in Firefox >= 59"
|
||||
},
|
||||
"unreachableAMOHintOldFF": {
|
||||
|
@ -1305,8 +1311,8 @@
|
|||
"description": "Label for toolbar pop-up that precedes the links to write a new style"
|
||||
},
|
||||
"writeStyleForInfo": {
|
||||
"message": "Create a new style by specifying target URLs.\nAvailable options shown in hover tooltips.",
|
||||
"description": "Style creation actions tooltip to accompany icon"
|
||||
"message": "Create a new style by selecting a target URL.\nAvailable options shown in hover tooltips.",
|
||||
"description": "Popup style creation actions tooltip to accompany icon"
|
||||
},
|
||||
"writeStyleForURL": {
|
||||
"message": "this URL",
|
||||
|
|
|
@ -667,6 +667,9 @@ body[data-match-highlight="selection"]:not(.find-open) .CodeMirror-selection-hig
|
|||
#lint table:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
#lint table.empty {
|
||||
display: none;
|
||||
}
|
||||
#lint caption {
|
||||
text-align: left;
|
||||
font-weight: bold;
|
||||
|
|
|
@ -106,7 +106,7 @@
|
|||
</span>
|
||||
</label>
|
||||
<div class="radio-outer-wrapper action-elements">
|
||||
<div class="radio-title" i18n-text="optionsPopupTitle"></div>
|
||||
<div class="radio-title" i18n-text="optionsPopupActionElements"></div>
|
||||
<div class="radio-inner-wrapper">
|
||||
<label i18n-title="optionsPopupIconUI">
|
||||
<div class="popupui">
|
||||
|
@ -131,7 +131,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="radio-outer-wrapper style-name-action">
|
||||
<div class="radio-title" i18n-text="optionsPopupTitleClickAction"></div>
|
||||
<div class="radio-title" i18n-text="optionsPopupClickAction"></div>
|
||||
<div class="radio-inner-wrapper">
|
||||
<label i18n-title="optionsPopupClickActionLink">
|
||||
<div class="popupclick ">
|
||||
|
|
|
@ -268,7 +268,10 @@
|
|||
<button id="popup-wiki-button" class="classicUI-el" i18n-text="linkStylusWiki" i18n-title="linkGetHelp" data-href="https://github.com/openstyles/stylus/wiki"></button>
|
||||
<a id="popup-wiki-icon" class="iconUI-el" href="#" i18n-title="linkGetHelp" data-href="https://github.com/openstyles/stylus/wiki" tabindex="0">
|
||||
<svg class="svg-icon wiki" viewBox="0 0 24 24">
|
||||
<path d="M12.09 13.119c-.936 1.932-2.217 4.548-2.853 5.728-.616 1.074-1.127.931-1.532.029-1.406-3.321-4.293-9.144-5.651-12.409-.251-.601-.441-.987-.619-1.139-.181-.15-.554-.24-1.122-.271C.103 5.033 0 4.982 0 4.898v-.455l.052-.045c.924-.005 5.401 0 5.401 0l.051.045v.434c0 .119-.075.176-.225.176l-.564.031c-.485.029-.727.164-.727.436 0 .135.053.33.166.601 1.082 2.646 4.818 10.521 4.818 10.521l.136.046 2.411-4.81-.482-1.067-1.658-3.264s-.318-.654-.428-.872c-.728-1.443-.712-1.518-1.447-1.617-.207-.023-.313-.05-.313-.149v-.468l.06-.045h4.292l.113.037v.451c0 .105-.076.15-.227.15l-.308.047c-.792.061-.661.381-.136 1.422l1.582 3.252 1.758-3.504c.293-.64.233-.801.111-.947-.07-.084-.305-.22-.812-.24l-.201-.021c-.052 0-.098-.015-.145-.051-.045-.031-.067-.076-.067-.129v-.427l.061-.045c1.247-.008 4.043 0 4.043 0l.059.045v.436c0 .121-.059.178-.193.178-.646.03-.782.095-1.023.439-.12.186-.375.589-.646 1.039l-2.301 4.273-.065.135 2.792 5.712.17.048 4.396-10.438c.154-.422.129-.722-.064-.895-.197-.172-.346-.273-.857-.295l-.42-.016c-.061 0-.105-.014-.152-.045-.043-.029-.072-.075-.072-.119v-.436l.059-.045h4.961l.041.045v.437c0 .119-.074.18-.209.18-.648.03-1.127.18-1.443.421-.314.255-.557.616-.736 1.067 0 0-4.043 9.258-5.426 12.339-.525 1.007-1.053.917-1.503-.031-.571-1.171-1.773-3.786-2.646-5.71l.053-.036z"/>
|
||||
<g fill-rule="evenodd" clip-rule="evenodd">
|
||||
<path d="M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm0 18a8 8 0 1 1 0-16 8 8 0 0 1 0 16z"/>
|
||||
<path d="M11.8 6.7a3.4 3.4 0 0 0-3.3 2.2l1.5.8s.3-.8.9-1.2c.5-.4 1.6-.6 2.2.1.7 1-.2 1.6-1.1 2.7-1 1.2-1 3.7-1 3.7h2s.1-2.3 1-3.4c.6-.7 1.5-1.3 1.5-2.5s-1.2-2.4-3.7-2.4zM11 16h2v2h-2z"/>
|
||||
</g>
|
||||
</svg>
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
@ -210,8 +210,8 @@ body:not(.disabled) .toggle-all-on {
|
|||
|
||||
#popup-wiki-icon .svg-icon,
|
||||
#find-styles-icon .svg-icon {
|
||||
height: 22px;
|
||||
width: 22px;
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
#find-inline-icon {
|
||||
|
|
|
@ -5,26 +5,19 @@
|
|||
let installed;
|
||||
let tabURL;
|
||||
const handleEvent = {};
|
||||
const doc = document.documentElement;
|
||||
|
||||
const ENTRY_ID_PREFIX_RAW = 'style-';
|
||||
const ENTRY_ID_PREFIX = '#' + ENTRY_ID_PREFIX_RAW;
|
||||
|
||||
toggleSideBorders();
|
||||
|
||||
if (prefs.get('popupui') === 1) {
|
||||
document.documentElement.classList.add('classicUI');
|
||||
} else {
|
||||
document.documentElement.classList.add('iconUI');
|
||||
}
|
||||
doc.classList.add(prefs.get('popupui') === 1 ? 'classicUI' : 'iconUI');
|
||||
|
||||
if (prefs.get('popupclick') === 1) {
|
||||
document.documentElement.classList.add('toggleUI');
|
||||
} else {
|
||||
document.documentElement.classList.add('directLinkUI');
|
||||
}
|
||||
doc.classList.add(prefs.get('popupclick') === 1 ? 'toggleUI' : 'directLinkUI');
|
||||
|
||||
if (!prefs.get('popup.stylesFirst')) {
|
||||
document.documentElement.classList.add('actions-top');
|
||||
doc.classList.add('actions-top');
|
||||
}
|
||||
|
||||
getActiveTab().then(tab =>
|
||||
|
@ -122,12 +115,12 @@ function initPopup() {
|
|||
oncontextmenu: handleEvent.openManager,
|
||||
});
|
||||
|
||||
$('#find-external-icon').onclick = () => {
|
||||
$('#find-external-icon').onclick = event => {
|
||||
event.preventDefault();
|
||||
$('input.toggle-inline').click()
|
||||
};
|
||||
|
||||
$('#find-inline-icon').onclick = () => {
|
||||
$('#find-inline-icon').onclick = event => {
|
||||
event.preventDefault();
|
||||
$('input.toggle-inline').click()
|
||||
};
|
||||
|
@ -137,7 +130,7 @@ function initPopup() {
|
|||
window.close();
|
||||
};
|
||||
|
||||
$('#popup-options-icon').onclick = () => {
|
||||
$('#popup-options-icon').onclick = event => {
|
||||
event.preventDefault();
|
||||
chrome.runtime.openOptionsPage();
|
||||
window.close();
|
||||
|
@ -286,7 +279,7 @@ function showStyles(styles) {
|
|||
});
|
||||
|
||||
var reverseZebra = $('.entry:last-child:nth-of-type(odd)') !== null;
|
||||
$('#installed').classList.toggle('reverse-stripe', reverseZebra);
|
||||
installed.classList.toggle('reverse-stripe', reverseZebra);
|
||||
}
|
||||
|
||||
|
||||
|
@ -408,9 +401,9 @@ Object.assign(handleEvent, {
|
|||
$('button[data-cmd="ok"]', box).focus();
|
||||
$('button[data-cmd="ok"]', box).onclick = () => confirm(true);
|
||||
$('button[data-cmd="cancel"]', box).onclick = () => confirm(false);
|
||||
$('a[data-cmd="ok"]', box).focus();
|
||||
$('a[data-cmd="ok"]', box).onclick = () => confirm(true); event.preventDefault();
|
||||
$('a[data-cmd="cancel"]', box).onclick = () => confirm(false); event.preventDefault();
|
||||
$('.iconUI a[data-cmd="ok"]', box).focus();
|
||||
$('a[data-cmd="ok"]', box).onclick = () => confirm(true);
|
||||
$('a[data-cmd="cancel"]', box).onclick = () => confirm(false);
|
||||
window.onkeydown = event => {
|
||||
const keyCode = event.keyCode || event.which;
|
||||
if (!event.shiftKey && !event.ctrlKey && !event.altKey && !event.metaKey
|
||||
|
@ -543,7 +536,7 @@ function handleDelete(id) {
|
|||
}
|
||||
|
||||
var reverseZebra = $('.entry:last-child:nth-of-type(odd)') !== null;
|
||||
$('#installed').classList.toggle('reverse-stripe', reverseZebra);
|
||||
installed.classList.toggle('reverse-stripe', reverseZebra);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user