From 918debe1105eae6b61159dcf4d6b7d48c9ebc9ad Mon Sep 17 00:00:00 2001 From: tophf Date: Fri, 24 Aug 2018 14:02:31 +0300 Subject: [PATCH 01/29] fix show-more in old UI and simplify generation of targets --- manage/manage.js | 64 +++++++++++++++--------------------------------- 1 file changed, 20 insertions(+), 44 deletions(-) diff --git a/manage/manage.js b/manage/manage.js index 3354d4d7..4e14f62f 100644 --- a/manage/manage.js +++ b/manage/manage.js @@ -153,17 +153,16 @@ function showStyles(styles = [], matchUrlIds) { filterAndAppend({container: renderBin}).then(sorter.updateStripes); if (index < sorted.length) { requestAnimationFrame(renderStyles); - if (firstRun) setTimeout(recreateStyleTargets, 0, {styles, iconsOnly: true}); + if (firstRun) setTimeout(getFaviconImgSrc); firstRun = false; return; } - if (newUI.enabled && newUI.favicons) { - setTimeout(recreateStyleTargets, 0, {iconsOnly: true}); - } - if ('scrollY' in (history.state || {}) && !sessionStorage.justEditedStyleId) { + setTimeout(getFaviconImgSrc); + if (sessionStorage.justEditedStyleId) { + highlightEditedStyle(); + } else if ('scrollY' in (history.state || {})) { setTimeout(window.scrollTo, 0, 0, history.state.scrollY); } - highlightEditedStyle(); } } @@ -238,10 +237,10 @@ function createStyleElement({style, name}) { } -function createStyleTargetsElement({entry, style, iconsOnly}) { +function createStyleTargetsElement({entry, style}) { const parts = createStyleElement.parts; const entryTargets = $('.targets', entry); - const targets = iconsOnly ? entryTargets : parts.targets.cloneNode(true); + const targets = parts.targets.cloneNode(true); let container = targets; let numTargets = 0; const displayed = new Set(); @@ -252,23 +251,21 @@ function createStyleTargetsElement({entry, style, iconsOnly}) { continue; } displayed.add(targetValue); - const element = iconsOnly ? targets.children[numTargets] : template.appliesToTarget.cloneNode(true); + const element = template.appliesToTarget.cloneNode(true); if (!newUI.enabled) { if (numTargets === 10) { container = container.appendChild(template.extraAppliesTo.cloneNode(true)); - } else if (numTargets > 1) { + } else if (numTargets > 0) { container.appendChild(template.appliesToSeparator.cloneNode(true)); } } - if (!iconsOnly) { - element.dataset.type = type; - element.appendChild( - document.createTextNode( - (parts.decorations[type + 'Before'] || '') + - targetValue + - (parts.decorations[type + 'After'] || ''))); - container.appendChild(element); - } + element.dataset.type = type; + element.appendChild( + document.createTextNode( + (parts.decorations[type + 'Before'] || '') + + targetValue + + (parts.decorations[type + 'After'] || ''))); + container.appendChild(element); numTargets++; } } @@ -279,9 +276,7 @@ function createStyleTargetsElement({entry, style, iconsOnly}) { } } if (numTargets) { - if (!iconsOnly) { - entryTargets.parentElement.replaceChild(targets, entryTargets); - } + entryTargets.parentElement.replaceChild(targets, entryTargets); } else if (!entry.classList.contains('global') || !entryTargets.firstElementChild) { if (entryTargets.firstElementChild) { @@ -293,25 +288,8 @@ function createStyleTargetsElement({entry, style, iconsOnly}) { } -function recreateStyleTargets({styles, iconsOnly = false} = {}) { - Promise.resolve(styles || API.getStyles()).then(styles => { - for (const style of styles) { - const entry = $(ENTRY_ID_PREFIX + style.id); - if (entry) { - createStyleTargetsElement({ - entry, - style, - iconsOnly, - }); - } - } - if (newUI.enabled && newUI.favicons) { - debounce(getFaviconImgSrc); - } - }); -} - function getFaviconImgSrc(container = installed) { + if (!newUI.enabled || !newUI.favicons) return; const regexpRemoveNegativeLookAhead = /(\?!([^)]+\))|\(\?![\w(]+[^)]+[\w|)]+)/g; // replace extra characters & all but the first group entry "(abc|def|ghi)xyz" => abcxyz const regexpReplaceExtraCharacters = /[\\(]|((\|\w+)+\))/g; @@ -557,9 +535,7 @@ function handleUpdate(style, {reason, method} = {}) { animateElement(entry); requestAnimationFrame(() => scrollElementIntoView(entry)); } - if (newUI.enabled && newUI.favicons) { - getFaviconImgSrc(entry); - } + getFaviconImgSrc(entry); function handleToggledOrCodeOnly() { const newStyleMeta = getStyleWithNoCode(style); @@ -673,7 +649,7 @@ function switchUI({styleOnly} = {}) { return; } if (missingFavicons) { - recreateStyleTargets(); + debounce(getFaviconImgSrc); return; } } From 2ac9a9db293a8c17d182cea0bb0bdd2538b66281 Mon Sep 17 00:00:00 2001 From: tophf Date: Fri, 24 Aug 2018 14:31:29 +0300 Subject: [PATCH 02/29] fix headerOnScroll --- edit/source-editor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/edit/source-editor.js b/edit/source-editor.js index c6db55dc..4b91e4f2 100644 --- a/edit/source-editor.js +++ b/edit/source-editor.js @@ -13,7 +13,7 @@ function createSourceEditor(style) { $('#save-button').disabled = true; $('#mozilla-format-container').remove(); $('#save-button').onclick = save; - $('#header').addEventListener('wheel', headerOnScroll, {passive: true}); + $('#header').addEventListener('wheel', headerOnScroll); $('#sections').textContent = ''; $('#sections').appendChild($create('.single-editor')); @@ -340,7 +340,7 @@ function createSourceEditor(style) { } cm.display.scroller.scrollTop += // WheelEvent.DOM_DELTA_LINE - deltaMode === 1 ? deltaY * cm.display.cachedTextHeight : + deltaMode === 1 ? deltaY * cm.defaultTextHeight() : // WheelEvent.DOM_DELTA_PAGE deltaMode === 2 || shiftKey ? Math.sign(deltaY) * cm.display.scroller.clientHeight : // WheelEvent.DOM_DELTA_PIXEL From bfe18e74a42f20a874a4cbc3cc615354c1b6d014 Mon Sep 17 00:00:00 2001 From: tophf Date: Fri, 24 Aug 2018 21:12:22 +0300 Subject: [PATCH 03/29] FF bug workaround: set style element code in page context fixes #461 --- content/apply.js | 46 ++++++++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/content/apply.js b/content/apply.js index addd5d17..4778a0e0 100644 --- a/content/apply.js +++ b/content/apply.js @@ -299,13 +299,19 @@ // HTML document style; also works on HTML-embedded SVG el = document.createElement('style'); } - Object.assign(el, { - id, - type: 'text/css', - textContent: code, - }); + el.id = id; + el.type = 'text/css'; // SVG className is not a string, but an instance of SVGAnimatedString el.classList.add('stylus'); + if (!CHROME && ( + // FF bug workaround, see https://github.com/openstyles/stylus/issues/461 + location.hostname === 'www.barclaycardus.com' || + location.hostname === 'www.icloud.com' + )) { + setContentsInPageContext(el, code); + } else { + el.textContent = code; + } addStyleElement(el); } styleElements.set(id, el); @@ -313,6 +319,18 @@ return el; } + function setContentsInPageContext(el, code) { + const originalId = el.id; + el.id += performance.now(); + // when adding to ROOT we don't want our observer to pop up so we use a DIV wrapper + (document.head || ROOT.appendChild(document.createElement('div'))).appendChild(el); + (document.head || ROOT).appendChild(document.createElement('script')).text = ` + document.currentScript.remove(); + document.getElementById('${el.id}').textContent = ${JSON.stringify(code)};`; + if (!document.head) el.parentNode.remove(); + el.id = originalId; + } + function addStyleElement(newElement) { if (!ROOT) { return; @@ -443,7 +461,6 @@ function initDocRootObserver() { let lastRestorationTime = 0; let restorationCounter = 0; - let scheduledSort = false; let observing = false; let sorting = false; let observer; @@ -504,24 +521,13 @@ return true; } } - function sortStyleElements({force} = {}) { - if (!observing || - !force && scheduledSort) { - return; - } - scheduledSort = false; + function sortStyleElements() { + if (!observing) return; let prevExpected = document.documentElement.lastElementChild; while (prevExpected && isSkippable(prevExpected, true)) { prevExpected = prevExpected.previousElementSibling; } - if (!prevExpected) { - return; - } - if (!CHROME && !force && window !== top) { - requestAnimationFrame(() => sortStyleElements({force: true})); - scheduledSort = true; - return; - } + if (!prevExpected) return; for (const el of styleElements.values()) { if (!isMovable(el)) { continue; From 0dbb55cc0c1cc8021b6adef2bc124e291f6e7e85 Mon Sep 17 00:00:00 2001 From: tophf Date: Sat, 25 Aug 2018 15:10:14 +0300 Subject: [PATCH 04/29] actually copy codemirror.js before patching --- tools/update-libraries.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/update-libraries.js b/tools/update-libraries.js index b67c576f..13c4b126 100644 --- a/tools/update-libraries.js +++ b/tools/update-libraries.js @@ -60,10 +60,7 @@ function updateExisting(lib) { const folderRoot = `${vendorRoot}${folder}`; const entries = fs.readdirSync(folderRoot); entries.forEach(entry => { - // Remove $1 from "CodeMirror$1" in codemirror.js - if (entry === 'codemirror.js') { - renameCodeMirrorVariable(`${folderRoot}/${entry}`); - } else if (entry !== 'README.md' && entry !== 'LICENSE') { + if (entry !== 'README.md' && entry !== 'LICENSE') { // Ignore README.md & LICENSE files const entryPath = `${folderRoot}/${entry}`; try { @@ -72,6 +69,10 @@ function updateExisting(lib) { folders.push(`${folder}/${entry}`); } else { fs.copySync(`${libRoot}${folder}/${entry}`, entryPath); + // Remove $1 from "CodeMirror$1" in codemirror.js + if (entry === 'codemirror.js') { + renameCodeMirrorVariable(entryPath); + } } } } catch (err) { From ea594550a9b38621e5c37d8db9f9b27bf4f73581 Mon Sep 17 00:00:00 2001 From: tophf Date: Sat, 25 Aug 2018 15:11:03 +0300 Subject: [PATCH 05/29] CodeMirror v5.40.0 --- vendor/codemirror/README.md | 2 +- vendor/codemirror/addon/comment/comment.js | 2 +- vendor/codemirror/addon/dialog/dialog.js | 2 +- vendor/codemirror/addon/edit/closebrackets.js | 11 ++--------- vendor/codemirror/addon/edit/matchbrackets.js | 2 +- vendor/codemirror/addon/fold/brace-fold.js | 2 +- vendor/codemirror/addon/fold/comment-fold.js | 2 +- vendor/codemirror/addon/fold/foldcode.js | 2 +- vendor/codemirror/addon/fold/foldgutter.js | 2 +- vendor/codemirror/addon/fold/indent-fold.js | 2 +- vendor/codemirror/addon/hint/css-hint.js | 2 +- vendor/codemirror/addon/hint/show-hint.js | 2 +- vendor/codemirror/addon/lint/css-lint.js | 2 +- vendor/codemirror/addon/lint/json-lint.js | 2 +- vendor/codemirror/addon/lint/lint.js | 2 +- vendor/codemirror/addon/scroll/annotatescrollbar.js | 2 +- vendor/codemirror/addon/search/match-highlighter.js | 2 +- vendor/codemirror/addon/search/matchesonscrollbar.js | 2 +- vendor/codemirror/addon/search/searchcursor.js | 2 +- vendor/codemirror/addon/selection/active-line.js | 2 +- vendor/codemirror/keymap/emacs.js | 2 +- vendor/codemirror/keymap/sublime.js | 2 +- vendor/codemirror/keymap/vim.js | 2 +- vendor/codemirror/lib/codemirror.js | 12 +++++++++--- vendor/codemirror/mode/css/css.js | 2 +- vendor/codemirror/mode/javascript/javascript.js | 2 +- vendor/codemirror/mode/stylus/stylus.js | 2 +- 27 files changed, 36 insertions(+), 37 deletions(-) diff --git a/vendor/codemirror/README.md b/vendor/codemirror/README.md index fa8c98cf..f526c657 100644 --- a/vendor/codemirror/README.md +++ b/vendor/codemirror/README.md @@ -1,3 +1,3 @@ -## CodeMirror v5.39.2 +## CodeMirror v5.40.0 Only files & folders that exist in the `vendor/codemirror` folder are copied from the `node_modules/codemirror` folder. Except all theme files are copied, in case new themes have been added. diff --git a/vendor/codemirror/addon/comment/comment.js b/vendor/codemirror/addon/comment/comment.js index 84c67edf..8394e85a 100644 --- a/vendor/codemirror/addon/comment/comment.js +++ b/vendor/codemirror/addon/comment/comment.js @@ -1,5 +1,5 @@ // CodeMirror, copyright (c) by Marijn Haverbeke and others -// Distributed under an MIT license: http://codemirror.net/LICENSE +// Distributed under an MIT license: https://codemirror.net/LICENSE (function(mod) { if (typeof exports == "object" && typeof module == "object") // CommonJS diff --git a/vendor/codemirror/addon/dialog/dialog.js b/vendor/codemirror/addon/dialog/dialog.js index f61e4476..23b06a83 100644 --- a/vendor/codemirror/addon/dialog/dialog.js +++ b/vendor/codemirror/addon/dialog/dialog.js @@ -1,5 +1,5 @@ // CodeMirror, copyright (c) by Marijn Haverbeke and others -// Distributed under an MIT license: http://codemirror.net/LICENSE +// Distributed under an MIT license: https://codemirror.net/LICENSE // Open simple dialogs on top of an editor. Relies on dialog.css. diff --git a/vendor/codemirror/addon/edit/closebrackets.js b/vendor/codemirror/addon/edit/closebrackets.js index 86b2fe1c..ce1a4ac6 100644 --- a/vendor/codemirror/addon/edit/closebrackets.js +++ b/vendor/codemirror/addon/edit/closebrackets.js @@ -1,5 +1,5 @@ // CodeMirror, copyright (c) by Marijn Haverbeke and others -// Distributed under an MIT license: http://codemirror.net/LICENSE +// Distributed under an MIT license: https://codemirror.net/LICENSE (function(mod) { if (typeof exports == "object" && typeof module == "object") // CommonJS @@ -136,9 +136,7 @@ var prev = cur.ch == 0 ? " " : cm.getRange(Pos(cur.line, cur.ch - 1), cur) if (!CodeMirror.isWordChar(next) && prev != ch && !CodeMirror.isWordChar(prev)) curType = "both"; else return CodeMirror.Pass; - } else if (opening && (cm.getLine(cur.line).length == cur.ch || - isClosingBracket(next, pairs) || - /\s/.test(next))) { + } else if (opening) { curType = "both"; } else { return CodeMirror.Pass; @@ -175,11 +173,6 @@ }); } - function isClosingBracket(ch, pairs) { - var pos = pairs.lastIndexOf(ch); - return pos > -1 && pos % 2 == 1; - } - function charsAround(cm, pos) { var str = cm.getRange(Pos(pos.line, pos.ch - 1), Pos(pos.line, pos.ch + 1)); diff --git a/vendor/codemirror/addon/edit/matchbrackets.js b/vendor/codemirror/addon/edit/matchbrackets.js index c9851bda..c918c3f9 100644 --- a/vendor/codemirror/addon/edit/matchbrackets.js +++ b/vendor/codemirror/addon/edit/matchbrackets.js @@ -1,5 +1,5 @@ // CodeMirror, copyright (c) by Marijn Haverbeke and others -// Distributed under an MIT license: http://codemirror.net/LICENSE +// Distributed under an MIT license: https://codemirror.net/LICENSE (function(mod) { if (typeof exports == "object" && typeof module == "object") // CommonJS diff --git a/vendor/codemirror/addon/fold/brace-fold.js b/vendor/codemirror/addon/fold/brace-fold.js index 13c0f0cd..c420c02a 100644 --- a/vendor/codemirror/addon/fold/brace-fold.js +++ b/vendor/codemirror/addon/fold/brace-fold.js @@ -1,5 +1,5 @@ // CodeMirror, copyright (c) by Marijn Haverbeke and others -// Distributed under an MIT license: http://codemirror.net/LICENSE +// Distributed under an MIT license: https://codemirror.net/LICENSE (function(mod) { if (typeof exports == "object" && typeof module == "object") // CommonJS diff --git a/vendor/codemirror/addon/fold/comment-fold.js b/vendor/codemirror/addon/fold/comment-fold.js index e8d800eb..836101d8 100644 --- a/vendor/codemirror/addon/fold/comment-fold.js +++ b/vendor/codemirror/addon/fold/comment-fold.js @@ -1,5 +1,5 @@ // CodeMirror, copyright (c) by Marijn Haverbeke and others -// Distributed under an MIT license: http://codemirror.net/LICENSE +// Distributed under an MIT license: https://codemirror.net/LICENSE (function(mod) { if (typeof exports == "object" && typeof module == "object") // CommonJS diff --git a/vendor/codemirror/addon/fold/foldcode.js b/vendor/codemirror/addon/fold/foldcode.js index 826766b6..e146fb9f 100644 --- a/vendor/codemirror/addon/fold/foldcode.js +++ b/vendor/codemirror/addon/fold/foldcode.js @@ -1,5 +1,5 @@ // CodeMirror, copyright (c) by Marijn Haverbeke and others -// Distributed under an MIT license: http://codemirror.net/LICENSE +// Distributed under an MIT license: https://codemirror.net/LICENSE (function(mod) { if (typeof exports == "object" && typeof module == "object") // CommonJS diff --git a/vendor/codemirror/addon/fold/foldgutter.js b/vendor/codemirror/addon/fold/foldgutter.js index 9d323265..988c67c4 100644 --- a/vendor/codemirror/addon/fold/foldgutter.js +++ b/vendor/codemirror/addon/fold/foldgutter.js @@ -1,5 +1,5 @@ // CodeMirror, copyright (c) by Marijn Haverbeke and others -// Distributed under an MIT license: http://codemirror.net/LICENSE +// Distributed under an MIT license: https://codemirror.net/LICENSE (function(mod) { if (typeof exports == "object" && typeof module == "object") // CommonJS diff --git a/vendor/codemirror/addon/fold/indent-fold.js b/vendor/codemirror/addon/fold/indent-fold.js index f93edec2..0cc11264 100644 --- a/vendor/codemirror/addon/fold/indent-fold.js +++ b/vendor/codemirror/addon/fold/indent-fold.js @@ -1,5 +1,5 @@ // CodeMirror, copyright (c) by Marijn Haverbeke and others -// Distributed under an MIT license: http://codemirror.net/LICENSE +// Distributed under an MIT license: https://codemirror.net/LICENSE (function(mod) { if (typeof exports == "object" && typeof module == "object") // CommonJS diff --git a/vendor/codemirror/addon/hint/css-hint.js b/vendor/codemirror/addon/hint/css-hint.js index 22642727..6cdf7281 100644 --- a/vendor/codemirror/addon/hint/css-hint.js +++ b/vendor/codemirror/addon/hint/css-hint.js @@ -1,5 +1,5 @@ // CodeMirror, copyright (c) by Marijn Haverbeke and others -// Distributed under an MIT license: http://codemirror.net/LICENSE +// Distributed under an MIT license: https://codemirror.net/LICENSE (function(mod) { if (typeof exports == "object" && typeof module == "object") // CommonJS diff --git a/vendor/codemirror/addon/hint/show-hint.js b/vendor/codemirror/addon/hint/show-hint.js index 26dc0f00..5f6664b3 100644 --- a/vendor/codemirror/addon/hint/show-hint.js +++ b/vendor/codemirror/addon/hint/show-hint.js @@ -1,5 +1,5 @@ // CodeMirror, copyright (c) by Marijn Haverbeke and others -// Distributed under an MIT license: http://codemirror.net/LICENSE +// Distributed under an MIT license: https://codemirror.net/LICENSE (function(mod) { if (typeof exports == "object" && typeof module == "object") // CommonJS diff --git a/vendor/codemirror/addon/lint/css-lint.js b/vendor/codemirror/addon/lint/css-lint.js index 135d031a..6058a73e 100644 --- a/vendor/codemirror/addon/lint/css-lint.js +++ b/vendor/codemirror/addon/lint/css-lint.js @@ -1,5 +1,5 @@ // CodeMirror, copyright (c) by Marijn Haverbeke and others -// Distributed under an MIT license: http://codemirror.net/LICENSE +// Distributed under an MIT license: https://codemirror.net/LICENSE // Depends on csslint.js from https://github.com/stubbornella/csslint diff --git a/vendor/codemirror/addon/lint/json-lint.js b/vendor/codemirror/addon/lint/json-lint.js index 63e70c45..ac1d6ec2 100644 --- a/vendor/codemirror/addon/lint/json-lint.js +++ b/vendor/codemirror/addon/lint/json-lint.js @@ -1,5 +1,5 @@ // CodeMirror, copyright (c) by Marijn Haverbeke and others -// Distributed under an MIT license: http://codemirror.net/LICENSE +// Distributed under an MIT license: https://codemirror.net/LICENSE // Depends on jsonlint.js from https://github.com/zaach/jsonlint diff --git a/vendor/codemirror/addon/lint/lint.js b/vendor/codemirror/addon/lint/lint.js index e00e77a2..aa75ba0e 100644 --- a/vendor/codemirror/addon/lint/lint.js +++ b/vendor/codemirror/addon/lint/lint.js @@ -1,5 +1,5 @@ // CodeMirror, copyright (c) by Marijn Haverbeke and others -// Distributed under an MIT license: http://codemirror.net/LICENSE +// Distributed under an MIT license: https://codemirror.net/LICENSE (function(mod) { if (typeof exports == "object" && typeof module == "object") // CommonJS diff --git a/vendor/codemirror/addon/scroll/annotatescrollbar.js b/vendor/codemirror/addon/scroll/annotatescrollbar.js index f2276fc7..35662581 100644 --- a/vendor/codemirror/addon/scroll/annotatescrollbar.js +++ b/vendor/codemirror/addon/scroll/annotatescrollbar.js @@ -1,5 +1,5 @@ // CodeMirror, copyright (c) by Marijn Haverbeke and others -// Distributed under an MIT license: http://codemirror.net/LICENSE +// Distributed under an MIT license: https://codemirror.net/LICENSE (function(mod) { if (typeof exports == "object" && typeof module == "object") // CommonJS diff --git a/vendor/codemirror/addon/search/match-highlighter.js b/vendor/codemirror/addon/search/match-highlighter.js index 260cdeb2..b344ac79 100644 --- a/vendor/codemirror/addon/search/match-highlighter.js +++ b/vendor/codemirror/addon/search/match-highlighter.js @@ -1,5 +1,5 @@ // CodeMirror, copyright (c) by Marijn Haverbeke and others -// Distributed under an MIT license: http://codemirror.net/LICENSE +// Distributed under an MIT license: https://codemirror.net/LICENSE // Highlighting text that matches the selection // diff --git a/vendor/codemirror/addon/search/matchesonscrollbar.js b/vendor/codemirror/addon/search/matchesonscrollbar.js index 8d192289..4645f5eb 100644 --- a/vendor/codemirror/addon/search/matchesonscrollbar.js +++ b/vendor/codemirror/addon/search/matchesonscrollbar.js @@ -1,5 +1,5 @@ // CodeMirror, copyright (c) by Marijn Haverbeke and others -// Distributed under an MIT license: http://codemirror.net/LICENSE +// Distributed under an MIT license: https://codemirror.net/LICENSE (function(mod) { if (typeof exports == "object" && typeof module == "object") // CommonJS diff --git a/vendor/codemirror/addon/search/searchcursor.js b/vendor/codemirror/addon/search/searchcursor.js index e606c5e7..aae36dfe 100644 --- a/vendor/codemirror/addon/search/searchcursor.js +++ b/vendor/codemirror/addon/search/searchcursor.js @@ -1,5 +1,5 @@ // CodeMirror, copyright (c) by Marijn Haverbeke and others -// Distributed under an MIT license: http://codemirror.net/LICENSE +// Distributed under an MIT license: https://codemirror.net/LICENSE (function(mod) { if (typeof exports == "object" && typeof module == "object") // CommonJS diff --git a/vendor/codemirror/addon/selection/active-line.js b/vendor/codemirror/addon/selection/active-line.js index aa295d0d..c7b14ce0 100644 --- a/vendor/codemirror/addon/selection/active-line.js +++ b/vendor/codemirror/addon/selection/active-line.js @@ -1,5 +1,5 @@ // CodeMirror, copyright (c) by Marijn Haverbeke and others -// Distributed under an MIT license: http://codemirror.net/LICENSE +// Distributed under an MIT license: https://codemirror.net/LICENSE (function(mod) { if (typeof exports == "object" && typeof module == "object") // CommonJS diff --git a/vendor/codemirror/keymap/emacs.js b/vendor/codemirror/keymap/emacs.js index f7c51b81..d96a6fbe 100644 --- a/vendor/codemirror/keymap/emacs.js +++ b/vendor/codemirror/keymap/emacs.js @@ -1,5 +1,5 @@ // CodeMirror, copyright (c) by Marijn Haverbeke and others -// Distributed under an MIT license: http://codemirror.net/LICENSE +// Distributed under an MIT license: https://codemirror.net/LICENSE (function(mod) { if (typeof exports == "object" && typeof module == "object") // CommonJS diff --git a/vendor/codemirror/keymap/sublime.js b/vendor/codemirror/keymap/sublime.js index aa9b65e3..b4799fd6 100644 --- a/vendor/codemirror/keymap/sublime.js +++ b/vendor/codemirror/keymap/sublime.js @@ -1,5 +1,5 @@ // CodeMirror, copyright (c) by Marijn Haverbeke and others -// Distributed under an MIT license: http://codemirror.net/LICENSE +// Distributed under an MIT license: https://codemirror.net/LICENSE // A rough approximation of Sublime Text's keybindings // Depends on addon/search/searchcursor.js and optionally addon/dialog/dialogs.js diff --git a/vendor/codemirror/keymap/vim.js b/vendor/codemirror/keymap/vim.js index ef79585f..b03c1393 100644 --- a/vendor/codemirror/keymap/vim.js +++ b/vendor/codemirror/keymap/vim.js @@ -1,5 +1,5 @@ // CodeMirror, copyright (c) by Marijn Haverbeke and others -// Distributed under an MIT license: http://codemirror.net/LICENSE +// Distributed under an MIT license: https://codemirror.net/LICENSE /** * Supported keybindings: diff --git a/vendor/codemirror/lib/codemirror.js b/vendor/codemirror/lib/codemirror.js index c36613fb..96ec6c5f 100644 --- a/vendor/codemirror/lib/codemirror.js +++ b/vendor/codemirror/lib/codemirror.js @@ -1,7 +1,7 @@ // CodeMirror, copyright (c) by Marijn Haverbeke and others -// Distributed under an MIT license: http://codemirror.net/LICENSE +// Distributed under an MIT license: https://codemirror.net/LICENSE -// This is CodeMirror (http://codemirror.net), a code editor +// This is CodeMirror (https://codemirror.net), a code editor // implemented in JavaScript on top of the browser's DOM. // // You can find some technical background for some of the code below @@ -7734,6 +7734,7 @@ function defineOptions(CodeMirror) { option("tabindex", null, function (cm, val) { return cm.display.input.getField().tabIndex = val || ""; }); option("autofocus", null); option("direction", "ltr", function (cm, val) { return cm.doc.setDirection(val); }, true); + option("phrases", null); } function guttersChanged(cm) { @@ -8572,6 +8573,11 @@ var addEditorMethods = function(CodeMirror) { return old }), + phrase: function(phraseText) { + var phrases = this.options.phrases; + return phrases && Object.prototype.hasOwnProperty.call(phrases, phraseText) ? phrases[phraseText] : phraseText + }, + getInputField: function(){return this.display.input.getField()}, getWrapperElement: function(){return this.display.wrapper}, getScrollerElement: function(){return this.display.scroller}, @@ -9689,7 +9695,7 @@ CodeMirror.fromTextArea = fromTextArea; addLegacyProps(CodeMirror); -CodeMirror.version = "5.39.2"; +CodeMirror.version = "5.40.0"; return CodeMirror; diff --git a/vendor/codemirror/mode/css/css.js b/vendor/codemirror/mode/css/css.js index f5f3a41b..8b572290 100644 --- a/vendor/codemirror/mode/css/css.js +++ b/vendor/codemirror/mode/css/css.js @@ -1,5 +1,5 @@ // CodeMirror, copyright (c) by Marijn Haverbeke and others -// Distributed under an MIT license: http://codemirror.net/LICENSE +// Distributed under an MIT license: https://codemirror.net/LICENSE (function(mod) { if (typeof exports == "object" && typeof module == "object") // CommonJS diff --git a/vendor/codemirror/mode/javascript/javascript.js b/vendor/codemirror/mode/javascript/javascript.js index ba27c5d0..a31ffff8 100644 --- a/vendor/codemirror/mode/javascript/javascript.js +++ b/vendor/codemirror/mode/javascript/javascript.js @@ -1,5 +1,5 @@ // CodeMirror, copyright (c) by Marijn Haverbeke and others -// Distributed under an MIT license: http://codemirror.net/LICENSE +// Distributed under an MIT license: https://codemirror.net/LICENSE (function(mod) { if (typeof exports == "object" && typeof module == "object") // CommonJS diff --git a/vendor/codemirror/mode/stylus/stylus.js b/vendor/codemirror/mode/stylus/stylus.js index a9f50c05..dbe241d6 100644 --- a/vendor/codemirror/mode/stylus/stylus.js +++ b/vendor/codemirror/mode/stylus/stylus.js @@ -1,5 +1,5 @@ // CodeMirror, copyright (c) by Marijn Haverbeke and others -// Distributed under an MIT license: http://codemirror.net/LICENSE +// Distributed under an MIT license: https://codemirror.net/LICENSE // Stylus mode created by Dmitry Kiselyov http://git.io/AaRB From 6f53d20491b1765faf409c6be60759b65a63bed9 Mon Sep 17 00:00:00 2001 From: tophf Date: Sat, 25 Aug 2018 15:11:14 +0300 Subject: [PATCH 06/29] update package.json --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 086870d2..e4b9cc8d 100644 --- a/package.json +++ b/package.json @@ -6,9 +6,9 @@ "repository": "openstyles/stylus", "author": "Stylus Team", "devDependencies": { - "archiver": "^2.1.1", - "codemirror": "^5.39.2", - "eslint": "^5.3.0", + "archiver": "^3.0.0", + "codemirror": "^5.40.0", + "eslint": "^5.4.0", "fs-extra": "^7.0.0", "jsonlint": "^1.6.3", "less": "^3.8.1", @@ -17,7 +17,7 @@ "semver-bundle": "^0.1.1", "stylelint-bundle": "^8.0.0", "stylus-lang-bundle": "^0.54.5", - "updates": "^4.1.2" + "updates": "^4.2.1" }, "scripts": { "lint": "eslint **/*.js || true", From 687dba8adbdf5b3e4a1630cff787990eff945834 Mon Sep 17 00:00:00 2001 From: tophf Date: Sat, 25 Aug 2018 19:50:45 +0300 Subject: [PATCH 07/29] typo --- _locales/en/messages.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index a7ea1fb4..0e9e5938 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -1185,7 +1185,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 in .", + "message": "In Firefox 60 and newer you'll also have to remove AMO domain from in .", "description": "Note in the popup when opened on addons.mozilla.org in Firefox >= 59" }, "unreachableAMOHintOldFF": { From f09380af769c37b0d08d5540a5c73a46751874d9 Mon Sep 17 00:00:00 2001 From: tophf Date: Sat, 25 Aug 2018 20:25:15 +0300 Subject: [PATCH 08/29] update locales --- _locales/en_GB/messages.json | 12 ------ _locales/et/messages.json | 9 +++++ _locales/fr/messages.json | 3 ++ _locales/ja/messages.json | 6 +++ _locales/pl/messages.json | 3 ++ _locales/pt_PT/messages.json | 3 ++ _locales/ro/messages.json | 45 ++++++++++++++++++++++ _locales/sv/messages.json | 72 ++++++++++++++++++++++++++++++++++++ _locales/zh_CN/messages.json | 3 ++ 9 files changed, 144 insertions(+), 12 deletions(-) diff --git a/_locales/en_GB/messages.json b/_locales/en_GB/messages.json index e9463d20..9765b9cc 100644 --- a/_locales/en_GB/messages.json +++ b/_locales/en_GB/messages.json @@ -2,9 +2,6 @@ "appliesRemoveError": { "message": "Cannot remove last 'applies to' entry" }, - "applyAllUpdates": { - "message": "Apply all updates" - }, "checkAllUpdatesForce": { "message": "Check again—I didn't edit any styles!" }, @@ -20,18 +17,9 @@ "colorpickerTooltip": { "message": "Open colour picker" }, - "confirmDiscardChanges": { - "message": "Discard the changes?" - }, - "deleteStyleConfirm": { - "message": "Are you sure you want to delete this style?" - }, "description": { "message": "Redesign the web with Stylus, a user-style manager. Stylus allows you to easily install themes and skins for many popular sites." }, - "dragDropMessage": { - "message": "Drop your backup file anywhere on this page to import." - }, "editGotoLine": { "message": "Go to line (or line:col)" }, diff --git a/_locales/et/messages.json b/_locales/et/messages.json index 8ea5e8db..2dcc4f3a 100644 --- a/_locales/et/messages.json +++ b/_locales/et/messages.json @@ -394,6 +394,9 @@ "installUpdateFromLabel": { "message": "Kontrolli uuendusi" }, + "installUpdateUnavailable": { + "message": "Uuenduste kontrollimise lubamiseks lohista failid kaartide ribale või määratle stiili metaandmetes @updateURL." + }, "license": { "message": "Litsents" }, @@ -406,6 +409,9 @@ "linkStylusWiki": { "message": "Viki" }, + "linkTranslate": { + "message": "Tõlgi" + }, "linterCSSLintIncompatible": { "message": "CSSLint ei toeta eeltöötlejat $preprocessorname$", "placeholders": { @@ -968,6 +974,9 @@ "updatesCurrentlyInstalled": { "message": "Uuendused paigaldatud:" }, + "usercssAvoidOverwriting": { + "message": "Olemasoleva stiili ülekirjutamise vältimiseks palun muuda @name või @namespace väärtused." + }, "usercssConfigIncomplete": { "message": "Stiili uuendati või eemaldati pärast seadistusdialoogi kuvamist. Neid muutujaid ei salvestatud, et vältida stiili metaandmete korrumpeerumist:" }, diff --git a/_locales/fr/messages.json b/_locales/fr/messages.json index 98f00654..af1f43dd 100644 --- a/_locales/fr/messages.json +++ b/_locales/fr/messages.json @@ -962,6 +962,9 @@ "updatesCurrentlyInstalled": { "message": "Mises à jour installées :" }, + "usercssAvoidOverwriting": { + "message": "Veuillez changer la valeur de @name ou @namespace afin d'éviter d'écraser un style pré-existant." + }, "usercssConfigIncomplete": { "message": "Le style a été mis à jour ou supprimer après l’apparition du dialogue de confirmation. Ces variables n’ont pas été sauvegardées pour éviter de corrompre les métadonnées du style :" }, diff --git a/_locales/ja/messages.json b/_locales/ja/messages.json index 06b66b69..f371bd53 100644 --- a/_locales/ja/messages.json +++ b/_locales/ja/messages.json @@ -406,6 +406,9 @@ "linkGetStyles": { "message": "スタイルを取得" }, + "linkStylusWiki": { + "message": "ウィキ" + }, "linkTranslate": { "message": "翻訳" }, @@ -971,6 +974,9 @@ "updatesCurrentlyInstalled": { "message": "更新がインストールされました:" }, + "usercssAvoidOverwriting": { + "message": "既存のスタイルの上書きを避けるために、@name または @namespace の値を変更してください。" + }, "usercssConfigIncomplete": { "message": "設定ダイアログの表示後に、スタイルが更新または削除されました。スタイルのメタデータの破損を避けるため、これらの変数は保存されませんでした:" }, diff --git a/_locales/pl/messages.json b/_locales/pl/messages.json index c28f44ae..867f11d2 100644 --- a/_locales/pl/messages.json +++ b/_locales/pl/messages.json @@ -980,6 +980,9 @@ "updatesCurrentlyInstalled": { "message": "Zainstalowane aktualizacje:" }, + "usercssAvoidOverwriting": { + "message": "Proszę zmienić wartość @name lub @namespace, aby uniknąć nadpisania istniejącego stylu." + }, "usercssConfigIncomplete": { "message": "Styl został zaktualizowany lub usunięty po wyświetleniu okna dialogowego konfiguracji. Te zmienne nie zostały zapisane, aby uniknąć uszkodzenia metadanych stylu:" }, diff --git a/_locales/pt_PT/messages.json b/_locales/pt_PT/messages.json index 784a2d36..bd6ef471 100644 --- a/_locales/pt_PT/messages.json +++ b/_locales/pt_PT/messages.json @@ -962,6 +962,9 @@ "updatesCurrentlyInstalled": { "message": "Atualizações instaladas:" }, + "usercssAvoidOverwriting": { + "message": "Por favor modifique o valor de @name ou @namespace para evitar sobrescrever um estilo existente." + }, "usercssConfigIncomplete": { "message": "O estilo foi atualizado ou eliminado após a exibição do diálogo de configuração. Essas variáveis não foram guardadas para evitar corromper os metadados do estilo:" }, diff --git a/_locales/ro/messages.json b/_locales/ro/messages.json index e28cfda9..25923945 100644 --- a/_locales/ro/messages.json +++ b/_locales/ro/messages.json @@ -106,6 +106,12 @@ "cm_resizeGripHint": { "message": "Dublu click pentru a maximiza sau restaura înălțimea" }, + "cm_selectByTokens": { + "message": "Dublu-click pentru a selecta simbolurile" + }, + "cm_selectByTokensTooltip": { + "message": "Exemple de simboluri: .foo-bar-2 #aabbcc 0.32 !important\nCand inactiv: cuvinte delimitate cu punctuatie sunt selectate." + }, "cm_smartIndent": { "message": "Folosiți indentare inteligentă" }, @@ -236,6 +242,12 @@ "findStylesInlineTooltip": { "message": "Arătați rezultatele căutării în această pagină." }, + "genericAdd": { + "message": "Adaugă" + }, + "genericClone": { + "message": "Clonează" + }, "genericDisabledLabel": { "message": "Dezactivat" }, @@ -340,6 +352,9 @@ "installUpdateFromLabel": { "message": "Verificați update-urile" }, + "installUpdateUnavailable": { + "message": "Pentru a activa verificarea de updates. trage fișierul pe taburi (zona cu titluri) sau specifica @updateURL în metadata temei." + }, "license": { "message": "Licență" }, @@ -349,6 +364,9 @@ "linkGetStyles": { "message": "Căutați teme" }, + "linkTranslate": { + "message": "Traduce" + }, "linterCSSLintIncompatible": { "message": "CSSLint nu suportă preprocesorul $preprocessorname$ ", "placeholders": { @@ -394,6 +412,12 @@ "liveReloadError": { "message": "A avut loc o eroare în timpul monitorizării acestui fișier" }, + "liveReloadInstallHint": { + "message": "Reload automat este activat deci tema instalată va fi updatată automat când acest tab si fișierul surca sunt deschise." + }, + "liveReloadUnavailable": { + "message": "Pentru a activa live reload (refresh automat), trage fișierul pe taburi (zona unde titlurile temelor sunt afișate) " + }, "manageFavicons": { "message": "Favicons în coloana 'se aplică la'" }, @@ -469,6 +493,9 @@ "optionsAdvancedExposeIframes": { "message": "Expuneți iframes via HTML[stylus-iframe]" }, + "optionsAdvancedExposeIframesNote": { + "message": "Expune domain-ul site-ului in fiecare iframe.\nActivează scrierea de CSS specific pentru iframe precum:\nhtml[stylus-iframe$=\"twitter.com\"] h1 { display:none }" + }, "optionsAdvancedNewStyleAsUsercss": { "message": "Scrieți temă nouă în formatul usercss" }, @@ -568,6 +595,9 @@ "prefShowBadge": { "message": "Numărul de teme active pentru site-ul curent" }, + "previewTooltip": { + "message": "Aplică temporar modificările fără a salva.\nSalvează tema pentru a face schimbările permanente." + }, "replace": { "message": "Înlocuiți" }, @@ -622,6 +652,9 @@ "sectionRemove": { "message": "Ștergeți secțiunea" }, + "sectionRestore": { + "message": "Restaurează o secțiune ștearsă" + }, "shortcutsNote": { "message": "Creeați keyboard shortcuts" }, @@ -655,6 +688,9 @@ "styleBeautifyIndentConditional": { "message": "Indentare @media, @supports" }, + "styleBeautifyPreserveNewlines": { + "message": "Menține linii noi" + }, "styleCancelEditLabel": { "message": "Înapoi la manager" }, @@ -810,6 +846,9 @@ "unreachableAMOHint": { "message": "Pentru a permite accesul deschideți , right-click pe listă, click 'New', apoi 'Boolean', paste și click OK, , OK, reâncărcați pagina ." }, + "unreachableAMOHintNewFF": { + "message": "În Firefox 60+ va trebui sa fie șters domain-ul AMO din din ." + }, "unreachableAMOHintOldFF": { "message": "Doar Firefox 59 sau mai nou poate fi configurat să permită WebExtension-urilor să adauge elemente la site-uri CSP-protected precum acesta." }, @@ -860,6 +899,9 @@ "updatesCurrentlyInstalled": { "message": "Update-uri instalate:" }, + "usercssAvoidOverwriting": { + "message": "Vă rugăm să modificați valoarea @name și @namespace pentru a împiedica scrierea peste o temă existentă." + }, "usercssConfigIncomplete": { "message": "Tema a fost updatată sau ștearsă după ce configurațiile au fost afișate. Aceste variabile nu au fost salvate pentru a nu corupe metadata temei." }, @@ -872,6 +914,9 @@ "usercssReplaceTemplateName": { "message": "@name este gol și înlocuiețte valoarea de bază" }, + "usercssReplaceTemplateSectionBody": { + "message": "Introduce cod aici..." + }, "versionInvalidOlder": { "message": "Versiunea este mai veche decât cea instalată." }, diff --git a/_locales/sv/messages.json b/_locales/sv/messages.json index 713e1713..2a3ae884 100644 --- a/_locales/sv/messages.json +++ b/_locales/sv/messages.json @@ -5,6 +5,9 @@ "addStyleTitle": { "message": "Lägg till stil" }, + "alphaChannel": { + "message": "Opacitet" + }, "appliesAdd": { "message": "Lägg till" }, @@ -46,6 +49,9 @@ "applyAllUpdates": { "message": "Verkställ alla uppdateringar" }, + "bckpInstStyles": { + "message": "Exportera stilar" + }, "checkAllUpdates": { "message": "Sök efter uppdateringar" }, @@ -129,9 +135,15 @@ "externalUsercssDocument": { "message": "Dokumentation för Usercss" }, + "findStyles": { + "message": "Hitta stilar" + }, "findStylesForSite": { "message": "Hitta fler stilar för denna sida" }, + "genericAdd": { + "message": "Lägg till" + }, "genericDisabledLabel": { "message": "Inaktiverad" }, @@ -141,6 +153,15 @@ "genericHistoryLabel": { "message": "Historik" }, + "genericNext": { + "message": "Nästa" + }, + "genericPrevious": { + "message": "Föregående" + }, + "genericResetLabel": { + "message": "Återställ" + }, "helpAlt": { "message": "Hjälp" }, @@ -165,6 +186,18 @@ "linkGetStyles": { "message": "Skaffa stilar" }, + "linkTranslate": { + "message": "Översätt" + }, + "manageFavicons": { + "message": "Ikoner i 'Gäller för' kolumnen" + }, + "manageFaviconsGray": { + "message": "Nedtonade" + }, + "manageFaviconsHelp": { + "message": "Stylus använder en extern tjänst https://www.google.com/s2/favicons" + }, "manageFilters": { "message": "Filter" }, @@ -201,12 +234,39 @@ "openManage": { "message": "Hantera installerade stilar" }, + "openOptionsPopup": { + "message": "Alternativ" + }, + "openStylesManager": { + "message": "Öppna stilhanteraren" + }, "optionsAdvancedNewStyleAsUsercss": { "message": "Skriv ny stil som Usercss" }, + "optionsCheck": { + "message": "Uppdatera stilar" + }, + "optionsCheckUpdate": { + "message": "Leta efter och installera alla tillgängliga uppdateringar" + }, "optionsHeading": { "message": "Alternativ" }, + "optionsOpenManager": { + "message": "Hantera stilar" + }, + "optionsReset": { + "message": "Återställ alternativen till standard" + }, + "optionsResetButton": { + "message": "Återställ alternativ" + }, + "paginationNext": { + "message": "Nästa sida" + }, + "paginationPrevious": { + "message": "Föregående sida" + }, "popupStylesFirst": { "message": "Lista stilar före kommandon i verktygsfältets knappmeny" }, @@ -222,6 +282,9 @@ "replaceWith": { "message": "Ersätt med" }, + "retrieveBckp": { + "message": "Importera stilar" + }, "search": { "message": "Sök" }, @@ -243,6 +306,15 @@ "sectionRemove": { "message": "Ta bort sektion" }, + "sectionRestore": { + "message": "Återställ borttagen sektion" + }, + "shortcuts": { + "message": "Genvägar" + }, + "shortcutsNote": { + "message": "Ställ in tangentbordsgenvägar" + }, "styleBadRegexp": { "message": "Regexp:en är ogiltig" }, diff --git a/_locales/zh_CN/messages.json b/_locales/zh_CN/messages.json index b3cfab78..94eabd6f 100644 --- a/_locales/zh_CN/messages.json +++ b/_locales/zh_CN/messages.json @@ -703,6 +703,9 @@ "sectionRemove": { "message": "删除此部分" }, + "sectionRestore": { + "message": "撤销删除" + }, "shortcuts": { "message": "快捷键" }, From f07e1b269e89083af6e37d9cf23a46a88f9e6859 Mon Sep 17 00:00:00 2001 From: tophf Date: Mon, 27 Aug 2018 17:13:03 +0300 Subject: [PATCH 09/29] don't wrap the force-check button * the label text is too long and contains meaningful info * it's displayed only rarely in normal usage scenario --- manage/manage.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/manage/manage.css b/manage/manage.css index 8b08795c..479330f5 100644 --- a/manage/manage.css +++ b/manage/manage.css @@ -71,6 +71,11 @@ a:hover { max-width: calc(100% - 30px); } +#check-all-updates-force { + white-space: normal; + text-align: left; +} + #header h1 { margin-top: 0; margin-bottom: .3em; From 699b5453fb9a94d5f03baa5b171a553505ff511d Mon Sep 17 00:00:00 2001 From: tophf Date: Mon, 27 Aug 2018 17:18:41 +0300 Subject: [PATCH 10/29] emphasize data-skipped-edited main status message thus visually separating it from the wall of text afterwards --- manage/manage.css | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/manage/manage.css b/manage/manage.css index 479330f5..a997d781 100644 --- a/manage/manage.css +++ b/manage/manage.css @@ -822,6 +822,15 @@ input[id^="manage.newUI"] { margin-top: 1ex; } +#update-all-no-updates[data-skipped-edited="true"] { + font-weight: bold; +} + +#update-all-no-updates[data-skipped-edited="true"]::after { + font-weight: normal; + display: block; +} + /* highlight updated/added styles */ .highlight { animation: highlight 10s cubic-bezier(0,.82,.47,.98); From 95524df6f471b1b7a273b3d28226906703df5502 Mon Sep 17 00:00:00 2001 From: tophf Date: Mon, 27 Aug 2018 17:20:33 +0300 Subject: [PATCH 11/29] code cosmetics: use :: for pseudo elements --- manage/manage.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manage/manage.js b/manage/manage.js index 4e14f62f..7313a34f 100644 --- a/manage/manage.js +++ b/manage/manage.js @@ -106,10 +106,10 @@ function initGlobalEvents() { .disabled h2::after { content: "${t('genericDisabledLabel')}"; } - #update-all-no-updates[data-skipped-edited="true"]:after { + #update-all-no-updates[data-skipped-edited="true"]::after { content: " ${t('updateAllCheckSucceededSomeEdited')}"; } - body.all-styles-hidden-by-filters:after { + body.all-styles-hidden-by-filters::after { content: "${t('filteredStylesAllHidden')}"; } `)); From 2fdfd96699a4caf15887ec1063517dd246bd4b1e Mon Sep 17 00:00:00 2001 From: tophf Date: Mon, 27 Aug 2018 20:17:36 +0300 Subject: [PATCH 12/29] use the new originalDigest in update UI ...when force-updating a locally edited style that turned out to be equal to the remote one fixes #482 --- background/update.js | 13 ++++++++----- js/sections-equal.js | 21 +++++++++++++++++++-- manage/updater-ui.js | 10 ++++++++++ 3 files changed, 37 insertions(+), 7 deletions(-) diff --git a/background/update.js b/background/update.js index 3f35283d..a8d185ca 100644 --- a/background/update.js +++ b/background/update.js @@ -153,9 +153,8 @@ global API_METHODS case 0: // re-install is invalid in a soft upgrade if (!ignoreDigest) { - return Promise.reject(STATES.SAME_VERSION); - } else if (text === style.sourceCode) { - return Promise.reject(STATES.SAME_CODE); + const sameCode = text === style.sourceCode; + return Promise.reject(sameCode ? STATES.SAME_CODE : STATES.SAME_VERSION); } break; case 1: @@ -188,8 +187,12 @@ global API_METHODS if (styleSectionsEqual(json, style)) { // update digest even if save === false as there might be just a space added etc. - saveStyle(Object.assign(json, {reason: 'update-digest'})); - return Promise.reject(STATES.SAME_CODE); + json.reason = 'update-digest'; + return saveStyle(json) + .then(saved => { + style.originalDigest = saved.originalDigest; + return Promise.reject(STATES.SAME_CODE); + }); } if (!style.originalDigest && !ignoreDigest) { diff --git a/js/sections-equal.js b/js/sections-equal.js index 0f05f504..9244ab68 100644 --- a/js/sections-equal.js +++ b/js/sections-equal.js @@ -1,7 +1,24 @@ 'use strict'; -// ignoreCode=true is used by invalidateCache to determine if cached filters should be cleared -function styleSectionsEqual({sections: a}, {sections: b}, {ignoreCode = false} = {}) { +/** + * @param {Style} a - first style object + * @param {Style} b - second style object + * @param {Object} options + * @param {Boolean=} options.ignoreCode - + * true used by invalidateCache to determine if cached filters should be cleared + * @param {Boolean=} options.checkSource - + * true used by update check to compare the server response + * instead of sections that depend on @preprocessor + * @returns {Boolean|undefined} + */ +function styleSectionsEqual(a, b, {ignoreCode, checkSource} = {}) { + if (!checkSource && + typeof a.sourceCode === 'string' && + typeof b.sourceCode === 'string') { + return a.sourceCode === b.sourceCode; + } + a = a.sections; + b = b.sections; if (!a || !b) { return undefined; } diff --git a/manage/updater-ui.js b/manage/updater-ui.js index 4eaca65d..46a197c9 100644 --- a/manage/updater-ui.js +++ b/manage/updater-ui.js @@ -155,6 +155,16 @@ function reportUpdateState({updated, style, error, STATES}) { $('.update-note', entry).textContent = message; $('.check-update', entry).title = newUI.enabled ? message : ''; $('.update', entry).title = t(edited ? 'updateCheckManualUpdateForce' : 'installUpdate'); + // digest may change silently when forcing an update of a locally edited style + // so we need to update it in entry's styleMeta in all open manager tabs + if (error === STATES.SAME_CODE) { + for (const view of chrome.extension.getViews({type: 'tab'})) { + if (view.location.pathname === location.pathname) { + const entry = view.$(ENTRY_ID_PREFIX + style.id); + if (entry) entry.styleMeta.originalDigest = style.originalDigest; + } + } + } if (!isCheckAll) { renderUpdatesOnlyFilter({show: $('.can-update, .update-problem')}); } From af77b55eea016757edef9844f4ea90592aecb32c Mon Sep 17 00:00:00 2001 From: tophf Date: Mon, 27 Aug 2018 20:42:17 +0300 Subject: [PATCH 13/29] fixup 2fdfd966 #482 --- background/update.js | 2 +- js/sections-equal.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/background/update.js b/background/update.js index a8d185ca..8426035e 100644 --- a/background/update.js +++ b/background/update.js @@ -185,7 +185,7 @@ global API_METHODS json.originalName = json.name; } - if (styleSectionsEqual(json, style)) { + if (styleSectionsEqual(json, style, {checkSource: true})) { // update digest even if save === false as there might be just a space added etc. json.reason = 'update-digest'; return saveStyle(json) diff --git a/js/sections-equal.js b/js/sections-equal.js index 9244ab68..d01c4bfe 100644 --- a/js/sections-equal.js +++ b/js/sections-equal.js @@ -12,7 +12,7 @@ * @returns {Boolean|undefined} */ function styleSectionsEqual(a, b, {ignoreCode, checkSource} = {}) { - if (!checkSource && + if (checkSource && typeof a.sourceCode === 'string' && typeof b.sourceCode === 'string') { return a.sourceCode === b.sourceCode; From 8cf05ee18520afc6dfb7357d967c96e63d34b8ae Mon Sep 17 00:00:00 2001 From: tophf Date: Tue, 28 Aug 2018 19:58:51 +0300 Subject: [PATCH 14/29] make the hover effect less CPU-hungry * it lagged even on a fast 4GHz i7 CPU + nVidia GPU * the 'will-change' property didn't help and even increased memory consumption --- manage/manage.css | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/manage/manage.css b/manage/manage.css index a997d781..eb037482 100644 --- a/manage/manage.css +++ b/manage/manage.css @@ -479,7 +479,7 @@ a:hover { cursor: pointer; } -.newUI .entry .style-name::before { +.newUI .entry .style-name:hover::before { content: ""; position: absolute; top: 0; @@ -488,13 +488,6 @@ a:hover { bottom: 0; background: linear-gradient(to right, hsla(180, 50%, 30%, 0.2), hsla(180, 20%, 10%, 0.05) 50%, transparent); pointer-events: none; - opacity: 0; - transition: opacity .1s; - will-change: opacity; -} - -.newUI .entry .style-name:hover::before { - opacity: 1; } .newUI .entry.enabled .style-name:hover .style-name-link { From 681176ce31554bee9f606d391ac72d6793fbdb6b Mon Sep 17 00:00:00 2001 From: tophf Date: Wed, 29 Aug 2018 15:39:18 +0300 Subject: [PATCH 15/29] use showHelp.close when it's defined fixes #485 --- edit/beautify.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/edit/beautify.js b/edit/beautify.js index 32220bde..50ef5553 100644 --- a/edit/beautify.js +++ b/edit/beautify.js @@ -40,7 +40,8 @@ function beautify(event) { $create('.buttons', [ $create('button', { attributes: {role: 'close'}, - onclick: showHelp.close, + // showHelp.close will be defined after showHelp() is invoked + onclick: () => showHelp.close(), }, t('confirmClose')), $create('button', { attributes: {role: 'undo'}, From 4f8953adde7c86b457dee61cb9369409591c3533 Mon Sep 17 00:00:00 2001 From: tophf Date: Thu, 30 Aug 2018 09:23:55 +0300 Subject: [PATCH 16/29] refresh the just edited style entry after history back --- manage/manage.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/manage/manage.js b/manage/manage.js index 7313a34f..01b005f8 100644 --- a/manage/manage.js +++ b/manage/manage.js @@ -658,8 +658,15 @@ function switchUI({styleOnly} = {}) { function onVisibilityChange() { switch (document.visibilityState) { // page restored without reloading via history navigation (currently only in FF) + // the catch here is that DOM may be outdated so we'll at least refresh the just edited style + // assuming other changes aren't important enough to justify making a complicated DOM sync case 'visible': - highlightEditedStyle(); + if (sessionStorage.justEditedStyleId) { + API.getStyles({id: sessionStorage.justEditedStyleId}).then(([style]) => { + handleUpdate(style, {method: 'styleUpdated'}); + }); + delete sessionStorage.justEditedStyleId; + } break; // going away case 'hidden': From 5933cf3586b1c0667a44ba08018a7e66e3cdb3a6 Mon Sep 17 00:00:00 2001 From: tophf Date: Thu, 30 Aug 2018 13:41:26 +0300 Subject: [PATCH 17/29] CSSLint: add Q unit https://www.w3.org/TR/css-values-3/#absolute-lengths --- vendor-overwrites/csslint/parserlib.js | 1 + 1 file changed, 1 insertion(+) diff --git a/vendor-overwrites/csslint/parserlib.js b/vendor-overwrites/csslint/parserlib.js index 89b2ce4f..03762f92 100644 --- a/vendor-overwrites/csslint/parserlib.js +++ b/vendor-overwrites/csslint/parserlib.js @@ -59,6 +59,7 @@ self.parserlib = (() => { vmax: 'length', vmin: 'length', fr: 'length', + q: 'length', deg: 'angle', rad: 'angle', From c49f4dd11ed77526794bac83d3ac3b7902f9e4ff Mon Sep 17 00:00:00 2001 From: tophf Date: Mon, 3 Sep 2018 20:47:45 +0300 Subject: [PATCH 18/29] don't hook auxiliary CMs fixes #491 --- edit/codemirror-editing-hooks.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/edit/codemirror-editing-hooks.js b/edit/codemirror-editing-hooks.js index 4297eb05..31d0ce5d 100644 --- a/edit/codemirror-editing-hooks.js +++ b/edit/codemirror-editing-hooks.js @@ -43,6 +43,9 @@ onDOMscriptReady('/codemirror.js').then(() => { }); CodeMirror.defineInitHook(cm => { + if (!cm.display.wrapper.closest('#sections')) { + return; + } if (prefs.get('editor.livePreview') && styleId) { cm.on('changes', updatePreview); } From 3ba92016632854487ba92dbdd22857501e70f252 Mon Sep 17 00:00:00 2001 From: tophf Date: Mon, 3 Sep 2018 20:50:13 +0300 Subject: [PATCH 19/29] hyphenate long tokens in unreachableAMO message --- popup/popup.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/popup/popup.js b/popup/popup.js index 5db20042..30a3d4a1 100644 --- a/popup/popup.js +++ b/popup/popup.js @@ -129,7 +129,7 @@ function initPopup() { $('label', info).textContent = t('unreachableAMO'); const note = (FIREFOX < 59 ? t('unreachableAMOHintOldFF') : t('unreachableAMOHint')) + (FIREFOX < 60 ? '' : '\n' + t('unreachableAMOHintNewFF')); - const renderToken = s => s[0] === '<' ? $create('b', s.slice(1, -1)) : s; + const renderToken = s => s[0] === '<' ? $create('b', tWordBreak(s.slice(1, -1))) : s; const renderLine = line => $create('p', line.split(/(<.*?>)/).map(renderToken)); const noteNode = $create('fragment', note.split('\n').map(renderLine)); const target = $('p', info); From 79f6e7c3b3cf257a88337c54b9b0c72de7f12744 Mon Sep 17 00:00:00 2001 From: tophf Date: Tue, 4 Sep 2018 00:36:24 +0300 Subject: [PATCH 20/29] rename OK to Close in the import notification to disambiguate its actual function --- manage/import-export.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manage/import-export.js b/manage/import-export.js index 9ab538ce..935f5901 100644 --- a/manage/import-export.js +++ b/manage/import-export.js @@ -203,7 +203,7 @@ function importFromString(jsonString, oldStyles) { messageBox({ title: t('importReportTitle'), contents: report.length ? report : t('importReportUnchanged'), - buttons: [t('confirmOK'), numChanged && t('undo')], + buttons: [t('confirmClose'), numChanged && t('undo')], onshow: bindClick, }).then(({button}) => { if (button === 1) { @@ -241,7 +241,7 @@ function importFromString(jsonString, oldStyles) { .then(() => messageBox({ title: t('importReportUndoneTitle'), contents: newIds.length + ' ' + t('importReportUndone'), - buttons: [t('confirmOK')], + buttons: [t('confirmClose')], })); } From 74eb7c7ecda076874f151f90ef8d7b0fd9559277 Mon Sep 17 00:00:00 2001 From: tophf Date: Tue, 4 Sep 2018 21:08:53 +0300 Subject: [PATCH 21/29] CSSLint: add conic-gradient https://www.w3.org/TR/css-images-4/#gradients --- vendor-overwrites/csslint/parserlib.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor-overwrites/csslint/parserlib.js b/vendor-overwrites/csslint/parserlib.js index 03762f92..6e3a24e5 100644 --- a/vendor-overwrites/csslint/parserlib.js +++ b/vendor-overwrites/csslint/parserlib.js @@ -757,7 +757,7 @@ self.parserlib = (() => { '': part => part.type === 'function' && - /^(?:-(?:ms|moz|o|webkit)-)?(?:repeating-)?(?:radial-|linear-)?gradient/i.test(part), + /^(?:-(?:ms|moz|o|webkit)-)?(?:repeating-)?(?:radial-|linear-|conic-)?gradient/i.test(part), //eslint-disable-next-line no-use-before-define '': part => part.tokenType === Tokens.HASH, From dcdb4be10bf8d0b902a7775fefaa2ceafdd60d8b Mon Sep 17 00:00:00 2001 From: tophf Date: Wed, 5 Sep 2018 15:58:15 +0300 Subject: [PATCH 22/29] FF59+: always set style's textContent in page context see #461 --- content/apply.js | 56 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 40 insertions(+), 16 deletions(-) diff --git a/content/apply.js b/content/apply.js index 4778a0e0..c332fc11 100644 --- a/content/apply.js +++ b/content/apply.js @@ -18,6 +18,13 @@ var docRewriteObserver; var docRootObserver; + // FF59+ bug workaround + // See https://github.com/openstyles/stylus/issues/461 + // Since it's easy to spoof the browser version in pre-Quantum FF we're checking + // for getPreventDefault which got removed in FF59 https://bugzil.la/691151 + const FF_BUG461 = !CHROME && !isOwnPage && !Event.prototype.getPreventDefault; + const pageContextQueue = []; + requestStyles(); chrome.runtime.onMessage.addListener(applyOnMessage); window.applyOnMessage = applyOnMessage; @@ -262,6 +269,10 @@ docRootObserver.firstStart(); } + if (FF_BUG461 && (gotNewStyles || styles.needTransitionPatch)) { + setContentsInPageContext(); + } + if (!isOwnPage && !docRewriteObserver && styleElements.size) { initDocRewriteObserver(); } @@ -284,6 +295,8 @@ // workaround for Chrome devtools bug fixed in v65 el.remove(); el = null; + } else if (FF_BUG461) { + pageContextQueue.push({id: el.id, el, code}); } else { el.textContent = code; } @@ -303,12 +316,8 @@ el.type = 'text/css'; // SVG className is not a string, but an instance of SVGAnimatedString el.classList.add('stylus'); - if (!CHROME && ( - // FF bug workaround, see https://github.com/openstyles/stylus/issues/461 - location.hostname === 'www.barclaycardus.com' || - location.hostname === 'www.icloud.com' - )) { - setContentsInPageContext(el, code); + if (FF_BUG461) { + pageContextQueue.push({id: el.id, el, code}); } else { el.textContent = code; } @@ -319,16 +328,31 @@ return el; } - function setContentsInPageContext(el, code) { - const originalId = el.id; - el.id += performance.now(); - // when adding to ROOT we don't want our observer to pop up so we use a DIV wrapper - (document.head || ROOT.appendChild(document.createElement('div'))).appendChild(el); - (document.head || ROOT).appendChild(document.createElement('script')).text = ` - document.currentScript.remove(); - document.getElementById('${el.id}').textContent = ${JSON.stringify(code)};`; - if (!document.head) el.parentNode.remove(); - el.id = originalId; + function setContentsInPageContext() { + try { + (document.head || ROOT).appendChild(document.createElement('script')).text = ` + document.currentScript.remove(); + for (const {id, code} of ${JSON.stringify(pageContextQueue)}) { + ( + document.getElementById(id) || + document.querySelector('style.stylus[id="' + id + '"]') || + {} + ).textContent = code; + } + `; + } catch (e) {} + let failedSome; + for (const {el, code} of pageContextQueue) { + if (el.textContent !== code) { + el.textContent = code; + failedSome = true; + } + } + if (failedSome) { + console.debug('Could not set code of some styles in page context, ' + + 'see https://github.com/openstyles/stylus/issues/461'); + } + pageContextQueue.length = 0; } function addStyleElement(newElement) { From c57fef7b1e616a077c82cde883a3ade188a8ac16 Mon Sep 17 00:00:00 2001 From: tophf Date: Thu, 6 Sep 2018 19:05:10 +0300 Subject: [PATCH 23/29] suppress focus outline when invoked via mouse fixes #495 --- js/dom.js | 2 ++ msgbox/msgbox.js | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/js/dom.js b/js/dom.js index 1034542b..495cff8f 100644 --- a/js/dom.js +++ b/js/dom.js @@ -329,6 +329,7 @@ function focusAccessibility() { if (focusables.includes(el.localName)) { if (el.dataset.focusedViaClick === undefined) { el.dataset.focusedViaClick = ''; + focusAccessibility.lastFocusedViaClick = true; } return; } @@ -337,6 +338,7 @@ function focusAccessibility() { function keepOutlineOnTab(event) { if (event.which === 9) { + focusAccessibility.lastFocusedViaClick = false; setTimeout(keepOutlineOnTab, 0, true); return; } else if (event !== true) { diff --git a/msgbox/msgbox.js b/msgbox/msgbox.js index 7a6ba81e..1a236c41 100644 --- a/msgbox/msgbox.js +++ b/msgbox/msgbox.js @@ -36,6 +36,10 @@ function messageBox({ messageBox.originalFocus = document.activeElement; moveFocus(messageBox.element, 1); + if (focusAccessibility.lastFocusedViaClick && document.activeElement) { + document.activeElement.dataset.focusedViaClick = ''; + } + if (typeof onshow === 'function') { onshow(messageBox.element); } From 373fe5f510606005454d9e439c7bd142da481b6a Mon Sep 17 00:00:00 2001 From: tophf Date: Thu, 6 Sep 2018 19:08:56 +0300 Subject: [PATCH 24/29] code cosmetics --- js/dom.js | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/js/dom.js b/js/dom.js index 495cff8f..a19b637a 100644 --- a/js/dom.js +++ b/js/dom.js @@ -313,20 +313,30 @@ function initCollapsibles({bindClickOn = 'h2'} = {}) { } } - +// Makes the focus outline appear on keyboard tabbing, but not on mouse clicks. function focusAccessibility() { - // Makes the focus outline appear on keyboard tabbing, but not on mouse clicks. - // Since we don't want full layout recalc, we modify only the closest focusable element, - // which we try to find in DOM for this many parentElement jumps: - const focusables = focusAccessibility.ELEMENTS = - ['a', 'button', 'input', 'textarea', 'label', 'select', 'summary']; + // last event's focusedViaClick + focusAccessibility.lastFocusedViaClick = false; + // tags of focusable elements; + // to avoid a full layout recalc we modify the closest one + focusAccessibility.ELEMENTS = [ + 'a', + 'button', + 'input', + 'textarea', + 'label', + 'select', + 'summary', + ]; + // try to find a focusable parent for this many parentElement jumps: const GIVE_UP_DEPTH = 4; + addEventListener('mousedown', suppressOutlineOnClick, {passive: true}); addEventListener('keydown', keepOutlineOnTab, {passive: true}); function suppressOutlineOnClick({target}) { for (let el = target, i = 0; el && i++ < GIVE_UP_DEPTH; el = el.parentElement) { - if (focusables.includes(el.localName)) { + if (focusAccessibility.ELEMENTS.includes(el.localName)) { if (el.dataset.focusedViaClick === undefined) { el.dataset.focusedViaClick = ''; focusAccessibility.lastFocusedViaClick = true; @@ -345,7 +355,7 @@ function focusAccessibility() { return; } let el = document.activeElement; - if (!el || !focusables.includes(el.localName)) { + if (!el || !focusAccessibility.ELEMENTS.includes(el.localName)) { return; } if (el.dataset.focusedViaClick !== undefined) { From 26d7c2677069ff0fdef28d288aea32a0c0de237f Mon Sep 17 00:00:00 2001 From: tophf Date: Thu, 6 Sep 2018 19:33:10 +0300 Subject: [PATCH 25/29] notify embedder on closing colorpicker fixup 7fea2cfc: messageBox's Esc handler wasn't restored --- vendor-overwrites/colorpicker/colorpicker.js | 21 ++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/vendor-overwrites/colorpicker/colorpicker.js b/vendor-overwrites/colorpicker/colorpicker.js index 2617b5e9..38f4af75 100644 --- a/vendor-overwrites/colorpicker/colorpicker.js +++ b/vendor-overwrites/colorpicker/colorpicker.js @@ -222,11 +222,9 @@ } } - function hide({notify = true} = {}) { + function hide() { if (shown) { - if (notify) { - colorpickerCallback(''); - } + colorpickerCallback(''); unregisterEvents(); focusNoScroll(prevFocusedElement); $root.remove(); @@ -623,7 +621,7 @@ case 27: e.preventDefault(); e.stopPropagation(); - hide({notify: false}); + hide(); break; } } @@ -643,17 +641,20 @@ //region Event utilities function colorpickerCallback(colorString = currentColorToString()) { - // Esc pressed? - if (!colorString) { + const isCallable = typeof options.callback === 'function'; + // hiding + if (!colorString && isCallable) { options.callback(''); + return; } if ( userActivity && - $inputs[currentFormat].every(el => el.checkValidity()) && - typeof options.callback === 'function' + $inputs[currentFormat].every(el => el.checkValidity()) ) { lastOutputColor = colorString.replace(/\b0\./g, '.'); - options.callback(lastOutputColor); + if (isCallable) { + options.callback(lastOutputColor); + } } } From 4a877ad27b6f3314e0a8f96bdfa2faaf27169771 Mon Sep 17 00:00:00 2001 From: tophf Date: Thu, 6 Sep 2018 20:42:48 +0300 Subject: [PATCH 26/29] fixup c57fef7b: always set lastFocusedViaClick #495 --- js/dom.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/dom.js b/js/dom.js index a19b637a..825d1e78 100644 --- a/js/dom.js +++ b/js/dom.js @@ -337,9 +337,9 @@ function focusAccessibility() { function suppressOutlineOnClick({target}) { for (let el = target, i = 0; el && i++ < GIVE_UP_DEPTH; el = el.parentElement) { if (focusAccessibility.ELEMENTS.includes(el.localName)) { + focusAccessibility.lastFocusedViaClick = true; if (el.dataset.focusedViaClick === undefined) { el.dataset.focusedViaClick = ''; - focusAccessibility.lastFocusedViaClick = true; } return; } From b90f7bfce51c308b7965f8f44d7b066227e8f24a Mon Sep 17 00:00:00 2001 From: tophf Date: Thu, 6 Sep 2018 20:59:04 +0300 Subject: [PATCH 27/29] don't autofocus external links like feedback #495 --- js/dom.js | 7 ++++++- msgbox/msgbox.js | 5 +++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/js/dom.js b/js/dom.js index 825d1e78..c956d729 100644 --- a/js/dom.js +++ b/js/dom.js @@ -372,18 +372,23 @@ function focusAccessibility() { * Switches to the next/previous keyboard-focusable element * @param {HTMLElement} rootElement * @param {Number} step - for exmaple 1 or -1 + * @returns {HTMLElement|false|undefined} - + * HTMLElement: focus changed, + * false: focus unchanged, + * undefined: nothing to focus */ function moveFocus(rootElement, step) { const elements = [...rootElement.getElementsByTagName('*')]; const activeIndex = Math.max(0, elements.indexOf(document.activeElement)); const num = elements.length; + const {activeElement} = document; for (let i = 1; i < num; i++) { const elementIndex = (activeIndex + i * step + num) % num; // we don't use positive tabindex so we stop at any valid value const el = elements[elementIndex]; if (!el.disabled && el.tabIndex >= 0) { el.focus(); - return; + return activeElement !== el && el; } } } diff --git a/msgbox/msgbox.js b/msgbox/msgbox.js index 1a236c41..9d04c143 100644 --- a/msgbox/msgbox.js +++ b/msgbox/msgbox.js @@ -34,8 +34,9 @@ function messageBox({ document.body.appendChild(messageBox.element); messageBox.originalFocus = document.activeElement; - moveFocus(messageBox.element, 1); - + // skip external links like feedback + while ((moveFocus(messageBox.element, 1) || {}).target === '_blank') {/*NOP*/} + // suppress focus outline when invoked via click if (focusAccessibility.lastFocusedViaClick && document.activeElement) { document.activeElement.dataset.focusedViaClick = ''; } From 06425c4e6fb84d57f38e2734c5d1ed02cc05a720 Mon Sep 17 00:00:00 2001 From: tophf Date: Mon, 10 Sep 2018 17:36:00 +0300 Subject: [PATCH 28/29] update locales --- _locales/cs/messages.json | 30 ++ _locales/de/messages.json | 36 +- _locales/es/messages.json | 18 + _locales/et/messages.json | 2 +- _locales/fr/messages.json | 22 +- _locales/he/messages.json | 767 ++++++++++++++++++++++++++++++++++++++ _locales/it/messages.json | 59 ++- _locales/ja/messages.json | 4 +- 8 files changed, 905 insertions(+), 33 deletions(-) create mode 100644 _locales/he/messages.json diff --git a/_locales/cs/messages.json b/_locales/cs/messages.json index 4a7fdc5f..8a6bacaf 100644 --- a/_locales/cs/messages.json +++ b/_locales/cs/messages.json @@ -121,6 +121,12 @@ "cm_resizeGripHint": { "message": "Dvojklikem maximalizujete/obnovíte výšku" }, + "cm_selectByTokens": { + "message": "Poklepáním vybírat tokeny" + }, + "cm_selectByTokensTooltip": { + "message": "Příklad tokenů: .foo-bar-2 #aabbcc 0.32 !important\nJe-li vypnuto, jsou vybírána slova oddělená interpunkcí." + }, "cm_smartIndent": { "message": "Použít chytré odsazení" }, @@ -275,6 +281,12 @@ "findStylesInlineTooltip": { "message": "Zobrazit výsledky vyhledávání v tomto okně." }, + "genericAdd": { + "message": "Přidat" + }, + "genericClone": { + "message": "Duplikovat" + }, "genericDisabledLabel": { "message": "Zakázáno" }, @@ -394,6 +406,9 @@ "linkGetStyles": { "message": "Získat styly" }, + "linkTranslate": { + "message": "Pomoci s překladem" + }, "linterCSSLintIncompatible": { "message": "CSSLint nepodporuje předprocesor $preprocessorname$", "placeholders": { @@ -442,6 +457,9 @@ "liveReloadError": { "message": "Při sledování souboru došlo k chybě" }, + "liveReloadInstallHint": { + "message": "Živá aktualizace je povolena, takže nainstalovaný styl bude automaticky aktualizován při externích změnách, dokud budou tento list a list zdrojového souboru otevřeny." + }, "liveReloadLabel": { "message": "Živá aktualizace" }, @@ -625,6 +643,12 @@ "prefShowBadge": { "message": "Počet aktivních stylů pro současnou stránku" }, + "previewLabel": { + "message": "Živý náhled" + }, + "previewTooltip": { + "message": "Dočasně použije změny bez uložení.\nUložte styl pro trvalé zachování změn." + }, "replace": { "message": "Nahradit" }, @@ -682,6 +706,9 @@ "sectionRemove": { "message": "Odstranit sekci" }, + "sectionRestore": { + "message": "Obnovit odstraněnou sekci" + }, "shortcuts": { "message": "Zkratky" }, @@ -938,6 +965,9 @@ "usercssReplaceTemplateName": { "message": "Prázdné @name nahrazuje výchozí šablonu" }, + "usercssReplaceTemplateSectionBody": { + "message": "Sem vložte kód…" + }, "versionInvalidOlder": { "message": "Tato verze je starší než verze nainstalovaného stylu." }, diff --git a/_locales/de/messages.json b/_locales/de/messages.json index a2a6ff52..8b318046 100644 --- a/_locales/de/messages.json +++ b/_locales/de/messages.json @@ -38,7 +38,7 @@ "message": "Funktioniert nicht mit minified CSS" }, "appliesRegexpOption": { - "message": "URLs, die mit dem Regulären Ausdruck übereinstimmen" + "message": "URLs, die mit der RegExp übereinstimmen" }, "appliesRemove": { "message": "Löschen" @@ -74,7 +74,7 @@ "message": "Nach Updates suchen" }, "checkAllUpdatesForce": { - "message": "Nochmals überprüfen, ich habe keine Styles bearbeitet!" + "message": "Nochmal prüfen, ich habe keine Styles bearbeitet!" }, "checkForUpdate": { "message": "Nach Update suchen" @@ -241,7 +241,7 @@ "message": "zur Supportseite" }, "externalUsercssDocument": { - "message": "Dokumentation für Usercss" + "message": "Dokumentation für UserCSS" }, "filteredStyles": { "message": "$numShown$ von $numTotal$ gesamt", @@ -476,7 +476,7 @@ "message": "Anzahl der \"Gilt für\" Elemente" }, "manageNewStyleAsUsercss": { - "message": "als Usercss" + "message": "als UserCSS" }, "manageNewUI": { "message": "Neues Verwaltungs-Layout" @@ -497,13 +497,13 @@ "message": "(Diese Styles wurden nicht durch userstyles.org installiert)" }, "manageOnlyNonUsercss": { - "message": "Keine Usercss Styles" + "message": "Keine UserCSS Styles" }, "manageOnlyUpdates": { "message": "Nur mit Updates oder Problemen" }, "manageOnlyUsercss": { - "message": "Nur Usercss Styles" + "message": "Nur UserCSS Styles" }, "menuShowBadge": { "message": "Anzahl der aktiven Styles anzeigen" @@ -539,7 +539,7 @@ "message": "Style wirkt sich auch auf iframes der anvisierten Domain aus.\nIframe-spezifisches CSS ist dann möglich wie folgt:\nhtml[stylus-iframe$=\"twitter.com\"] h1 { display:none }" }, "optionsAdvancedNewStyleAsUsercss": { - "message": "Schreibe neuen Style als Usercss" + "message": "Schreibe neuen Style als UserCSS" }, "optionsBadgeDisabled": { "message": "Hintergrundfarbe wenn deaktiviert" @@ -608,7 +608,7 @@ "message": "Gesamtzahl der Seiten" }, "parseUsercssError": { - "message": "Usercss parsen fehlgeschlagen:" + "message": "UserCSS parsen fehlgeschlagen:" }, "popupBorders": { "message": "Weiße Rahmen an den Seiten hinzufügen" @@ -668,7 +668,7 @@ "message": "Trefferanzahl im Code und in \"Gilt für\" Feldern" }, "searchRegexp": { - "message": "Verwende die /re/ Syntax zur Suche als Regulärer Ausdruck" + "message": "Verwende die /re/ Syntax zur Suche als RegExp" }, "searchResultInstallCount": { "message": "Gesamte Installationen" @@ -689,7 +689,7 @@ "message": "Inhalte durchsuchen" }, "searchStylesHelp": { - "message": "Die -Taste (Numpad) fokussiert das Suchfeld.\nEinfacher Text: Sucht im Namen, Quelltext, Homepage und anvisierten URLs. Wörter mit weniger als 3 Buchstaben werden ignoriert.\nStyles, die auf eine URL passen: Stelle der Suche voran, z.B. \nReguläre Ausdrücke: Nutze Slash und Flags, z.B. \nSuche nach genauem Ausdruck: Anführungszeichen verwenden, z.B. <\".header ~ div\"> " + "message": "Die -Taste (Numpad) fokussiert das Suchfeld.\nEinfacher Text: Sucht im Namen, Quelltext, Homepage und anvisierten URLs. Wörter mit weniger als 3 Buchstaben werden ignoriert.\nStyles, die auf eine URL passen: Stelle der Suche voran, z.B. \nRegExp: Nutze Slash und Flags, z.B. \nSuche nach genauem Ausdruck: Anführungszeichen verwenden, z.B. <\".header ~ div\"> " }, "sectionAdd": { "message": "Weiteren Bereich hinzufügen" @@ -731,7 +731,7 @@ "message": "Inhalte sortieren" }, "styleBadRegexp": { - "message": "Regulärer Ausdruck ist ungültig." + "message": "Regulärer Ausdruck (RegExp) ist ungültig." }, "styleBeautify": { "message": "Code formatieren" @@ -821,25 +821,25 @@ "message": "Bitte Namen eingeben" }, "styleNotAppliedRegexpProblemTooltip": { - "message": "Der Style wurde aufgrund ungültiger Regulärer Ausdrücke nicht angewandt." + "message": "Der Style wurde aufgrund ungültiger RegExp nicht angewandt." }, "styleRegexpInvalidExplanation": { - "message": "Einige Regeln der Regulären Ausdrücke konnten nicht überprüft werden." + "message": "Einige RegExp konnten nicht kompiliert werden." }, "styleRegexpPartialExplanation": { - "message": "Dieser Style verwendet teilweise Übereinstimmende Reguläre Ausdrücke unter Missachtung der CSS4 @document Spezifikationen, welche eine vollständig Übereinstimmende URL benötigen. Der betroffene CSS Bereich wurde nicht auf die Website angewandt. Dieser Style wurde wahrscheinlich unter Stylish für Chrome erstellt, in der seit der ersten Version eine inkorrekte Überprüfung der Regulären Ausdrücke vorhanden ist (bekannter Fehler)." + "message": "Dieser Style verwendet nur teilweise übereinstimmende RegExp unter Missachtung der CSS4 @document Spezifikationen, welche eine vollständig übereinstimmende URL benötigen. Die betroffenen CSS-Bereiche wurde nicht auf die Website angewandt. Dieser Style wurde wahrscheinlich unter Stylish für Chrome erstellt, in der seit der ersten Version eine fehlerhafte Überprüfung der RegExp besteht (bekannter Fehler)." }, "styleRegexpProblemTooltip": { - "message": "Anzahl der Bereiche, welche aufgrund nicht korrekt verwendeter Regulärer Ausdrücke nicht angewendet wurden." + "message": "Anzahl der Bereiche, welche aufgrund nicht korrekt verwendeter RegExp nicht angewendet wurden" }, "styleRegexpTestButton": { - "message": "Reguläre Ausdrücke testen" + "message": "RegExp testen" }, "styleRegexpTestFull": { "message": "Zutreffende Tabs" }, "styleRegexpTestInvalid": { - "message": "Ungültige Reguläre Ausdrücke übersprungen" + "message": "Übersprungene ungültige RegExp" }, "styleRegexpTestNone": { "message": "Keine zutreffenden Tabs" @@ -963,7 +963,7 @@ "message": "Gib @name im Code an" }, "usercssReplaceTemplateConfirmation": { - "message": "Ersetze das vorgegebene Template für neue Usercss styles mit dem vorliegenden Code?" + "message": "Ersetze das vorgegebene Template für neue UserCSS styles mit dem vorliegenden Code?" }, "usercssReplaceTemplateName": { "message": "Ein leeres @name ersetzt das vorgegebene Template" diff --git a/_locales/es/messages.json b/_locales/es/messages.json index 12d00dfd..0633c7f1 100644 --- a/_locales/es/messages.json +++ b/_locales/es/messages.json @@ -281,6 +281,9 @@ "genericAdd": { "message": "Agregar" }, + "genericClone": { + "message": "Clonar" + }, "genericDisabledLabel": { "message": "Desactivado" }, @@ -388,6 +391,9 @@ "installUpdateFromLabel": { "message": "Buscar actualizaciones" }, + "installUpdateUnavailable": { + "message": "Para habilitar la búsqueda de actualizaciones, suelte el archivo en la pestaña o especifique @updateURL en los metadatos del estilo." + }, "license": { "message": "Licencia" }, @@ -397,6 +403,9 @@ "linkGetStyles": { "message": "Obtener estilos" }, + "linkTranslate": { + "message": "Traducir" + }, "linterCSSLintIncompatible": { "message": "CSSLint no soporta el preprocesador $preprocessorname$", "placeholders": { @@ -451,6 +460,9 @@ "liveReloadLabel": { "message": "Recarga en tiempo real" }, + "liveReloadUnavailable": { + "message": "Para habilitar la recarga en tiempo real, suelte el archivo en la pestaña (el área donde se muestran los títulos de las pestañas)." + }, "manageFavicons": { "message": "Favicons en la columna 'Se aplica a'" }, @@ -742,6 +754,9 @@ "styleBeautifyIndentConditional": { "message": "Sangrar @media, @supports" }, + "styleBeautifyPreserveNewlines": { + "message": "Conservar nuevas líneas" + }, "styleCancelEditLabel": { "message": "Volver al administrador" }, @@ -956,6 +971,9 @@ "updatesCurrentlyInstalled": { "message": "Actualizaciones instaladas:" }, + "usercssAvoidOverwriting": { + "message": "Por favor, cambie el valor de @name o @namespace para no sobrescribir un estilo existente." + }, "usercssConfigIncomplete": { "message": "El estilo se actualizó o borró después de que se mostrara el cuadro de diálogo de configuración. Estas variables no se guardaron para evitar corromper los metadatos del estilo:" }, diff --git a/_locales/et/messages.json b/_locales/et/messages.json index 2dcc4f3a..13540f79 100644 --- a/_locales/et/messages.json +++ b/_locales/et/messages.json @@ -542,7 +542,7 @@ "message": "Lisa \"Kustuta\" redaktori kontekstmenüüsse" }, "optionsAdvancedExposeIframes": { - "message": "Paljasta iframe-id HTML [stylus-iframe] kaudu" + "message": "Paljasta iframe-id HTML[stylus-iframe] kaudu" }, "optionsAdvancedExposeIframesNote": { "message": "Paljastab tipp-domeeni igas iframe'is.\nVõimaldab iframe'i-põhise CSS-koodi kirjutamise näiteks selliselt:\nhtml[stylus-iframe$=\"twitter.com\"] h1 { display:none }" diff --git a/_locales/fr/messages.json b/_locales/fr/messages.json index af1f43dd..a2c712de 100644 --- a/_locales/fr/messages.json +++ b/_locales/fr/messages.json @@ -44,7 +44,7 @@ "message": "Supprimer" }, "appliesRemoveError": { - "message": "Impossible de supprimer la dernière entrée « s’applique à »" + "message": "Impossible de supprimer la dernière entrée « s’applique à »" }, "appliesSpecify": { "message": "Préciser" @@ -62,7 +62,7 @@ "message": "Auteur" }, "backupButtons": { - "message": "Sauvergarde" + "message": "Sauvegarde" }, "backupMessage": { "message": "Sélectionner un fichier ou le glisser-déposer sur cette page" @@ -74,7 +74,7 @@ "message": "Rechercher des mises à jour pour tous les styles" }, "checkAllUpdatesForce": { - "message": "Vérifiez à nouveau, je n’ai modifié aucun style !" + "message": "Vérifiez à nouveau, je n’ai modifié aucun style !" }, "checkForUpdate": { "message": "Rechercher des mises à jour" @@ -241,7 +241,7 @@ "message": "Activer" }, "exportLabel": { - "message": "Exportez" + "message": "Exporter" }, "externalFeedback": { "message": "Commentaires" @@ -321,7 +321,7 @@ "message": "Aide" }, "helpKeyMapCommand": { - "message": "Tapez un nom de commande" + "message": "Saisissez un nom de commande" }, "helpKeyMapHotkey": { "message": "Pressez un raccourci clavier" @@ -336,10 +336,10 @@ "message": "Importer" }, "importReplaceLabel": { - "message": "Écraser le style" + "message": "Remplacer le style" }, "importReplaceTooltip": { - "message": "Abandonner le contenu du style actuel et l’écraser avec le style importé" + "message": "Abandonner le contenu du style actuel et le remplacer par le style importé" }, "importReportLegendAdded": { "message": "ajouté(s)" @@ -357,7 +357,7 @@ "message": "codes mis à jour" }, "importReportLegendUpdatedMeta": { - "message": "méta-informations mis à jour" + "message": "méta-informations mises à jour" }, "importReportTitle": { "message": "Import des styles terminé" @@ -599,7 +599,7 @@ "message": "Quand vous importez des sauvegardes de style d’une ancienne version ou de Stylish, faites une vérification manuellement pour vous assurez que tous les styles sont à jour." }, "optionsUpdateInterval": { - "message": "Intervalle de mise à jour automatique des Userstyles en heures (spécifier 0 pour désactiver)" + "message": "Intervalle de mise à jour automatique des styles utilisateur en heures (spécifier 0 pour désactiver)" }, "paginationCurrent": { "message": "Page courante" @@ -775,7 +775,7 @@ } }, "styleInstallFailed": { - "message": "Échec de l’installation de l’userstyle\n$error$", + "message": "Échec de l’installation du style utilisateur !\n$error$", "placeholders": { "error": { "content": "$1" @@ -869,7 +869,7 @@ "message": "Enregistrer" }, "styleToMozillaFormatHelp": { - "message": "Le code au format Mozilla peut être utilisé dans Stylish for Firefox et envoyé à userstyles.org." + "message": "Le code au format Mozilla peut être utilisé dans Stylish for Firefox et envoyé à userstyles.org." }, "styleToMozillaFormatTitle": { "message": "Style au format Mozilla" diff --git a/_locales/he/messages.json b/_locales/he/messages.json new file mode 100644 index 00000000..af42eb36 --- /dev/null +++ b/_locales/he/messages.json @@ -0,0 +1,767 @@ +{ + "addStyleLabel": { + "message": "כתוב עיצוב חדש" + }, + "addStyleTitle": { + "message": "הוספת עיצוב" + }, + "alphaChannel": { + "message": "שקיפות" + }, + "appliesAdd": { + "message": "הוספה" + }, + "appliesDisplay": { + "message": "מוחל על: $applies$", + "placeholders": { + "applies": { + "content": "$1" + } + } + }, + "appliesDisplayTruncatedSuffix": { + "message": "עוד" + }, + "appliesDomainOption": { + "message": "קישורים תחת הדומיין" + }, + "appliesLabel": { + "message": "מוחל על" + }, + "appliesLineWidgetLabel": { + "message": "הצג אינפורמציית 'חל על'" + }, + "appliesLineWidgetWarning": { + "message": "לא עובד עם CSS מוקטן (minified)" + }, + "appliesRegexpOption": { + "message": "קישורים התואמים regexp" + }, + "appliesRemove": { + "message": "הסרה" + }, + "appliesRemoveError": { + "message": "לא ניתן להסיר את הערך 'חל על' האחרון" + }, + "appliesSpecify": { + "message": "פרט" + }, + "appliesToEverything": { + "message": "כל האתרים" + }, + "appliesUrlOption": { + "message": "קישור (URL)" + }, + "appliesUrlPrefixOption": { + "message": "קישורים המתחילים ב" + }, + "applyAllUpdates": { + "message": "החל את כל העדכונים" + }, + "author": { + "message": "כותב" + }, + "backupButtons": { + "message": "גיבוי" + }, + "backupMessage": { + "message": "בחר קובץ או גרור ושחרר אותו בדף זה." + }, + "bckpInstStyles": { + "message": "ייצא עיצובים" + }, + "checkAllUpdates": { + "message": "בדוקים עדכונים עבור כל העיצובים" + }, + "checkAllUpdatesForce": { + "message": "בדוק שוב, לא ערכתי אף עיצוב!" + }, + "checkForUpdate": { + "message": "בדוק עדכונים" + }, + "checkingForUpdate": { + "message": "בודק..." + }, + "clickToUninstall": { + "message": "הקלק להסרה" + }, + "cm_autoCloseBrackets": { + "message": "סגור באופן אוטומטי סוגריים וגרשיים" + }, + "cm_autoCloseBracketsTooltip": { + "message": "הוסף סוגר באופן אוטומטי כשמקלידים את אחת מהפותחים של ()[]{}''\"\"" + }, + "cm_autocompleteOnTyping": { + "message": "השלמה אוטומטית בזמן הכתיבה" + }, + "cm_colorpicker": { + "message": "פלטות בחירת צבעים עבור צבעי CSS" + }, + "cm_indentWithTabs": { + "message": "השתמש בטאבים יחד עם הזחה חכמה" + }, + "cm_keyMap": { + "message": "מפת מקשים" + }, + "cm_lineWrapping": { + "message": "עטיפת מילים" + }, + "cm_matchHighlight": { + "message": "הדגש" + }, + "cm_matchHighlightSelection": { + "message": "בחירה בלבד" + }, + "cm_resizeGripHint": { + "message": "דאבל קליק להגדלה מירבית/איפוס הגובה" + }, + "cm_selectByTokens": { + "message": "דאבל קליק בוחר tokens" + }, + "cm_smartIndent": { + "message": "השתמש בהזחה חכמה" + }, + "cm_tabSize": { + "message": "גודל הכרטיסייה" + }, + "cm_theme": { + "message": "ערכת נושא" + }, + "colorpickerTooltip": { + "message": "פתח את פלטת בחירת הצבעים" + }, + "configOnChange": { + "message": "בעת שינוי" + }, + "configOnChangeTooltip": { + "message": "שמור והחל שינויים באופן אוטומטי" + }, + "configureStyle": { + "message": "הגדר" + }, + "configureStyleOnHomepage": { + "message": "הגדר בדף הבית" + }, + "confirmCancel": { + "message": "ביטול" + }, + "confirmClose": { + "message": "סגור" + }, + "confirmDefault": { + "message": "השתמש בברירת מחדל" + }, + "confirmDelete": { + "message": "מחיקה" + }, + "confirmDiscardChanges": { + "message": "למחוק את השינויים?" + }, + "confirmNo": { + "message": "לא" + }, + "confirmOK": { + "message": "אוקיי" + }, + "confirmSave": { + "message": "שמור" + }, + "confirmStop": { + "message": "עצור" + }, + "confirmYes": { + "message": "כן" + }, + "dateInstalled": { + "message": "תאריך התקנה" + }, + "dateUpdated": { + "message": "תאריך עדכון" + }, + "defaultTheme": { + "message": "ברירת מחדל" + }, + "deleteStyleConfirm": { + "message": "האם אתה בטוח שברצונך למחוק עיצוב זה?" + }, + "deleteStyleLabel": { + "message": "מחק" + }, + "disableAllStyles": { + "message": "השבת את כל העיצובים" + }, + "disableStyleLabel": { + "message": "השבת" + }, + "dragDropMessage": { + "message": "שחרר את קובץ הגיבוי שלך בכל מקום בדף זה על־מנת לייבא אותו." + }, + "editDeleteText": { + "message": "מחק" + }, + "editGotoLine": { + "message": "Goto לשורה (או line:col)" + }, + "editStyleHeading": { + "message": "עריכת עיצוב" + }, + "editStyleLabel": { + "message": "עריכה" + }, + "editStyleTitle": { + "message": "עריכת העיצוב $stylename$", + "placeholders": { + "stylename": { + "content": "$1" + } + } + }, + "editorStylesButton": { + "message": "מצא עיצובים לעורך" + }, + "enableStyleLabel": { + "message": "אפשר" + }, + "exportLabel": { + "message": "ייצא" + }, + "externalFeedback": { + "message": "חוות דעת" + }, + "externalHomepage": { + "message": "דף הבית" + }, + "externalLink": { + "message": "קישור חיצוני" + }, + "externalSupport": { + "message": "תמיכה" + }, + "findStyles": { + "message": "מצא עיצובים" + }, + "findStylesInline": { + "message": "מוטבע" + }, + "genericAdd": { + "message": "הוספה" + }, + "genericClone": { + "message": "שכפול" + }, + "genericDisabledLabel": { + "message": "מושבת" + }, + "genericEnabledLabel": { + "message": "מאופשר" + }, + "genericError": { + "message": "שגיאה" + }, + "genericHistoryLabel": { + "message": "היסטוריה" + }, + "genericNext": { + "message": "הבא" + }, + "genericPrevious": { + "message": "הקודם" + }, + "genericResetLabel": { + "message": "איפוס" + }, + "genericSavedMessage": { + "message": "נשמר" + }, + "genericTitle": { + "message": "כותרת" + }, + "genericUnknown": { + "message": "לא ידוע" + }, + "helpAlt": { + "message": "עזרה" + }, + "helpKeyMapCommand": { + "message": "הקלד שם פקודה" + }, + "helpKeyMapHotkey": { + "message": "לחץ על המקש החם" + }, + "importAppendLabel": { + "message": "צרף לעיצוב" + }, + "importAppendTooltip": { + "message": "צרף את העיצוב המיובא לעיצוב הנוכחי" + }, + "importLabel": { + "message": "ייבא" + }, + "importReplaceLabel": { + "message": "דרוס עיצוב" + }, + "importReportLegendAdded": { + "message": "נוספו" + }, + "importReportLegendUpdatedCode": { + "message": "קודים עודכנו" + }, + "importReportLegendUpdatedMeta": { + "message": "מידע meta עודכנו" + }, + "importReportTitle": { + "message": "סיום ייבוא עיצובים" + }, + "importReportUnchanged": { + "message": "שום דבר לא השתנה." + }, + "importReportUndone": { + "message": "עיצובים הוחזרו" + }, + "importReportUndoneTitle": { + "message": "הייבוא בוטל" + }, + "installButton": { + "message": "התקן עיצוב" + }, + "installButtonInstalled": { + "message": "העיצוב הותקן בהצלחה" + }, + "installButtonReinstall": { + "message": "התקן עיצוב מחדש" + }, + "installButtonUpdate": { + "message": "עדכן עיצוב" + }, + "installUpdate": { + "message": "התקן עדכון" + }, + "installUpdateFromLabel": { + "message": "בדוק עדכונים" + }, + "installUpdateUnavailable": { + "message": "על־מנת לאפשר בדיקת עדכונים, אנא שחרר את הקובץ על רצועת הכרטיסיות או ציין @updateURL ב־metadata של העיצוב." + }, + "license": { + "message": "רישיון" + }, + "linkGetHelp": { + "message": "קבל עזרה" + }, + "linkGetStyles": { + "message": "מצא עיצובים" + }, + "linkTranslate": { + "message": "תרגום" + }, + "linterCSSLintSettings": { + "message": "(הגדר כלל כ: 0 = מושבת; 1 = אזהרה; 2 = שגיאה)" + }, + "linterConfigPopupTitle": { + "message": "הגדר $linter$ כללי תצורה", + "placeholders": { + "linter": { + "content": "$1" + } + } + }, + "linterConfigTooltip": { + "message": "לחץ להגדרת linter זה" + }, + "linterIssues": { + "message": "תקלות" + }, + "linterIssuesHelp": { + "message": "התקלות האלו נמצאו על־ידי $link$:", + "placeholders": { + "link": { + "content": "$1" + } + } + }, + "linterJSONError": { + "message": "פורמט JSON לא תקין" + }, + "linterResetMessage": { + "message": "על־מנת לבטל איפוסים לא רצוניים, לחץ Ctrl-Z (או Cmd-Z) בתיבת הטקסט" + }, + "linterRulesLink": { + "message": "ראה רשימת חוקים מלאה" + }, + "liveReloadError": { + "message": "התרחשה שגיאה בזמן הצפייה בקובץ" + }, + "liveReloadLabel": { + "message": "רענון לייב (live)" + }, + "liveReloadUnavailable": { + "message": "על־מנת לאפשר רענון לייב (live), אנא שחרר את הקובץ על רצועת הכרטיסיות (האזור בו כותרות הכרטיסיות מוצגות)." + }, + "manageFavicons": { + "message": "הצגת אייקונים בעמודת 'חל על'" + }, + "manageFaviconsGray": { + "message": "האפרת האייקונים" + }, + "manageFaviconsHelp": { + "message": "Stylus משתמש בשירות חיצוני https://www.google.com/s2/favicons" + }, + "manageFilters": { + "message": "מסננים" + }, + "manageHeading": { + "message": "עיצובים מותקנים" + }, + "manageMaxTargets": { + "message": "מספר הפריטים ה־'מוחלים על'" + }, + "manageNewStyleAsUsercss": { + "message": "כ־Usercss" + }, + "manageOnlyDisabled": { + "message": "רק עיצובים מושבתים" + }, + "manageOnlyEnabled": { + "message": "רק עיצובים מאופשרים" + }, + "manageOnlyExternal": { + "message": "רק עיצובים חיצוניים" + }, + "manageOnlyLocal": { + "message": "רק עיצובים שנוצרו באופן מקומי" + }, + "manageOnlyNonUsercss": { + "message": "רק לא עיצובי Usercss" + }, + "manageOnlyUpdates": { + "message": "רק עם עדכונים או תקלות" + }, + "manageOnlyUsercss": { + "message": "רק עיצובי Usercss" + }, + "menuShowBadge": { + "message": "הצג כמות עיצובים מאופשרים" + }, + "noStylesForSite": { + "message": "לא הותקנו עיצובים עבור אתר זה." + }, + "openManage": { + "message": "ניהול" + }, + "openOptionsManage": { + "message": "אפשרויות UI" + }, + "openOptionsPopup": { + "message": "אפשרויות" + }, + "openStylesManager": { + "message": "פתח את מנהל העיצובים" + }, + "optionsActions": { + "message": "פעולות" + }, + "optionsAdvanced": { + "message": "מתקדם" + }, + "optionsAdvancedContextDelete": { + "message": "הוספת 'מחיקה' בתפריט העורך" + }, + "optionsBadgeDisabled": { + "message": "צבע רקע בעת השבתה" + }, + "optionsBadgeNormal": { + "message": "צבע רקע" + }, + "optionsCheck": { + "message": "עדכן עיצובים" + }, + "optionsCheckUpdate": { + "message": "בדוק והתקן את כל העדכונים הזמינים" + }, + "optionsCustomizeBadge": { + "message": "תג על האייקון בסרגל הכלים" + }, + "optionsCustomizeIcon": { + "message": "אייקון בסרגל הכלים" + }, + "optionsCustomizePopup": { + "message": "חלון קופץ" + }, + "optionsCustomizeUpdate": { + "message": "עדכונים" + }, + "optionsHeading": { + "message": "אפשרויות" + }, + "optionsIconDark": { + "message": "ערכות נושא כהות לדפדפן" + }, + "optionsIconLight": { + "message": "ערכות נושא בהירות לדפדפן" + }, + "optionsOpen": { + "message": "פתח" + }, + "optionsOpenManager": { + "message": "נהל עיצובים" + }, + "optionsPopupWidth": { + "message": "רוחב החלון הקופץ (בפיקסלים)" + }, + "optionsReset": { + "message": "איפוס האפשרויות לערכי ברירת המחדל" + }, + "optionsResetButton": { + "message": "איפוס האפשרויות" + }, + "optionsSubheading": { + "message": "אפשרויות נוספות" + }, + "optionsUpdateInterval": { + "message": "עדכון אוטומטי של Userstyle בשעות (הגדר 0 להשבתה)" + }, + "paginationCurrent": { + "message": "הדף הנוכחי" + }, + "paginationEstimated": { + "message": "מספר דפים משוער" + }, + "paginationNext": { + "message": "הדף הבא" + }, + "paginationPrevious": { + "message": "הדף הקודם" + }, + "paginationTotal": { + "message": "סה״כ דפים" + }, + "popupBorders": { + "message": "הוספת שוליים לבנים בצדדים" + }, + "popupHotkeysTooltip": { + "message": "לחץ על־מנת לצפות במקשים החמים הזמינים" + }, + "popupOpenEditInWindow": { + "message": "פתח את העורך בחלון חדש" + }, + "popupStylesFirst": { + "message": "עיצובים לפני הפקודות" + }, + "prefShowBadge": { + "message": "מֿמספר העיצובים המאופשרים באתר הנוכחי" + }, + "previewLabel": { + "message": "תצוגת לייב (live)" + }, + "previewTooltip": { + "message": "החלת השינויים באופן זמני ללא שמירה.\nשמור את העיצוב על־מנת להפוך את השינויים לקבועים." + }, + "replace": { + "message": "החלף" + }, + "replaceAll": { + "message": "החלף הכל" + }, + "replaceWith": { + "message": "החלף עם" + }, + "retrieveBckp": { + "message": "ייבוא עיצובים" + }, + "search": { + "message": "חיפוש" + }, + "searchCaseSensitive": { + "message": "רגיש לאותיות גדולות/קטנות" + }, + "searchNumberOfResults": { + "message": "מספר ההתאמות" + }, + "searchNumberOfResults2": { + "message": "מספר ההתאמות בקוד ובערכים ה'מוחלים על'" + }, + "searchRegexp": { + "message": "השתמש ב־/re/ לחיפוש באמצעות ביטוי regexp" + }, + "searchResultInstallCount": { + "message": "סה״כ התקנות" + }, + "searchResultNoneFound": { + "message": "לא נמצאו עיצובים לאתר זה." + }, + "searchResultRating": { + "message": "דירוג" + }, + "searchResultUpdated": { + "message": "עודכן" + }, + "searchResultWeeklyCount": { + "message": "התקנות שבועיות" + }, + "sectionRemove": { + "message": "הסר סעיף" + }, + "sectionRestore": { + "message": "שחזר סעיף שהוסר" + }, + "shortcuts": { + "message": "קיצורי מקשים" + }, + "shortcutsNote": { + "message": "הגדר קיצורי מקשים" + }, + "sortDateNewestFirst": { + "message": "החדש ביותר ראשון" + }, + "sortDateOldestFirst": { + "message": "הישן ביותר ראשון" + }, + "sortLabel": { + "message": "בחר שיטת מיון להחלה על העיצובים המותקנים" + }, + "styleBadRegexp": { + "message": "ביטוי ה־Regexp לא תקין." + }, + "styleBeautify": { + "message": "ייפה CSS" + }, + "styleCancelEditLabel": { + "message": "חזרה לניהול" + }, + "styleEnabledLabel": { + "message": "מאופשר" + }, + "styleFromMozillaFormatPrompt": { + "message": "הדבק את הקוד ב־Mozilla-format" + }, + "styleMetaErrorColor": { + "message": "$color$ הוא צבע לא תקין", + "placeholders": { + "color": { + "content": "$1" + } + } + }, + "styleMetaErrorPreprocessor": { + "message": "@preprocessor לא נתמך: $preprocessor$", + "placeholders": { + "preprocessor": { + "content": "$1" + } + } + }, + "styleMetaErrorSelectValueMismatch": { + "message": "הערך @select: לא קיים ברשימה" + }, + "styleMissingMeta": { + "message": "@$key$ metadata חסרים", + "placeholders": { + "key": { + "content": "$1" + } + } + }, + "styleMissingName": { + "message": "אנא הזן שם" + }, + "styleRegexpTestButton": { + "message": "בדוק RegExp" + }, + "styleRegexpTestFull": { + "message": "כרטיסיות תואמות" + }, + "styleRegexpTestInvalid": { + "message": "ביטוי regrxp לא תקין" + }, + "styleRegexpTestNone": { + "message": "לא תואם אף כרטיסייה" + }, + "styleSaveLabel": { + "message": "שמור" + }, + "styleSectionsTitle": { + "message": "סעיפים" + }, + "styleToMozillaFormatTitle": { + "message": "עיצוב ב־Mozilla format" + }, + "styleUpdate": { + "message": "האם אתה בטוח שברצונך לעדכן את '$stylename$'?", + "placeholders": { + "stylename": { + "content": "$1" + } + } + }, + "stylusUnavailableForURL": { + "message": "Stylus לא עובד על דפים כמו זה." + }, + "syncStorageErrorSaving": { + "message": "הערך לא יכול להשמר. אנא נסה להקטין את גודל הטקסט." + }, + "toggleStyle": { + "message": "אפשר או השבת עיצוב" + }, + "undo": { + "message": "בטל" + }, + "undoGlobal": { + "message": "בטל בכל הסעיפים" + }, + "unreachableAMO": { + "message": "Firefox לא מאפשרת גישה לאתר זה." + }, + "unreachableContentScript": { + "message": "לא ניתן לתקשר עם הדף. אנא טען מחדש את הכרטיסייה." + }, + "updateAllCheckSucceededNoUpdate": { + "message": "לא נמצאו עדכונים." + }, + "updateCheckFailBadResponseCode": { + "message": "העדכון נכשל: השרת החזיר תגובה עם הקוד $code$.", + "placeholders": { + "code": { + "content": "$1" + } + } + }, + "updateCheckFailServerUnreachable": { + "message": "העדכון נכשל: השרת לא זמין." + }, + "updateCheckHistory": { + "message": "היסטוריה של בדיקת עדכונים" + }, + "updateCheckSkippedLocallyEdited": { + "message": "עיצוב זה נערך באופן מקומי." + }, + "updateCheckSkippedMaybeLocallyEdited": { + "message": "ייתכן כי עיצוב זה נערך באופן מקומי." + }, + "updateCheckSucceededNoUpdate": { + "message": "העיצוב מעודכן." + }, + "updateCompleted": { + "message": "העדכון הושלם." + }, + "updatesCurrentlyInstalled": { + "message": "העדכונים הותקנו." + }, + "usercssAvoidOverwriting": { + "message": "אנא שנה את הערך של @name or @namespace על־מנת להמנע מדריסה של עיצוב קיים." + }, + "usercssEditorNamePlaceholder": { + "message": "ציין @name בקוד" + }, + "usercssReplaceTemplateSectionBody": { + "message": "הכנס כאן קוד..." + }, + "versionInvalidOlder": { + "message": "הגרסה ישנה יותר מהעיצוב המותקן." + }, + "writeStyleFor": { + "message": "כתוב עיצוב עבור: " + }, + "writeStyleForURL": { + "message": "הקישור הנוכחי" + } +} diff --git a/_locales/it/messages.json b/_locales/it/messages.json index bb796be2..40b9e669 100644 --- a/_locales/it/messages.json +++ b/_locales/it/messages.json @@ -3,7 +3,7 @@ "message": "Scrivi nuovo stile" }, "addStyleTitle": { - "message": "Aggiunta di stili" + "message": "Aggiungi stili" }, "alphaChannel": { "message": "Opacità" @@ -31,6 +31,9 @@ "appliesLabel": { "message": "Vale per" }, + "appliesLineWidgetLabel": { + "message": "Visualizza info 'Applica a'" + }, "appliesLineWidgetWarning": { "message": "Non funziona con CSS minificato" }, @@ -88,6 +91,9 @@ "cm_keyMap": { "message": "Mappa caratteri" }, + "cm_matchHighlight": { + "message": "Evidenzia" + }, "cm_matchHighlightSelection": { "message": "Solo selezione" }, @@ -103,9 +109,18 @@ "colorpickerTooltip": { "message": "Apri selettore colore" }, + "configOnChange": { + "message": "su modifica" + }, + "configOnChangeTooltip": { + "message": "Salva e applica modifiche automaticamente" + }, "configureStyle": { "message": "Configura" }, + "configureStyleOnHomepage": { + "message": "Configura su homepage" + }, "confirmCancel": { "message": "Annulla" }, @@ -130,6 +145,9 @@ "dateInstalled": { "message": "Data installazione" }, + "dateUpdated": { + "message": "Data aggiornata" + }, "dbError": { "message": "Si è verificato un errore durante l'utilizzo del database Stylus. Vuoi visitare una pagina web con le possibili soluzioni?" }, @@ -183,6 +201,9 @@ "externalSupport": { "message": "Supporto" }, + "externalUsercssDocument": { + "message": "Documentazione per Usercss" + }, "filteredStyles": { "message": "$numShown$ mostrati di $numTotal$ totali", "placeholders": { @@ -203,6 +224,12 @@ "findStylesInlineTooltip": { "message": "Visualizza risultati in questa finestra." }, + "genericAdd": { + "message": "Aggiungi" + }, + "genericClone": { + "message": "Clona" + }, "genericDisabledLabel": { "message": "Disattivato" }, @@ -257,9 +284,21 @@ "importReportLegendAdded": { "message": "aggiunto" }, + "importReportLegendIdentical": { + "message": "identico saltato" + }, + "importReportLegendInvalid": { + "message": "invalido saltato" + }, + "importReportLegendUpdatedBoth": { + "message": "info meta e codice aggiornati" + }, "importReportLegendUpdatedCode": { "message": "codice aggiornato" }, + "importReportLegendUpdatedMeta": { + "message": "info meta aggiornate" + }, "importReportTitle": { "message": "Importazione stili terminata" }, @@ -307,6 +346,9 @@ "linkGetStyles": { "message": "Ottieni stili" }, + "linkTranslate": { + "message": "Traduci" + }, "linterInvalidConfigError": { "message": "Non salvato a causa di queste impostazioni di configurazione non valide:" }, @@ -331,6 +373,9 @@ "manageHeading": { "message": "Stili installati" }, + "manageNewStyleAsUsercss": { + "message": "come Usercss" + }, "manageNewUI": { "message": "Nuovo layout Gestione UI" }, @@ -346,9 +391,18 @@ "manageOnlyLocal": { "message": "Solo stili creati localmente" }, + "manageOnlyNonUsercss": { + "message": "Solo stili non-Usercss" + }, "manageOnlyUpdates": { "message": "Solo con aggiornamenti o problemi" }, + "manageOnlyUsercss": { + "message": "Solo stili Usercss" + }, + "menuShowBadge": { + "message": "Mostra contatore stili attivi" + }, "noStylesForSite": { "message": "Nessuno stile installato per questo sito." }, @@ -421,6 +475,9 @@ "paginationCurrent": { "message": "Pagina corrente" }, + "paginationEstimated": { + "message": "Numero stimato di pagine" + }, "paginationNext": { "message": "Pagine successiva" }, diff --git a/_locales/ja/messages.json b/_locales/ja/messages.json index f371bd53..5a6c4c6c 100644 --- a/_locales/ja/messages.json +++ b/_locales/ja/messages.json @@ -596,10 +596,10 @@ "message": "ポップアップの幅(ピクセル単位)" }, "optionsReset": { - "message": "設定をデフォルト値にリセットする" + "message": "オプションをデフォルト値にリセットする" }, "optionsResetButton": { - "message": "設定をリセット" + "message": "オプションをリセット" }, "optionsSubheading": { "message": "その他のオプション" From 3243e37fbc5f7437bea59100b2db3e639a995ebe Mon Sep 17 00:00:00 2001 From: tophf Date: Mon, 10 Sep 2018 18:01:34 +0300 Subject: [PATCH 29/29] 1.4.21 --- manifest.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index 8f992591..61115caa 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "name": "Stylus", - "version": "1.4.20", + "version": "1.4.21", "minimum_chrome_version": "49", "description": "__MSG_description__", "homepage_url": "https://add0n.com/stylus.html", diff --git a/package.json b/package.json index e4b9cc8d..4d3705aa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "Stylus", - "version": "1.4.20", + "version": "1.4.21", "description": "Redesign the web with Stylus, a user styles manager", "license": "GPL-3.0-only", "repository": "openstyles/stylus",