Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Matheus Faustino 2018-07-16 20:35:40 -03:00
commit 9c5fcc9037
62 changed files with 3201 additions and 8798 deletions

View File

@ -1,33 +1,37 @@
# Contributing to Stylus # Contributing to Stylus
1. [Getting Involved](#getting-involved) 1. [Getting involved](#getting-involved)
2. [How to Report Issues](#how-to-report-issues) 2. [How to report issues](#how-to-report-issues)
3. [Adding Tranlations](#adding-translations) 3. [Adding translations](#adding-translations)
4. [Core Style Guide](#core-style-guide) 4. [Pull requests](#pull-requests)
5. [Getting Started](#getting-started) 5. [Contact us](#contact-us)
## Getting Involved ## Getting involved
There are a number of ways to get involved with the development of Stylus. Even if you've never contributed to an Open Source project before, we're always looking for help by identifying issues and suggesting improvements. There are a number of ways to get involved with the development of Stylus. Even if you've never contributed to an Open Source project before, we're always looking for help by identifying issues and suggesting improvements.
## How to Report issues ## How to report issues
When an issue is opened, a template is provided. Please answer these questions as thoroughly as possible. If we were psychic, we'd be hanging out in casinos playing poker until they kicked us out. We can't read your mind! Please provide step-by-step direction on how to reproduce the issue as well as the browser, operating system and versions of each. When an [**issue**](https://github.com/openstyles/stylus/issues) is opened, a template is provided. Please answer these questions as thoroughly as possible. If we were psychic, we'd be hanging out in casinos playing poker until they kicked us out. We can't read your mind! Please provide step-by-step directions on how to reproduce the issue as well as the versions of your operating system, browser and Stylus.
When adding a feature request, please include When adding a **feature request**, please search through the existing issues to see if it the feature has already been requested, added or rejected.
## Adding Translations If not, then provide details describing which page the feature will effect, e.g. popup, manager or editor. Then describe the request and explain how you think it would benefit the user experience.
## Adding translations
You can help us translate the extension on [Transifex](https://www.transifex.com/github-7/Stylus). When `messages.json` file is ready to be merged, please open a new bug report in [stylus/issues](https://github.com/openstyles/stylus/issues). You can help us translate the extension on [Transifex](https://www.transifex.com/github-7/Stylus). When `messages.json` file is ready to be merged, please open a new bug report in [stylus/issues](https://github.com/openstyles/stylus/issues).
## Core Style Guide ## Pull requests
* Use the provided `.editorconfig` file with your code editor. Don't know what that is? Then check out http://editorconfig.org/.
## Getting Started
* First open an issue to discuss your changes. * First open an issue to discuss your changes.
* Then download, fork or clone this repository. * Then download, fork or clone this repository.
<!-- * Use [node.js](http://nodejs.org/) to run `npm install`. --> <!-- * Use [node.js](https://nodejs.org/) to run `npm install`. -->
* Use the provided `.editorconfig` file with your code editor. Don't know what that is? Then check out https://editorconfig.org/.
* Make any changes within a branch of this repository (not the `master` branch). * Make any changes within a branch of this repository (not the `master` branch).
* Submit a pull request and include a reference to the initial issue with the discussion. * Submit a pull request and include a reference to the initial issue with the discussion.
## Contact us
If you prefer a more informal method of getting in touch or starting a conversation, please [join us on Discord](https://discordapp.com/widget?id=379521691774353408) or leave a comment in the [discussion section](https://add0n.com/stylus.html#reviews). We will monitor any discussions there and join in, and it may be a more appropriate venue for opinions and less urgent suggestions.

View File

View File

@ -14,8 +14,8 @@ Stylus is a fork of Stylish for Chrome, also compatible with Firefox as a WebExt
## Releases ## Releases
1. [Chrome Web Store](https://chrome.google.com/webstore/detail/stylus/clngdbkpkpeebahjckkjfobafhncgmne) (or [beta](https://chrome.google.com/webstore/detail/stylus-beta/apmmpaebfobifelkijhaljbmpcgbjbdo)) 1. [Chrome Web Store](https://chrome.google.com/webstore/detail/stylus/clngdbkpkpeebahjckkjfobafhncgmne) (or [beta](https://chrome.google.com/webstore/detail/stylus-beta/apmmpaebfobifelkijhaljbmpcgbjbdo))
2. [Firefox add-ons](https://addons.mozilla.org/firefox/addon/styl-us/) (or [beta](https://addons.mozilla.org/en-US/firefox/addon/styl-us/versions/beta)) 2. [Firefox add-ons](https://addons.mozilla.org/firefox/addon/styl-us/)
3. [Opera add-ons](https://addons.opera.com/extensions/details/stylus/) 3. [Opera add-ons](https://addons.opera.com/extensions/details/stylus/) (see [wiki](https://github.com/openstyles/stylus/wiki/Opera,-Outdated-Stylus) for more recent version)
## Screenshots ## Screenshots
@ -28,9 +28,9 @@ Stylus is a fork of Stylish for Chrome, also compatible with Firefox as a WebExt
## Help ## Help
[![Discord][chat-image]][chat-link] - [Stylus help and FAQ in our Wiki](https://github.com/openstyles/stylus/wiki)
- [Discussion section](https://add0n.com/stylus.html#reviews) of our representation on add0n.com
See the [help docs](http://userstyles.org/help/stylish_chrome) or [ask in userstyles.org forum](https://forum.userstyles.org). For Stylus specific questions and suggestions please use [review section](http://add0n.com/stylus.html#reviews) of the FAQs page. - Discord: [![Discord][chat-image]][chat-link]
[chat-image]: https://img.shields.io/discord/379521691774353408.svg [chat-image]: https://img.shields.io/discord/379521691774353408.svg
[chat-link]: https://discordapp.com/widget?id=379521691774353408 [chat-link]: https://discordapp.com/widget?id=379521691774353408
@ -45,12 +45,13 @@ See our [contributing](./.github/CONTRIBUTING.md) page for more details.
## License ## License
For copyright status of the "codemirror" directory, see [codemirror/LICENSE](https://github.com/openstyles/stylus/blob/master/src/vendor/codemirror/LICENSE). Everything else is: Inherited code from the original [Stylish](https://github.com/stylish-userstyles/stylish/):
Copyright &copy; 2005-2014 [Jason Barnabe](jason.barnabe@gmail.com)
Copyright (C) 2005-2014 Jason Barnabe <jason.barnabe@gmail.com> Current Stylus:
Copyright &copy; 2017-2018 [Stylus Team](https://github.com/openstyles/stylus/graphs/contributors)
Copyright (C) 2017 Stylus Team
**[GNU GPLv3](./LICENSE)**
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or the Free Software Foundation, either version 3 of the License, or
@ -62,4 +63,8 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <https://www.gnu.org/licenses/>.
### External libraries
The licenses of [external libraries](./vendor) used in this project or [modified versions of external libraries](./vendor-overwrites) can be found in their respective directory.

View File

@ -187,6 +187,10 @@
"message": "Installierte Styles", "message": "Installierte Styles",
"description": "Heading for the manage page" "description": "Heading for the manage page"
}, },
"styleBeautify": {
"message": "Code formatieren",
"description": "Label for the CSS-beautifier button on the edit style page"
},
"styleRegexpProblemTooltip": { "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 Regulärer Ausdrücke nicht angewendet wurden.",
"description": "Tooltip in the popup for styles that were applied only partially" "description": "Tooltip in the popup for styles that were applied only partially"
@ -375,7 +379,7 @@
"description": "Label (must be very short) for the checkbox in the toolbar button context menu controlling toolbar badge text." "description": "Label (must be very short) for the checkbox in the toolbar button context menu controlling toolbar badge text."
}, },
"popupHotkeysInfo": { "popupHotkeysInfo": {
"message": "<1>-<9>, <0>, auch auf NumPad - schaltet n-ten Style um (0 ist 10)\n<A>-<Z> schaltet ersten Style, dessen Name mit diesem Buchstaben beginnt\n<Shift> öffnet Editor statt umzuschalten\n<Numpad +> aktiviert die aufgeführten Styles\n<Numpad > deaktiviert die aufgeführten Styles\n<Numpad *> und <`> (backtick) - schaltet anfänglich aktivierte Styles; trifft nicht auf Styles zu, die erst aktiviert werden, wenn das Popup noch geöffnet ist. Dadurch kann die Anfangseinstellung nach einem Test wiederhergestellt werden: Einfach alle deaktivieren, dann schalte z.B. <Numpad > <Numpad *>\nMehr dazu im Wiki", "message": "<0>-<9> (auch auf NumPad) schaltet den n-ten Style um (0 ist 10)\n<A>-<Z> schaltet ersten Style, dessen Name mit diesem Buchstaben beginnt, um\n<Shift> öffnet Editor statt umzuschalten\n<Numpad +> aktiviert die aufgeführten Styles\n<Numpad > deaktiviert die aufgeführten Styles\n<Numpad *> schaltet anfänglich aktivierte Styles um. Trifft nicht auf Styles zu, die erst aktiviert werden, wenn das Popup noch geöffnet ist. Dadurch kann z.B. die Anfangseinstellung nach einem Test wiederhergestellt werden: <Numpad > <Numpad *>\nMehr dazu im Wiki",
"description": "NOTE1: preserve < and > symbols so that <hotkey> is styled as a key.\nNOTE2: the last line is displayed as a text of the link to the wiki page.\nNOTE3: this is the list of hotkeys displayed after clicking the right edge of the extension popup." "description": "NOTE1: preserve < and > symbols so that <hotkey> is styled as a key.\nNOTE2: the last line is displayed as a text of the link to the wiki page.\nNOTE3: this is the list of hotkeys displayed after clicking the right edge of the extension popup."
}, },
"cm_lineWrapping": { "cm_lineWrapping": {
@ -778,7 +782,7 @@
"description": "Text that displays when an update check skipped updating the style to avoid losing local modifications" "description": "Text that displays when an update check skipped updating the style to avoid losing local modifications"
}, },
"linterRulesLink": { "linterRulesLink": {
"message": "Vollständige Liste der Regeln anzeigen für", "message": "Vollständige Liste der Regeln anzeigen",
"description": "Stylelint or CSSLint rules label added immediately before a link" "description": "Stylelint or CSSLint rules label added immediately before a link"
}, },
"styleUpdateDiscardChanges": { "styleUpdateDiscardChanges": {
@ -823,7 +827,7 @@
"description": "Text after the number of styles updated entirely in the report shown after importing styles" "description": "Text after the number of styles updated entirely in the report shown after importing styles"
}, },
"cm_smartIndent": { "cm_smartIndent": {
"message": "Intelligenten Einzug verwenden", "message": "Intelligenter Einzug",
"description": "Label for the checkbox controlling smart indentation option for the style editor." "description": "Label for the checkbox controlling smart indentation option for the style editor."
}, },
"styleRegexpTestButton": { "styleRegexpTestButton": {
@ -839,7 +843,7 @@
"description": "Homepage link text on the manage page e.g. https://add0n.com/stylus.html#features with chat/FAQ/intro/info" "description": "Homepage link text on the manage page e.g. https://add0n.com/stylus.html#features with chat/FAQ/intro/info"
}, },
"searchStylesHelp": { "searchStylesHelp": {
"message": "Die </>-Taste fokussiert das Suchfeld.\nEinfacher Text: Sucht im Namen, Quelltext, Homepage und anvisierten URLs. Wörter mit weniger als 3 Buchstaben werden ignoriert.\nURL suchen: Stelle <url:> voran, z.B. <url:https://github.com/openstyles/stylus>\nReguläre Ausdrücke: Nutze Slash und Flags, z.B. </body.*?\\ba\\b/simguy>\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.\nURL suchen: Stelle <url:> voran, z.B. <url:https://github.com/openstyles/stylus>\nReguläre Ausdrücke: Nutze Slash und Flags, z.B. </body.*?\\ba\\b/simguy>\nSuche nach genauem Ausdruck: Anführungszeichen verwenden, z.B. <\".header ~ div\">",
"description": "Text in the minihelp displayed when clicking (i) icon to the right of the search input field on the Manage styles page" "description": "Text in the minihelp displayed when clicking (i) icon to the right of the search input field on the Manage styles page"
}, },
"findStyles": { "findStyles": {
@ -1123,7 +1127,7 @@
"description": "'Save' button in a confirm dialog" "description": "'Save' button in a confirm dialog"
}, },
"manageNewUI": { "manageNewUI": {
"message": "Neues Verwaltungs Design-Layout.", "message": "Neues Verwaltungs-Layout",
"description": "Label for the checkbox that toggles the new UI on manage page" "description": "Label for the checkbox that toggles the new UI on manage page"
}, },
"unreachableAMOHintOldFF": { "unreachableAMOHintOldFF": {
@ -1139,7 +1143,7 @@
"description": "Used in various lists/options to indicate that something is disabled" "description": "Used in various lists/options to indicate that something is disabled"
}, },
"cm_indentWithTabs": { "cm_indentWithTabs": {
"message": "Tabs mit intelligentem Einzug verwenden", "message": "Tabs mit intelligentem Einzug",
"description": "Label for the checkbox controlling tabs with smart indentation option for the style editor." "description": "Label for the checkbox controlling tabs with smart indentation option for the style editor."
}, },
"replaceWith": { "replaceWith": {
@ -1232,7 +1236,7 @@
"description": "Reset button tooltip to inform user on how to undo an accidental reset" "description": "Reset button tooltip to inform user on how to undo an accidental reset"
}, },
"description": { "description": {
"message": "Gestalte das Web neu mit Stylus, dem Style Manager. Stylus ermöglicht dir ganz einfach Themes und Designs für viele populäre Webseiten zu installieren.", "message": "Gestalte das Web neu mit Stylus, dem Style Manager. Stylus ermöglicht dir ganz einfach Themes und Designs für viele beliebte Webseiten zu installieren.",
"description": "Extension description" "description": "Extension description"
}, },
"confirmClose": { "confirmClose": {

View File

@ -27,6 +27,10 @@
"message": "Ainult Usercss stiilid", "message": "Ainult Usercss stiilid",
"description": "Checkbox to show only Usercss styles" "description": "Checkbox to show only Usercss styles"
}, },
"sortStylesHelp": {
"message": "Vali paigaldatud üksustele rakendatav sorteerimismeetod sorteerimise rippmenüüst. Vaikimisi seadistus rakendab kasvava sorteerimise (A-st Z-ni) üksuste pealkirjades. Sorteerimised grupis \"Kahanev pealkiri\" rakendavad pealkirjale kahaneva sorteerimise (Z-st A-ni).\nOn olemas ka teisi eelseadistusi, mis võimaldavad üksuste sorteerimist mitme kriteeriumi järgi. Mõtle sellest, nagu sorteeriksid mitme veeruga tabelit ja iga kategooria valikus (plussmärkide vahel) tähistab veergu või gruppi.\nNäiteks, kui valik on \"Lubatud (esimene) + pealkiri\", sorteeritakse üksused nii, et kõik lubatud üksused on nimekirja tipus ning nimekirja pealkirja kasvav sorteerimine (A-st Z-ni) rakendatakse nii lubatud kui keelatud üksustele eraldi.",
"description": "Text in the minihelp displayed when clicking (i) icon to the right of the sort input field on the Manage styles page"
},
"sortLabelTitleAsc": { "sortLabelTitleAsc": {
"message": "Pealkiri tõusvas järjestuses", "message": "Pealkiri tõusvas järjestuses",
"description": "Text added to option group to indicate a block of options that apply a title ascending (A to Z) sort" "description": "Text added to option group to indicate a block of options that apply a title ascending (A to Z) sort"
@ -48,7 +52,7 @@
"description": "Label for the button to export a style ('edit' page) or all styles ('manage' page)" "description": "Label for the button to export a style ('edit' page) or all styles ('manage' page)"
}, },
"installButton": { "installButton": {
"message": "Installi stiil", "message": "Paigalda stiil",
"description": "Label for install button" "description": "Label for install button"
}, },
"styleMetaErrorCheckbox": { "styleMetaErrorCheckbox": {
@ -143,6 +147,10 @@
"message": "Lohista importimiseks oma varundusfail kuskile siia lehele.", "message": "Lohista importimiseks oma varundusfail kuskile siia lehele.",
"description": "Drag'n'drop message" "description": "Drag'n'drop message"
}, },
"styleRegexpTestNote": {
"message": "Märkus: kasuta üksikut \\, et keelata märgi töötlemine regulaaravaldise sisendväljas, mis konverteeritakse automaatselt \\\\-ks stiili koodis, nagu CSSi tsiteeritud sõnede spetsifikatsioon ette näeb.",
"description": "RegExp test report: a note displayed at the bottom of the dialog"
},
"helpAlt": { "helpAlt": {
"message": "Abi", "message": "Abi",
"description": "Alternate text for help buttons" "description": "Alternate text for help buttons"
@ -164,7 +172,7 @@
"description": "Label for the checkbox that toggles grayed out mode of applies-to favicons in the new UI on manage page" "description": "Label for the checkbox that toggles grayed out mode of applies-to favicons in the new UI on manage page"
}, },
"versionInvalidOlder": { "versionInvalidOlder": {
"message": "Versioon on installitud stiilist vanem.", "message": "Versioon on paigaldatud stiilist vanem.",
"description": "Displayed when the version of style is older than the installed one" "description": "Displayed when the version of style is older than the installed one"
}, },
"confirmYes": { "confirmYes": {
@ -176,7 +184,7 @@
"description": "Text for a link that gets a list of styles for the current site" "description": "Text for a link that gets a list of styles for the current site"
}, },
"manageHeading": { "manageHeading": {
"message": "Installitud stiilid", "message": "Paigaldatud stiilid",
"description": "Heading for the manage page" "description": "Heading for the manage page"
}, },
"styleBeautify": { "styleBeautify": {
@ -239,6 +247,10 @@
"message": "Impordi stiilid", "message": "Impordi stiilid",
"description": "" "description": ""
}, },
"cm_selectByTokens": {
"message": "Topeltklõps valib sõnesid",
"description": "Label for the checkbox in the editor."
},
"confirmStop": { "confirmStop": {
"message": "Peata", "message": "Peata",
"description": "'Stop' button in a confirm dialog" "description": "'Stop' button in a confirm dialog"
@ -268,7 +280,7 @@
"description": "Text after the number of styles with updated code (meta info is unchanged) in the report shown after importing styles" "description": "Text after the number of styles with updated code (meta info is unchanged) in the report shown after importing styles"
}, },
"styleInstall": { "styleInstall": {
"message": "Installida \"$stylename$\" Stylus'isse?", "message": "Paigaldad \"$stylename$\" Stylus'isse?",
"description": "Confirmation when installing a style", "description": "Confirmation when installing a style",
"placeholders": { "placeholders": {
"stylename": { "stylename": {
@ -343,7 +355,7 @@
"description": "Note in the toolbar popup for file:// URLs" "description": "Note in the toolbar popup for file:// URLs"
}, },
"sortLabel": { "sortLabel": {
"message": "Vali, milline järjestus installitud stiilidele rakendada", "message": "Vali, milline järjestus paigaldatud stiilidele rakendada",
"description": "Title on the sort select to indicate it is used for sorting entries" "description": "Title on the sort select to indicate it is used for sorting entries"
}, },
"disableStyleLabel": { "disableStyleLabel": {
@ -366,6 +378,10 @@
"message": "Kuva aktiivsete stiilide hulka", "message": "Kuva aktiivsete stiilide hulka",
"description": "Label (must be very short) for the checkbox in the toolbar button context menu controlling toolbar badge text." "description": "Label (must be very short) for the checkbox in the toolbar button context menu controlling toolbar badge text."
}, },
"popupHotkeysInfo": {
"message": "<1>-<9>, <0>, ka numbriklahvidel - lülitab N. stiili (0 on 10)\n<A>-<Z> lülitab esimest stiili, mille nimi algab selle tähega\n<Shift> avab redaktori lülitamise asemel\n<Numpad +> lubab nimekirjas olevad stiilid\n<Numpad > keelab nimekirjas olevad stiilid\n<Numpad *> ja <`> (graavis) - lülitab esialgu lubatud stiilid; ei rakendu järgnevalt lubatud stiilidele hüpiku avatud olekus, seega saad taastada esialgse valiku peale asjade testimist: lihtsalt keela kõik ning lülita, seega <Numpad > <Numpad *>\nRohkem teavet vikis",
"description": "NOTE1: preserve < and > symbols so that <hotkey> is styled as a key.\nNOTE2: the last line is displayed as a text of the link to the wiki page.\nNOTE3: this is the list of hotkeys displayed after clicking the right edge of the extension popup."
},
"cm_lineWrapping": { "cm_lineWrapping": {
"message": "Reamurdmine", "message": "Reamurdmine",
"description": "Label for the checkbox controlling word wrap option for the style editor." "description": "Label for the checkbox controlling word wrap option for the style editor."
@ -490,7 +506,7 @@
"description": "Option to make the style apply to the entered string as a URL prefix" "description": "Option to make the style apply to the entered string as a URL prefix"
}, },
"cm_matchHighlightToken": { "cm_matchHighlightToken": {
"message": "Kursori all olev sõna", "message": "Kursori all olev sõne",
"description": "Style editor's 'highglight' drop-down list option: highlight the occurrences of the word/token under cursor even if nothing is selected" "description": "Style editor's 'highglight' drop-down list option: highlight the occurrences of the word/token under cursor even if nothing is selected"
}, },
"searchRegexp": { "searchRegexp": {
@ -534,7 +550,7 @@
"description": "Help text for sections" "description": "Help text for sections"
}, },
"noStylesForSite": { "noStylesForSite": {
"message": "Sellele saidile pole stiile installitud.", "message": "Sellele saidile pole stiile paigaldatud.",
"description": "Text displayed when no styles are installed for the current site" "description": "Text displayed when no styles are installed for the current site"
}, },
"appliesDisplayTruncatedSuffix": { "appliesDisplayTruncatedSuffix": {
@ -546,7 +562,7 @@
"description": "Label for the button to remove an 'applies' entry" "description": "Label for the button to remove an 'applies' entry"
}, },
"updatesCurrentlyInstalled": { "updatesCurrentlyInstalled": {
"message": "Uuendused installitud:", "message": "Uuendused paigaldatud:",
"description": "Text that displays when an update is installed on options page. Followed by the number of currently installed updates." "description": "Text that displays when an update is installed on options page. Followed by the number of currently installed updates."
}, },
"styleToMozillaFormatTitle": { "styleToMozillaFormatTitle": {
@ -611,7 +627,7 @@
"description": "Label for the button to make a style apply only to specific sites" "description": "Label for the button to make a style apply only to specific sites"
}, },
"installUpdate": { "installUpdate": {
"message": "Installi uuendus", "message": "Paigalda uuendus",
"description": "Label for the button to install an update for a single style" "description": "Label for the button to install an update for a single style"
}, },
"syncStorageErrorSaving": { "syncStorageErrorSaving": {
@ -623,7 +639,7 @@
"description": "Text for a checkbox that opens search results 'inline' (within the Stylus popup window)" "description": "Text for a checkbox that opens search results 'inline' (within the Stylus popup window)"
}, },
"optionsCheckUpdate": { "optionsCheckUpdate": {
"message": "Kontrolli ja installi kõik saadaolevad uuendused", "message": "Kontrolli ja paigalda kõik saadaolevad uuendused",
"description": "" "description": ""
}, },
"clickToUninstall": { "clickToUninstall": {
@ -722,6 +738,10 @@
"message": "Lehti kokku", "message": "Lehti kokku",
"description": "" "description": ""
}, },
"cm_selectByTokensTooltip": {
"message": "Sõnede näited: .foo-bar-2 #aabbcc 0.32 !important\nKeelamisel valitakse punktidega eraldatud sõnad.",
"description": ""
},
"checkingForUpdate": { "checkingForUpdate": {
"message": "Kontrollin...", "message": "Kontrollin...",
"description": "Text to display when checking a style for an update" "description": "Text to display when checking a style for an update"
@ -755,7 +775,7 @@
"description": "Tooltip for the total page count in search results" "description": "Tooltip for the total page count in search results"
}, },
"styleInstallOverwrite": { "styleInstallOverwrite": {
"message": "'$stylename$' on juba installitud. Kas kirjutada üle?\nVersioon: $oldVersion$ -> $newVersion$", "message": "'$stylename$' on juba paigaldatud. Kas kirjutada üle?\nVersioon: $oldVersion$ -> $newVersion$",
"description": "Confirmation when re-installing a style", "description": "Confirmation when re-installing a style",
"placeholders": { "placeholders": {
"stylename": { "stylename": {
@ -790,7 +810,7 @@
"description": "Tooltip for the '->' (next page) button in search results" "description": "Tooltip for the '->' (next page) button in search results"
}, },
"searchResultInstallCount": { "searchResultInstallCount": {
"message": "Installimisi kokku", "message": "Paigaldusi kokku",
"description": "Text for label that shows the number of times a search result was installed" "description": "Text for label that shows the number of times a search result was installed"
}, },
"sectionCode": { "sectionCode": {
@ -838,6 +858,10 @@
"message": "Hangi abi", "message": "Hangi abi",
"description": "Homepage link text on the manage page e.g. https://add0n.com/stylus.html#features with chat/FAQ/intro/info" "description": "Homepage link text on the manage page e.g. https://add0n.com/stylus.html#features with chat/FAQ/intro/info"
}, },
"searchStylesHelp": {
"message": "</> klahv fokuseerib otsinguvälja.\nLihttekst: otsi nimest, koodist, kodulehe URList ja rakendatavatest saitidest. Sõnu alla 3 tähemärgi ignoreeritakse.\nVastav URL: kasuta otsingus eesliidet <url:>, nt <url:https://github.com/openstyles/stylus>\nRegulaaravaldised sisaldavad kaldkriipse ja lippe, nt </body.*?\\ba\\b/simguy>\nTäpsed sõnad: kirjuta väljendi ümber jutumärgid, nt <\".header ~ div\">",
"description": "Text in the minihelp displayed when clicking (i) icon to the right of the search input field on the Manage styles page"
},
"findStyles": { "findStyles": {
"message": "Leia stiile", "message": "Leia stiile",
"description": "Text for a link that gets a list of styles for the current site" "description": "Text for a link that gets a list of styles for the current site"
@ -945,7 +969,7 @@
"description": "Prompt when a DB error is encountered" "description": "Prompt when a DB error is encountered"
}, },
"dateInstalled": { "dateInstalled": {
"message": "Installimise kuupäev", "message": "Paigaldamise kuupäev",
"description": "Option text for the user to sort the style by install date" "description": "Option text for the user to sort the style by install date"
}, },
"optionsAdvanced": { "optionsAdvanced": {
@ -961,7 +985,7 @@
"description": "Tooltip for the button to import a style and append to the existing sections" "description": "Tooltip for the button to import a style and append to the existing sections"
}, },
"liveReloadInstallHint": { "liveReloadInstallHint": {
"message": "Reaalajas uuestilaadimine on lubatud, seega installitud stiili uuendatakse väliste muudatuste korral automaatselt, kuniks see kaart ja lähtefaili kaart mõlemad lahti on.", "message": "Reaalajas uuestilaadimine on lubatud, seega paigaldatud stiili uuendatakse väliste muudatuste korral automaatselt, kuniks see kaart ja lähtefaili kaart mõlemad lahti on.",
"description": "The label of live-reload feature" "description": "The label of live-reload feature"
}, },
"editorStylesButton": { "editorStylesButton": {
@ -989,7 +1013,7 @@
"description": "Checkbox to show only externally installed styles i.e. updatable" "description": "Checkbox to show only externally installed styles i.e. updatable"
}, },
"searchResultWeeklyCount": { "searchResultWeeklyCount": {
"message": "Installimisi nädalas", "message": "Paigaldus nädalas",
"description": "Text for label that shows the number of times a search result was installed during last week" "description": "Text for label that shows the number of times a search result was installed during last week"
}, },
"replaceAll": { "replaceAll": {
@ -1021,7 +1045,7 @@
"description": "Go to line or line:column on Ctrl-G in style code editor" "description": "Go to line or line:column on Ctrl-G in style code editor"
}, },
"manageOnlyLocalTooltip": { "manageOnlyLocalTooltip": {
"message": "(stiilid, mida ei installitud userstyles.org lehelt)", "message": "(stiilid, mida ei paigaldatud lehelt userstyles.org)",
"description": "Tooltip for the checkbox to show only locally created styles i.e. non-updatable" "description": "Tooltip for the checkbox to show only locally created styles i.e. non-updatable"
}, },
"checkAllUpdates": { "checkAllUpdates": {
@ -1074,7 +1098,7 @@
"description": "Label for the checkbox in the style editor." "description": "Label for the checkbox in the style editor."
}, },
"installButtonReinstall": { "installButtonReinstall": {
"message": "Installi stiil uuesti", "message": "Paigalda stiil uuesti",
"description": "Label for reinstall button" "description": "Label for reinstall button"
}, },
"linterInvalidConfigError": { "linterInvalidConfigError": {
@ -1130,6 +1154,10 @@
"message": "Uus haldusliidese välimus", "message": "Uus haldusliidese välimus",
"description": "Label for the checkbox that toggles the new UI on manage page" "description": "Label for the checkbox that toggles the new UI on manage page"
}, },
"unreachableAMOHintOldFF": {
"message": "Ainult Firefox 59 ja uuem on võimalik seadistada lubama WebExtensionsil lisada stiilielemente CSP-kaitstud saitidele nagu see.",
"description": "Note in the popup when opened on addons.mozilla.org in Firefox < 59"
},
"importReportUndoneTitle": { "importReportUndoneTitle": {
"message": "Importimine on tagasi võetud", "message": "Importimine on tagasi võetud",
"description": "Title of the message box shown after undoing the import of styles" "description": "Title of the message box shown after undoing the import of styles"
@ -1155,11 +1183,11 @@
"description": "Label for the button to delete a style" "description": "Label for the button to delete a style"
}, },
"updateCheckManualUpdateForce": { "updateCheckManualUpdateForce": {
"message": "Installi uuendus (kohalikud muutused kirjutatakse üle)", "message": "Paigalda uuendus (kohalikud muutused kirjutatakse üle)",
"description": "Additional text displayed when an update check skipped updating the style to avoid losing local modifications" "description": "Additional text displayed when an update check skipped updating the style to avoid losing local modifications"
}, },
"styleInstallFailed": { "styleInstallFailed": {
"message": "Kasutajastiili installimine ebaõnnestus!\n$error$", "message": "Kasutajastiili paigaldamine ebaõnnestus!\n$error$",
"description": "Warning when installation failed", "description": "Warning when installation failed",
"placeholders": { "placeholders": {
"error": { "error": {
@ -1196,7 +1224,7 @@
"description": "Label for the button to go to the edit style page" "description": "Label for the button to go to the edit style page"
}, },
"installButtonInstalled": { "installButtonInstalled": {
"message": "Stiil installitud", "message": "Stiil paigaldatud",
"description": "Text displayed when the style is successfully installed" "description": "Text displayed when the style is successfully installed"
}, },
"author": { "author": {
@ -1240,7 +1268,7 @@
"description": "Wiki link text on the manage page e.g. https://github.com/openstyles/stylus/wiki" "description": "Wiki link text on the manage page e.g. https://github.com/openstyles/stylus/wiki"
}, },
"description": { "description": {
"message": "Disaini veeb ümber kasutajastiilide halduri Stylus'iga. Stylus võimaldab sul lihtsalt installida teemasid ja välimusi mitmetele populaarsetele saitidele.", "message": "Disaini veeb ümber kasutajastiilide halduri Stylus'iga. Stylus võimaldab sul lihtsalt paigaldada teemasid ja välimusi mitmetele populaarsetele saitidele.",
"description": "Extension description" "description": "Extension description"
}, },
"confirmClose": { "confirmClose": {

View File

@ -7,10 +7,18 @@
"message": "défaut", "message": "défaut",
"description": "Default CodeMirror CSS theme option on the edit style page" "description": "Default CodeMirror CSS theme option on the edit style page"
}, },
"bckpInstStyles": {
"message": "Exporter des styles",
"description": ""
},
"exportLabel": { "exportLabel": {
"message": "Exportez", "message": "Exportez",
"description": "Label for the button to export a style ('edit' page) or all styles ('manage' page)" "description": "Label for the button to export a style ('edit' page) or all styles ('manage' page)"
}, },
"optionsBadgeNormal": {
"message": "Couleur d'arrière plan",
"description": ""
},
"cm_tabSize": { "cm_tabSize": {
"message": "Taille des tabulations", "message": "Taille des tabulations",
"description": "Label for the text box controlling tab size option for the style editor." "description": "Label for the text box controlling tab size option for the style editor."
@ -31,6 +39,10 @@
"message": "Rechercher des mises à jour", "message": "Rechercher des mises à jour",
"description": "Label for the button to check a single style for an update" "description": "Label for the button to check a single style for an update"
}, },
"optionsOpenManager": {
"message": "Gérer les styles",
"description": ""
},
"updateAllCheckSucceededNoUpdate": { "updateAllCheckSucceededNoUpdate": {
"message": "All styles are up to date.", "message": "All styles are up to date.",
"description": "Text that displays when an update all check completed and no updates are available" "description": "Text that displays when an update all check completed and no updates are available"
@ -39,6 +51,10 @@
"message": "Aide", "message": "Aide",
"description": "Alternate text for help buttons" "description": "Alternate text for help buttons"
}, },
"search": {
"message": "Rechercher",
"description": "Label before the search input field in the editor shown on Ctrl-F"
},
"confirmYes": { "confirmYes": {
"message": "Oui", "message": "Oui",
"description": "'Yes' button in a confirm dialog" "description": "'Yes' button in a confirm dialog"
@ -51,6 +67,10 @@
"message": "Styles installés", "message": "Styles installés",
"description": "Heading for the manage page" "description": "Heading for the manage page"
}, },
"styleBeautify": {
"message": "Embellir ",
"description": "Label for the CSS-beautifier button on the edit style page"
},
"styleEnabledLabel": { "styleEnabledLabel": {
"message": "Activé", "message": "Activé",
"description": "Label for the enabled state of styles" "description": "Label for the enabled state of styles"
@ -67,10 +87,30 @@
"message": "Enregistrer", "message": "Enregistrer",
"description": "Label for save button for style editing" "description": "Label for save button for style editing"
}, },
"confirmDelete": {
"message": "Supprimer",
"description": ""
},
"confirmCancel": {
"message": "Annuler",
"description": ""
},
"retrieveBckp": {
"message": "Importer des styles",
"description": ""
},
"confirmStop": {
"message": "Arrêt ",
"description": "'Stop' button in a confirm dialog"
},
"writeStyleForURL": { "writeStyleForURL": {
"message": "cette URL", "message": "cette URL",
"description": "Text for link in toolbar pop-up to write a new style for the current URL" "description": "Text for link in toolbar pop-up to write a new style for the current URL"
}, },
"optionsSubheading": {
"message": "Plus de paramètres",
"description": "Subheading for options section on manage page."
},
"appliesAdd": { "appliesAdd": {
"message": "Ajouter", "message": "Ajouter",
"description": "Label for the button to add an 'applies' entry" "description": "Label for the button to add an 'applies' entry"
@ -88,6 +128,10 @@
} }
} }
}, },
"optionsCheck": {
"message": "Mettre à jour les styles",
"description": ""
},
"disableStyleLabel": { "disableStyleLabel": {
"message": "Désactiver", "message": "Désactiver",
"description": "Label for the button to disable a style" "description": "Label for the button to disable a style"
@ -108,6 +152,10 @@
"message": "Vous avez apporté des modifications à ce style sans les enregistrer.", "message": "Vous avez apporté des modifications à ce style sans les enregistrer.",
"description": "Text for the prompt when changes are made to a style and the user tries to leave without saving" "description": "Text for the prompt when changes are made to a style and the user tries to leave without saving"
}, },
"importLabel": {
"message": "Importer",
"description": "Label for the button to import a style ('edit' page) or all styles ('manage' page)"
},
"updateCheckFailServerUnreachable": { "updateCheckFailServerUnreachable": {
"message": "Échec de la mise à jour: le serveur est inaccessible.", "message": "Échec de la mise à jour: le serveur est inaccessible.",
"description": "Text that displays when an update check failed because the update server is unreachable" "description": "Text that displays when an update check failed because the update server is unreachable"
@ -116,6 +164,10 @@
"message": "Filtres", "message": "Filtres",
"description": "Label for filters container" "description": "Label for filters container"
}, },
"applyAllUpdates": {
"message": "Appliquer toutes les mises à jour",
"description": "Label for the button to apply all detected updates"
},
"deleteStyleConfirm": { "deleteStyleConfirm": {
"message": "Voulez-vous vraiment supprimer ce style ?", "message": "Voulez-vous vraiment supprimer ce style ?",
"description": "Confirmation before deleting a style" "description": "Confirmation before deleting a style"
@ -133,6 +185,10 @@
} }
} }
}, },
"openStylesManager": {
"message": "Ouvrir le gestionnaire de styles",
"description": "Label for the style maanger opener in the browser action context menu."
},
"styleUpdate": { "styleUpdate": {
"message": "Voulez-vous mettre à jour '$stylename$'?", "message": "Voulez-vous mettre à jour '$stylename$'?",
"description": "Confirmation when updating a style", "description": "Confirmation when updating a style",
@ -179,10 +235,18 @@
"message": "Supprimer", "message": "Supprimer",
"description": "Label for the button to remove an 'applies' entry" "description": "Label for the button to remove an 'applies' entry"
}, },
"replace": {
"message": "Remplacer",
"description": "Label before the replace input field in the editor shown on Ctrl-H"
},
"appliesLabel": { "appliesLabel": {
"message": "S'applique à", "message": "S'applique à",
"description": "Label for 'applies to' fields on the edit/add screen" "description": "Label for 'applies to' fields on the edit/add screen"
}, },
"openOptionsPopup": {
"message": "Paramètres",
"description": "Go to Options UI"
},
"openManage": { "openManage": {
"message": "Gérer les styles installés", "message": "Gérer les styles installés",
"description": "Link to open the manage page." "description": "Link to open the manage page."
@ -212,6 +276,10 @@
"message": "Désactiver tous les styles", "message": "Désactiver tous les styles",
"description": "Label for the checkbox that turns all enabled styles off." "description": "Label for the checkbox that turns all enabled styles off."
}, },
"undoGlobal": {
"message": "Tout annuler",
"description": "CSS-beautify global Undo button label"
},
"updateCompleted": { "updateCompleted": {
"message": "Mise à jour terminée.", "message": "Mise à jour terminée.",
"description": "Text that displays when an update completed" "description": "Text that displays when an update completed"
@ -220,6 +288,10 @@
"message": "Vérification en cours…", "message": "Vérification en cours…",
"description": "Text to display when checking a style for an update" "description": "Text to display when checking a style for an update"
}, },
"cm_smartIndent": {
"message": "Utiliser l'indentation intelligente",
"description": "Label for the checkbox controlling smart indentation option for the style editor."
},
"appliesHelp": { "appliesHelp": {
"message": "Utilisez l'option \"S'applique à\" pour préciser les URL auxquelles le code de cette section s'applique.", "message": "Utilisez l'option \"S'applique à\" pour préciser les URL auxquelles le code de cette section s'applique.",
"description": "Help text for 'applies to' section" "description": "Help text for 'applies to' section"
@ -240,14 +312,26 @@
"message": "Une erreur s'est produite dans la base de donnée de Stylus. Voulez-vous visiter une page web avec les solutions possibles ?", "message": "Une erreur s'est produite dans la base de donnée de Stylus. Voulez-vous visiter une page web avec les solutions possibles ?",
"description": "Prompt when a DB error is encountered" "description": "Prompt when a DB error is encountered"
}, },
"optionsOpen": {
"message": "Ouvrir",
"description": ""
},
"checkAllUpdates": { "checkAllUpdates": {
"message": "Rechercher des mises à jour pour tous les styles", "message": "Rechercher des mises à jour pour tous les styles",
"description": "Label for the button to check all styles for updates" "description": "Label for the button to check all styles for updates"
}, },
"openOptionsManage": {
"message": "Paramètres d'interface graphique",
"description": "Go to Options UI"
},
"confirmNo": { "confirmNo": {
"message": "Non", "message": "Non",
"description": "'No' button in a confirm dialog" "description": "'No' button in a confirm dialog"
}, },
"undo": {
"message": "Annuler",
"description": "Button label"
},
"deleteStyleLabel": { "deleteStyleLabel": {
"message": "Supprimer", "message": "Supprimer",
"description": "Label for the button to delete a style" "description": "Label for the button to delete a style"
@ -256,10 +340,18 @@
"message": "Créer un nouveau style", "message": "Créer un nouveau style",
"description": "Label for the button to go to the add style page" "description": "Label for the button to go to the add style page"
}, },
"backupButtons": {
"message": "Sauvergarde",
"description": "Heading for backup"
},
"editStyleLabel": { "editStyleLabel": {
"message": "Modifier", "message": "Modifier",
"description": "Label for the button to go to the edit style page" "description": "Label for the button to go to the edit style page"
}, },
"cm_theme": {
"message": "Thème",
"description": "Label for the style editor's CSS theme."
},
"helpKeyMapCommand": { "helpKeyMapCommand": {
"message": "Tapez un nom de commande", "message": "Tapez un nom de commande",
"description": "Placeholder text of inputbox in keymap help popup on the edit style page. Must be very short" "description": "Placeholder text of inputbox in keymap help popup on the edit style page. Must be very short"

File diff suppressed because it is too large Load Diff

View File

@ -3,6 +3,22 @@
"message": "Tudo", "message": "Tudo",
"description": "Text displayed for styles that apply to all sites" "description": "Text displayed for styles that apply to all sites"
}, },
"defaultTheme": {
"message": "padrão",
"description": "Default CodeMirror CSS theme option on the edit style page"
},
"bckpInstStyles": {
"message": "Exportar estilos",
"description": ""
},
"exportLabel": {
"message": "Exportar ",
"description": "Label for the button to export a style ('edit' page) or all styles ('manage' page)"
},
"optionsBadgeNormal": {
"message": "Cor de fundo",
"description": ""
},
"enableStyleLabel": { "enableStyleLabel": {
"message": "Ativar", "message": "Ativar",
"description": "Label for the button to enable a style" "description": "Label for the button to enable a style"
@ -19,10 +35,26 @@
"message": "Verificar atualizações", "message": "Verificar atualizações",
"description": "Label for the button to check a single style for an update" "description": "Label for the button to check a single style for an update"
}, },
"importAppendLabel": {
"message": "Anexar ao estilo",
"description": "Label for the button to import a style and append to the existing sections"
},
"updateAllCheckSucceededNoUpdate": {
"message": "Nenhuma atualização encontrada.",
"description": "Text that displays when an update all check completed and no updates are available"
},
"helpAlt": { "helpAlt": {
"message": "Ajuda", "message": "Ajuda",
"description": "Alternate text for help buttons" "description": "Alternate text for help buttons"
}, },
"search": {
"message": "Buscar",
"description": "Label before the search input field in the editor shown on Ctrl-F"
},
"confirmYes": {
"message": "Sim",
"description": "'Yes' button in a confirm dialog"
},
"findStylesForSite": { "findStylesForSite": {
"message": "Procurar mais estilos para este site", "message": "Procurar mais estilos para este site",
"description": "Text for a link that gets a list of styles for the current site" "description": "Text for a link that gets a list of styles for the current site"
@ -31,6 +63,10 @@
"message": "Estilos instalados", "message": "Estilos instalados",
"description": "Heading for the manage page" "description": "Heading for the manage page"
}, },
"styleBeautify": {
"message": "Embelezar",
"description": "Label for the CSS-beautifier button on the edit style page"
},
"styleEnabledLabel": { "styleEnabledLabel": {
"message": "Ativado", "message": "Ativado",
"description": "Label for the enabled state of styles" "description": "Label for the enabled state of styles"
@ -47,6 +83,30 @@
"message": "Salvar", "message": "Salvar",
"description": "Label for save button for style editing" "description": "Label for save button for style editing"
}, },
"confirmDelete": {
"message": "Deletar",
"description": ""
},
"confirmCancel": {
"message": "Cancelar",
"description": ""
},
"retrieveBckp": {
"message": "Importar estilos",
"description": ""
},
"confirmStop": {
"message": "Parar",
"description": "'Stop' button in a confirm dialog"
},
"writeStyleForURL": {
"message": "esse URL",
"description": "Text for link in toolbar pop-up to write a new style for the current URL"
},
"optionsSubheading": {
"message": "Mais Opções",
"description": "Subheading for options section on manage page."
},
"appliesAdd": { "appliesAdd": {
"message": "Adicionar", "message": "Adicionar",
"description": "Label for the button to add an 'applies' entry" "description": "Label for the button to add an 'applies' entry"
@ -64,6 +124,18 @@
} }
} }
}, },
"optionsBadgeDisabled": {
"message": "Cor de fundo quando desativado",
"description": ""
},
"optionsCheck": {
"message": "Atualizar estilos",
"description": ""
},
"searchStyles": {
"message": "Buscar conteúdos",
"description": "Label for the search filter textbox on the Manage styles page"
},
"disableStyleLabel": { "disableStyleLabel": {
"message": "Desativar", "message": "Desativar",
"description": "Label for the button to disable a style" "description": "Label for the button to disable a style"
@ -80,14 +152,30 @@
"message": "Você fez alterações neste estilo sem salvar.", "message": "Você fez alterações neste estilo sem salvar.",
"description": "Text for the prompt when changes are made to a style and the user tries to leave without saving" "description": "Text for the prompt when changes are made to a style and the user tries to leave without saving"
}, },
"importLabel": {
"message": "Importar",
"description": "Label for the button to import a style ('edit' page) or all styles ('manage' page)"
},
"updateCheckFailServerUnreachable": { "updateCheckFailServerUnreachable": {
"message": "A atualização falhou: servidor inacessível.", "message": "A atualização falhou: servidor inacessível.",
"description": "Text that displays when an update check failed because the update server is unreachable" "description": "Text that displays when an update check failed because the update server is unreachable"
}, },
"applyAllUpdates": {
"message": "Aplicar todas as atualizações",
"description": "Label for the button to apply all detected updates"
},
"deleteStyleConfirm": { "deleteStyleConfirm": {
"message": "Tem certeza de que deseja excluir este estilo?", "message": "Tem certeza de que deseja excluir este estilo?",
"description": "Confirmation before deleting a style" "description": "Confirmation before deleting a style"
}, },
"styleBadRegexp": {
"message": "Expressão regular é inválida",
"description": "Validation message for a bad regexp in a style"
},
"optionsHeading": {
"message": "Opções",
"description": "Heading for options section on manage page."
},
"appliesDisplay": { "appliesDisplay": {
"message": "Aplica-se a: $applies$", "message": "Aplica-se a: $applies$",
"description": "Text on the manage screen to describe what the style applies to", "description": "Text on the manage screen to describe what the style applies to",
@ -134,10 +222,18 @@
"message": "Remover", "message": "Remover",
"description": "Label for the button to remove an 'applies' entry" "description": "Label for the button to remove an 'applies' entry"
}, },
"replace": {
"message": "Substituir",
"description": "Label before the replace input field in the editor shown on Ctrl-H"
},
"appliesLabel": { "appliesLabel": {
"message": "Aplica-se a", "message": "Aplica-se a",
"description": "Label for 'applies to' fields on the edit/add screen" "description": "Label for 'applies to' fields on the edit/add screen"
}, },
"openOptionsPopup": {
"message": "Opções",
"description": "Go to Options UI"
},
"openManage": { "openManage": {
"message": "Gerenciar estilos instalados", "message": "Gerenciar estilos instalados",
"description": "Link to open the manage page." "description": "Link to open the manage page."
@ -159,10 +255,22 @@
"message": "Instalar atualização", "message": "Instalar atualização",
"description": "Label for the button to install an update for a single style" "description": "Label for the button to install an update for a single style"
}, },
"styleMozillaFormatHeading": {
"message": "Formato Mozilla",
"description": "Heading for the section with buttons to import/export Mozilla format of the style"
},
"sectionRemove": { "sectionRemove": {
"message": "Remover seção", "message": "Remover seção",
"description": "Label for the button to remove a section" "description": "Label for the button to remove a section"
}, },
"disableAllStyles": {
"message": "Desativar todos os estilos",
"description": "Label for the checkbox that turns all enabled styles off."
},
"undoGlobal": {
"message": "Desfazer todas as seções",
"description": "CSS-beautify global Undo button label"
},
"updateCompleted": { "updateCompleted": {
"message": "Atualização concluída.", "message": "Atualização concluída.",
"description": "Text that displays when an update completed" "description": "Text that displays when an update completed"
@ -187,10 +295,46 @@
"message": "Adicionar estilo", "message": "Adicionar estilo",
"description": "Title of the page for adding styles" "description": "Title of the page for adding styles"
}, },
"importReplaceLabel": {
"message": "Sobrescrever estilo",
"description": "Label for the button to import and overwrite current style"
},
"importAppendTooltip": {
"message": "Anexar o estilo importado ao atual",
"description": "Tooltip for the button to import a style and append to the existing sections"
},
"optionsOpen": {
"message": "Abrir",
"description": ""
},
"replaceAll": {
"message": "Substituir todos",
"description": "Label before the replace input field in the editor shown on 'replaceAll' hotkey"
},
"optionsActions": {
"message": "Ações",
"description": ""
},
"editGotoLine": {
"message": "Ir para linha (ou linha:coluna)",
"description": "Go to line or line:column on Ctrl-G in style code editor"
},
"checkAllUpdates": { "checkAllUpdates": {
"message": "Verificar atualizações para todos os estilos", "message": "Verificar atualizações para todos os estilos",
"description": "Label for the button to check all styles for updates" "description": "Label for the button to check all styles for updates"
}, },
"confirmNo": {
"message": "Não",
"description": "'No' button in a confirm dialog"
},
"undo": {
"message": "Desfazer",
"description": "Button label"
},
"replaceWith": {
"message": "Substituir com",
"description": "Label before the replace-with input field in the editor shown on Ctrl-H etc."
},
"deleteStyleLabel": { "deleteStyleLabel": {
"message": "Excluir", "message": "Excluir",
"description": "Label for the button to delete a style" "description": "Label for the button to delete a style"
@ -203,6 +347,10 @@
"message": "Editar", "message": "Editar",
"description": "Label for the button to go to the edit style page" "description": "Label for the button to go to the edit style page"
}, },
"cm_theme": {
"message": "Tema",
"description": "Label for the style editor's CSS theme."
},
"description": { "description": {
"message": "Mude o estilo da web com o Stylus, um gerenciador de estilos do usuário. O Stylus permite instalar facilmente temas e skins para Google, Facebook, YouTube, Orkut e muitos, muitos outros sites.", "message": "Mude o estilo da web com o Stylus, um gerenciador de estilos do usuário. O Stylus permite instalar facilmente temas e skins para Google, Facebook, YouTube, Orkut e muitos, muitos outros sites.",
"description": "Extension description" "description": "Extension description"

View File

@ -19,10 +19,22 @@
"message": "Exportar estilos", "message": "Exportar estilos",
"description": "" "description": ""
}, },
"sortStylesHelpTitle": {
"message": "Ordenar conteúdos",
"description": "Label for the sort info popup on the Manage styles page"
},
"exportLabel": { "exportLabel": {
"message": "Exportar", "message": "Exportar",
"description": "Label for the button to export a style ('edit' page) or all styles ('manage' page)" "description": "Label for the button to export a style ('edit' page) or all styles ('manage' page)"
}, },
"installButton": {
"message": "Instalar estilo",
"description": "Label for install button"
},
"popupHotkeysTooltip": {
"message": "Clique para ver as teclas de atalho disponíveis",
"description": "Tooltip displayed when hovering the right edge of the extension popup"
},
"optionsBadgeNormal": { "optionsBadgeNormal": {
"message": "Cor de fundo", "message": "Cor de fundo",
"description": "" "description": ""
@ -316,7 +328,7 @@
"description": "Option to make the style apply to the entered string as a URL prefix" "description": "Option to make the style apply to the entered string as a URL prefix"
}, },
"searchRegexp": { "searchRegexp": {
"message": "Usa a syntax /re/ para pesquisas regexp", "message": "Usa a sintaxe /re/ para pesquisas regexp",
"description": "Label after the search input field in the editor shown on Ctrl-F" "description": "Label after the search input field in the editor shown on Ctrl-F"
}, },
"updateCheckManualUpdateHint": { "updateCheckManualUpdateHint": {
@ -436,6 +448,10 @@
"message": "Desfazer em todas as seções", "message": "Desfazer em todas as seções",
"description": "CSS-beautify global Undo button label" "description": "CSS-beautify global Undo button label"
}, },
"genericTitle": {
"message": "Título",
"description": "Used in various parts of the UI to indicate the title of something"
},
"updateCompleted": { "updateCompleted": {
"message": "Atualização completa.", "message": "Atualização completa.",
"description": "Text that displays when an update completed" "description": "Text that displays when an update completed"
@ -452,6 +468,10 @@
"message": "Número de items aos quais se aplica", "message": "Número de items aos quais se aplica",
"description": "Label for the numeric input box to limit max number of applies-to targets in the new UI on manage page" "description": "Label for the numeric input box to limit max number of applies-to targets in the new UI on manage page"
}, },
"genericUnknown": {
"message": "Desconhecido",
"description": "Used in various parts of the UI to indicate if something is unknown (e.g. an unknown date)"
},
"manageFaviconsHelp": { "manageFaviconsHelp": {
"message": "O Stylus usa um serviço externo https://www.google.com/s2/favicons", "message": "O Stylus usa um serviço externo https://www.google.com/s2/favicons",
"description": "Label for the checkbox that toggles applies-to favicons in the new UI on manage page" "description": "Label for the checkbox that toggles applies-to favicons in the new UI on manage page"
@ -516,10 +536,18 @@
"message": "Ocorreu um erro ao usar a base de dados do Stylus. Gostarias de visitar um website com soluções possíveis?", "message": "Ocorreu um erro ao usar a base de dados do Stylus. Gostarias de visitar um website com soluções possíveis?",
"description": "Prompt when a DB error is encountered" "description": "Prompt when a DB error is encountered"
}, },
"dateInstalled": {
"message": "Data de instalação",
"description": "Option text for the user to sort the style by install date"
},
"optionsAdvanced": { "optionsAdvanced": {
"message": "Avançado", "message": "Avançado",
"description": "" "description": ""
}, },
"alphaChannel": {
"message": "Opacidade",
"description": "Label of color's opacity"
},
"importAppendTooltip": { "importAppendTooltip": {
"message": "Anexar o estilo importado ao estilo atual", "message": "Anexar o estilo importado ao estilo atual",
"description": "Tooltip for the button to import a style and append to the existing sections" "description": "Tooltip for the button to import a style and append to the existing sections"
@ -536,6 +564,10 @@
"message": "Carrega numa tecla de atalho", "message": "Carrega numa tecla de atalho",
"description": "Placeholder text of inputbox in keymap help popup on the edit style page. Must be very short" "description": "Placeholder text of inputbox in keymap help popup on the edit style page. Must be very short"
}, },
"dateUpdated": {
"message": "Última actualização",
"description": "Option text for the user to sort the style by last update date"
},
"replaceAll": { "replaceAll": {
"message": "Substituir todos", "message": "Substituir todos",
"description": "Label before the replace input field in the editor shown on 'replaceAll' hotkey" "description": "Label before the replace input field in the editor shown on 'replaceAll' hotkey"
@ -544,6 +576,10 @@
"message": "Nada foi mudado", "message": "Nada foi mudado",
"description": "Message in the report shown after importing styles" "description": "Message in the report shown after importing styles"
}, },
"confirmDiscardChanges": {
"message": "Descartar as alterações?",
"description": "Generic label or title displayed when trying to close something (not a style) with unsaved changes"
},
"optionsActions": { "optionsActions": {
"message": "Ações", "message": "Ações",
"description": "" "description": ""
@ -564,6 +600,19 @@
"message": "Opções de interface", "message": "Opções de interface",
"description": "Go to Options UI" "description": "Go to Options UI"
}, },
"sortDateNewestFirst": {
"message": "Mais recente primeiro",
"description": "Text added to indicate that sorting a date would add the newest entries at the top"
},
"installUpdateFrom": {
"message": "Actualmente o estilo é actualizado a partir de $url$",
"description": "Label to describe where the style gets update",
"placeholders": {
"url": {
"content": "$1"
}
}
},
"importReportLegendIdentical": { "importReportLegendIdentical": {
"message": "idênticos ignorados", "message": "idênticos ignorados",
"description": "Text after the number of styles skipped due to being identical to the already installed ones in the report shown after importing styles" "description": "Text after the number of styles skipped due to being identical to the already installed ones in the report shown after importing styles"

View File

@ -3,8 +3,16 @@
"message": "Allt", "message": "Allt",
"description": "Text displayed for styles that apply to all sites" "description": "Text displayed for styles that apply to all sites"
}, },
"manageOnlyUsercss": {
"message": "Endast Usercss stilar",
"description": "Checkbox to show only Usercss styles"
},
"exportLabel": {
"message": "Exportera",
"description": "Label for the button to export a style ('edit' page) or all styles ('manage' page)"
},
"cm_tabSize": { "cm_tabSize": {
"message": "Flikstorlek", "message": "Tabbstorlek",
"description": "Label for the text box controlling tab size option for the style editor." "description": "Label for the text box controlling tab size option for the style editor."
}, },
"enableStyleLabel": { "enableStyleLabel": {
@ -15,6 +23,10 @@
"message": "Ange ett namn", "message": "Ange ett namn",
"description": "Error displayed when user saves without providing a name" "description": "Error displayed when user saves without providing a name"
}, },
"genericHistoryLabel": {
"message": "Historik",
"description": "Used in various places to show a history log of something"
},
"appliesDomainOption": { "appliesDomainOption": {
"message": "URL:er på domänen", "message": "URL:er på domänen",
"description": "Option to make the style apply to the entered string as a domain" "description": "Option to make the style apply to the entered string as a domain"
@ -23,14 +35,38 @@
"message": "Leta efter uppdatering", "message": "Leta efter uppdatering",
"description": "Label for the button to check a single style for an update" "description": "Label for the button to check a single style for an update"
}, },
"styleFromMozillaFormatError": {
"message": "Import av Mozilla-format misslyckades",
"description": "Label for the import error"
},
"importAppendLabel": {
"message": "Lägg till i stil",
"description": "Label for the button to import a style and append to the existing sections"
},
"updateAllCheckSucceededNoUpdate": { "updateAllCheckSucceededNoUpdate": {
"message": "Alla stilar är fullt uppdaterade.", "message": "Alla stilar är fullt uppdaterade.",
"description": "Text that displays when an update all check completed and no updates are available" "description": "Text that displays when an update all check completed and no updates are available"
}, },
"styleFromMozillaFormatPrompt": {
"message": "Klistra in koden i Mozilla-formatet",
"description": "Prompt in the dialog displayed after clicking 'Import from Mozilla format' button"
},
"helpAlt": { "helpAlt": {
"message": "Hjälp", "message": "Hjälp",
"description": "Alternate text for help buttons" "description": "Alternate text for help buttons"
}, },
"search": {
"message": "Sök",
"description": "Label before the search input field in the editor shown on Ctrl-F"
},
"genericEnabledLabel": {
"message": "Aktiverad",
"description": "Used in various lists/options to indicate that something is enabled"
},
"confirmYes": {
"message": "Ja",
"description": "'Yes' button in a confirm dialog"
},
"findStylesForSite": { "findStylesForSite": {
"message": "Hitta fler stilar för denna sida", "message": "Hitta fler stilar för denna sida",
"description": "Text for a link that gets a list of styles for the current site" "description": "Text for a link that gets a list of styles for the current site"
@ -76,6 +112,22 @@
} }
} }
}, },
"manageOnlyLocal": {
"message": "Endast lokalt skapade stilar",
"description": "Checkbox to show only locally created styles i.e. non-updatable"
},
"searchStyles": {
"message": "Sök innehåll",
"description": "Label for the search filter textbox on the Manage styles page"
},
"manageOnlyNonUsercss": {
"message": "Endast icke-Usercss stilar",
"description": "Checkbox to show only non-Usercss (standard) styles"
},
"linkGetStyles": {
"message": "Skaffa stilar",
"description": "Help link text on the manage page e.g. https://userstyles.org"
},
"disableStyleLabel": { "disableStyleLabel": {
"message": "Inaktivera", "message": "Inaktivera",
"description": "Label for the button to disable a style" "description": "Label for the button to disable a style"
@ -100,6 +152,10 @@
"message": "Du har gjort ändringar i denna stil utan att spara.", "message": "Du har gjort ändringar i denna stil utan att spara.",
"description": "Text for the prompt when changes are made to a style and the user tries to leave without saving" "description": "Text for the prompt when changes are made to a style and the user tries to leave without saving"
}, },
"importLabel": {
"message": "Importera",
"description": "Label for the button to import a style ('edit' page) or all styles ('manage' page)"
},
"updateCheckFailServerUnreachable": { "updateCheckFailServerUnreachable": {
"message": "Uppdateringen misslyckades: server onåbar.", "message": "Uppdateringen misslyckades: server onåbar.",
"description": "Text that displays when an update check failed because the update server is unreachable" "description": "Text that displays when an update check failed because the update server is unreachable"
@ -146,6 +202,10 @@
"message": "Sektioner", "message": "Sektioner",
"description": "Title for the style sections section" "description": "Title for the style sections section"
}, },
"optionsAdvancedNewStyleAsUsercss": {
"message": "Skriv ny stil som Usercss",
"description": ""
},
"editStyleTitle": { "editStyleTitle": {
"message": "Ändra i Stil $stylename$", "message": "Ändra i Stil $stylename$",
"description": "Title of the page for editing styles", "description": "Title of the page for editing styles",
@ -163,6 +223,10 @@
"message": "URL:er som börjar på", "message": "URL:er som börjar på",
"description": "Option to make the style apply to the entered string as a URL prefix" "description": "Option to make the style apply to the entered string as a URL prefix"
}, },
"searchRegexp": {
"message": "Använd /re/ för regexp-sökning",
"description": "Label after the search input field in the editor shown on Ctrl-F"
},
"popupStylesFirst": { "popupStylesFirst": {
"message": "Lista stilar före kommandon i verktygsfältets knappmeny", "message": "Lista stilar före kommandon i verktygsfältets knappmeny",
"description": "Label for the checkbox controlling section order in the popup." "description": "Label for the checkbox controlling section order in the popup."
@ -183,14 +247,18 @@
"message": "Ta bort", "message": "Ta bort",
"description": "Label for the button to remove an 'applies' entry" "description": "Label for the button to remove an 'applies' entry"
}, },
"manageTitle": { "styleToMozillaFormatTitle": {
"message": "Tyylikäs", "message": "Stil i Mozilla-format",
"description": "Title for the manage page" "description": "Title of the popup with the style code in Mozilla format, shown after pressing the Export button on Edit style page"
}, },
"writeStyleFor": { "writeStyleFor": {
"message": "Skriv stil för:", "message": "Skriv stil för:",
"description": "Label for toolbar pop-up that precedes the links to write a new style" "description": "Label for toolbar pop-up that precedes the links to write a new style"
}, },
"replace": {
"message": "Ersätt",
"description": "Label before the replace input field in the editor shown on Ctrl-H"
},
"appliesLabel": { "appliesLabel": {
"message": "Gäller för", "message": "Gäller för",
"description": "Label for 'applies to' fields on the edit/add screen" "description": "Label for 'applies to' fields on the edit/add screen"
@ -216,6 +284,10 @@
"message": "Installera uppdatering", "message": "Installera uppdatering",
"description": "Label for the button to install an update for a single style" "description": "Label for the button to install an update for a single style"
}, },
"styleMozillaFormatHeading": {
"message": "Mozilla-format",
"description": "Heading for the section with buttons to import/export Mozilla format of the style"
},
"sectionRemove": { "sectionRemove": {
"message": "Ta bort sektion", "message": "Ta bort sektion",
"description": "Label for the button to remove a section" "description": "Label for the button to remove a section"
@ -224,6 +296,10 @@
"message": "Stäng av alla stilar", "message": "Stäng av alla stilar",
"description": "Label for the checkbox that turns all enabled styles off." "description": "Label for the checkbox that turns all enabled styles off."
}, },
"undoGlobal": {
"message": "Ångra i alla sektioner",
"description": "CSS-beautify global Undo button label"
},
"updateCompleted": { "updateCompleted": {
"message": "Uppdatering slutförd.", "message": "Uppdatering slutförd.",
"description": "Text that displays when an update completed" "description": "Text that displays when an update completed"
@ -236,6 +312,10 @@
"message": "Kod", "message": "Kod",
"description": "Label for the code for a section" "description": "Label for the code for a section"
}, },
"externalUsercssDocument": {
"message": "Dokumentation för Usercss",
"description": "Label for the external link to usercss documentation"
},
"cm_smartIndent": { "cm_smartIndent": {
"message": "Använd smart indrag", "message": "Använd smart indrag",
"description": "Label for the checkbox controlling smart indentation option for the style editor." "description": "Label for the checkbox controlling smart indentation option for the style editor."
@ -244,10 +324,18 @@
"message": "Använd 'Gäller för' alternativet för att begränsa vilka URL:er koden i denna sektion gäller för.", "message": "Använd 'Gäller för' alternativet för att begränsa vilka URL:er koden i denna sektion gäller för.",
"description": "Help text for 'applies to' section" "description": "Help text for 'applies to' section"
}, },
"linkGetHelp": {
"message": "Hjälp",
"description": "Homepage link text on the manage page e.g. https://add0n.com/stylus.html#features with chat/FAQ/intro/info"
},
"editStyleHeading": { "editStyleHeading": {
"message": "Ändra i Stil", "message": "Ändra i Stil",
"description": "Title of the page for editing styles" "description": "Title of the page for editing styles"
}, },
"manageOnlyDisabled": {
"message": "Endast inaktiverade stilar",
"description": "Checkbox to show only disabled styles"
},
"stylusUnavailableForURL": { "stylusUnavailableForURL": {
"message": "Stylus fungerar inte på sidor som denna.", "message": "Stylus fungerar inte på sidor som denna.",
"description": "Note in the toolbar pop-up when on a URL Stylus can't affect" "description": "Note in the toolbar pop-up when on a URL Stylus can't affect"
@ -256,26 +344,66 @@
"message": "Lägg till stil", "message": "Lägg till stil",
"description": "Title of the page for adding styles" "description": "Title of the page for adding styles"
}, },
"importReplaceLabel": {
"message": "Ersätt stil",
"description": "Label for the button to import and overwrite current style"
},
"dbError": { "dbError": {
"message": "Ett fel inträffades vid hanteringen av Stylus-databasen. Skulle du vilja besöka en sida med eventuella lösningar?", "message": "Ett fel inträffades vid hanteringen av Stylus-databasen. Skulle du vilja besöka en sida med eventuella lösningar?",
"description": "Prompt when a DB error is encountered" "description": "Prompt when a DB error is encountered"
}, },
"importAppendTooltip": {
"message": "Lägg till den importerad stilen i aktuell stil",
"description": "Tooltip for the button to import a style and append to the existing sections"
},
"manageOnlyExternal": {
"message": "Endast externa stilar",
"description": "Checkbox to show only externally installed styles i.e. updatable"
},
"replaceAll": {
"message": "Ersätt alla",
"description": "Label before the replace input field in the editor shown on 'replaceAll' hotkey"
},
"editGotoLine": { "editGotoLine": {
"message": "Gå till rad (eller rad:kol)", "message": "Gå till rad (eller rad:kol)",
"description": "Go to line or line:column on Ctrl-G in style code editor" "description": "Go to line or line:column on Ctrl-G in style code editor"
}, },
"checkAllUpdates": { "checkAllUpdates": {
"message": "Leta igenom alla stilar efter uppdateringar", "message": "Sök efter uppdateringar",
"description": "Label for the button to check all styles for updates" "description": "Label for the button to check all styles for updates"
}, },
"manageNewStyleAsUsercss": {
"message": "som Usercss",
"description": "VERY SHORT label for the checkbox next to the 'Write new style' button in the style manager"
},
"confirmNo": {
"message": "Nej",
"description": "'No' button in a confirm dialog"
},
"undo": {
"message": "Ångra",
"description": "Button label"
},
"cm_keyMap": { "cm_keyMap": {
"message": "Nyckelkarta", "message": "Nyckelkarta",
"description": "Label for the drop-down list controlling the keymap for the style editor." "description": "Label for the drop-down list controlling the keymap for the style editor."
}, },
"confirmSave": {
"message": "Spara",
"description": "'Save' button in a confirm dialog"
},
"genericDisabledLabel": {
"message": "Inaktiverad",
"description": "Used in various lists/options to indicate that something is disabled"
},
"cm_indentWithTabs": { "cm_indentWithTabs": {
"message": "Använd flikar med smart indrag", "message": "Använd tabbar med smart indrag",
"description": "Label for the checkbox controlling tabs with smart indentation option for the style editor." "description": "Label for the checkbox controlling tabs with smart indentation option for the style editor."
}, },
"replaceWith": {
"message": "Ersätt med",
"description": "Label before the replace-with input field in the editor shown on Ctrl-H etc."
},
"deleteStyleLabel": { "deleteStyleLabel": {
"message": "Ta bort", "message": "Ta bort",
"description": "Label for the button to delete a style" "description": "Label for the button to delete a style"
@ -292,8 +420,16 @@
"message": "Ändra", "message": "Ändra",
"description": "Label for the button to go to the edit style page" "description": "Label for the button to go to the edit style page"
}, },
"cm_theme": {
"message": "Tema",
"description": "Label for the style editor's CSS theme."
},
"description": { "description": {
"message": "Style:a om webben med Stylus, en användarstils-hanterare. Stylus låter dig enkelt installera teman och skal för många populära sidor.", "message": "Style:a om webben med Stylus, en användarstils-hanterare. Stylus låter dig enkelt installera teman och skal för många populära sidor.",
"description": "Extension description" "description": "Extension description"
},
"confirmClose": {
"message": "Stäng",
"description": "'Close' button in a confirm dialog"
} }
} }

View File

@ -39,6 +39,10 @@
"message": "每隔 N 小时检查所有样式更新0 为关闭检查)", "message": "每隔 N 小时检查所有样式更新0 为关闭检查)",
"description": "" "description": ""
}, },
"unreachableAMOHintNewFF": {
"message": "在 Firefox 60 及其更新版本中,你必须从 <extensions.webextensions.restrictedDomains> 中删除 AMO 域<about:config>",
"description": "Note in the popup when opened on addons.mozilla.org in Firefox >= 59"
},
"sortDateOldestFirst": { "sortDateOldestFirst": {
"message": "最旧的优先", "message": "最旧的优先",
"description": "Text added to indicate that sorting a date would add the oldest entries at the top" "description": "Text added to indicate that sorting a date would add the oldest entries at the top"
@ -670,6 +674,10 @@
"message": "设置规则为0 = 禁用; 1 = 警告; 2 = 错误)", "message": "设置规则为0 = 禁用; 1 = 警告; 2 = 错误)",
"description": "CSSLint rule config values" "description": "CSSLint rule config values"
}, },
"usercssReplaceTemplateSectionBody": {
"message": "在此插入代码...",
"description": "The code placeholder comment in a new style created by clicking 'Write style' in the popup"
},
"searchResultNoneFound": { "searchResultNoneFound": {
"message": "没有找到与此页面相关的样式.", "message": "没有找到与此页面相关的样式.",
"description": "Error text in the popup when inline search didn't find any site-specific styles" "description": "Error text in the popup when inline search didn't find any site-specific styles"
@ -714,6 +722,10 @@
"message": "更新已完成。", "message": "更新已完成。",
"description": "Text that displays when an update completed" "description": "Text that displays when an update completed"
}, },
"previewLabel": {
"message": "实时预览",
"description": "Label for the checkbox in style editor to enable live preview while editing."
},
"paginationTotal": { "paginationTotal": {
"message": "总页面", "message": "总页面",
"description": "" "description": ""

View File

@ -4,6 +4,7 @@ global handleCssTransitionBug detectSloppyRegexps
global openEditor global openEditor
global styleViaAPI global styleViaAPI
global loadScript global loadScript
global usercss
*/ */
'use strict'; 'use strict';
@ -17,7 +18,10 @@ window.API_METHODS = Object.assign(window.API_METHODS || {}, {
delete msg.method; delete msg.method;
return download(msg.url, msg); return download(msg.url, msg);
}, },
getPrefs: () => prefs.getAll(), parseCss({code}) {
return usercss.invokeWorker({action: 'parse', code});
},
getPrefs: prefs.getAll,
healthCheck: () => dbExec().then(() => true), healthCheck: () => dbExec().then(() => true),
detectSloppyRegexps, detectSloppyRegexps,

View File

@ -105,8 +105,10 @@ global API_METHODS
} }
function reportFailure(error) { function reportFailure(error) {
// retry once if the error is 503 Service Unavailable if ((
if (error === 503 && !retrying.has(id)) { error === 503 || // Service Unavailable
error === 429 // Too Many Requests
) && !retrying.has(id)) {
retrying.add(id); retrying.add(id);
return new Promise(resolve => { return new Promise(resolve => {
setTimeout(() => { setTimeout(() => {

View File

@ -3,7 +3,7 @@
(() => { (() => {
API_METHODS.saveUsercss = save; API_METHODS.saveUsercss = style => save(style, false);
API_METHODS.saveUsercssUnsafe = style => save(style, true); API_METHODS.saveUsercssUnsafe = style => save(style, true);
API_METHODS.buildUsercss = build; API_METHODS.buildUsercss = build;
API_METHODS.installUsercss = install; API_METHODS.installUsercss = install;

View File

@ -10,8 +10,7 @@
chrome.runtime.onMessage.addListener(onMessage); chrome.runtime.onMessage.addListener(onMessage);
document.addEventListener('DOMContentLoaded', function _() { onDOMready().then(() => {
document.removeEventListener('DOMContentLoaded', _);
window.postMessage({ window.postMessage({
direction: 'from-content-script', direction: 'from-content-script',
message: 'StylishInstalled', message: 'StylishInstalled',
@ -42,7 +41,6 @@
sendEvent(sendEvent.lastEvent); sendEvent(sendEvent.lastEvent);
}); });
}); });
return;
} }
} }
@ -243,6 +241,21 @@
function getStyleJson() { function getStyleJson() {
return getResource(getStyleURL(), {responseType: 'json'}) return getResource(getStyleURL(), {responseType: 'json'})
.then(style => {
if (!style || !Array.isArray(style.sections) || style.sections.length) {
return style;
}
const codeElement = document.getElementById('stylish-code');
if (codeElement && !codeElement.textContent.trim()) {
return style;
}
return getResource(getMeta('stylish-update-url')).then(code => new Promise(resolve => {
chrome.runtime.sendMessage({method: 'parseCss', code}, ({sections}) => {
style.sections = sections;
resolve(style);
});
}));
})
.catch(() => null); .catch(() => null);
} }
@ -324,21 +337,65 @@
// In Chrome content script is orphaned on an extension update/reload // In Chrome content script is orphaned on an extension update/reload
// so we need to detach event listeners // so we need to detach event listeners
window.removeEventListener(chrome.runtime.id + '-install', orphanCheck, true); window.removeEventListener(chrome.runtime.id + '-install', orphanCheck, true);
['Update', 'Install'].forEach(type => document.removeEventListener('stylishInstallChrome', onClick);
['', 'Chrome', 'Opera'].forEach(browser => document.removeEventListener('stylishUpdateChrome', onClick);
document.addEventListener('stylish' + type + browser, onClick)));
try { try {
chrome.runtime.onMessage.removeListener(onMessage); chrome.runtime.onMessage.removeListener(onMessage);
} catch (e) {} } catch (e) {}
} }
})(); })();
// TODO: remove the following statement when USO is fixed // run in page context
document.documentElement.appendChild(document.createElement('script')).text = '(' + document.documentElement.appendChild(document.createElement('script')).text = '(' + (
function () { EXTENSION_ORIGIN => {
document.currentScript.remove();
// spoof Stylish extension presence in Chrome
if (window.chrome && chrome.app) {
const realImage = window.Image;
window.Image = function Image(...args) {
return new Proxy(new realImage(...args), {
get(obj, key) {
return obj[key];
},
set(obj, key, value) {
if (key === 'src' && /^chrome-extension:/i.test(value)) {
setTimeout(() => typeof obj.onload === 'function' && obj.onload());
} else {
obj[key] = value;
}
return true;
},
});
};
}
// spoof USO referrer for style search in the popup
if (window !== top && location.pathname === '/') {
window.addEventListener('message', ({data, origin}) => {
if (!data ||
!data.xhr ||
origin !== EXTENSION_ORIGIN) {
return;
}
const xhr = new XMLHttpRequest();
xhr.onloadend = xhr.onerror = () => {
top.postMessage({
id: data.xhr.id,
status: xhr.status,
// [being overcautious] a string response is used instead of relying on responseType=json
// because it was invoked in a web page context so another extension may have incorrectly spoofed it
response: xhr.response,
}, EXTENSION_ORIGIN);
};
xhr.open('GET', data.xhr.url);
xhr.send();
});
}
// USO bug workaround: use the actual style settings in API response
let settings; let settings;
const originalResponseJson = Response.prototype.json; const originalResponseJson = Response.prototype.json;
document.currentScript.remove();
document.addEventListener('stylusFixBuggyUSOsettings', function _({detail}) { document.addEventListener('stylusFixBuggyUSOsettings', function _({detail}) {
document.removeEventListener('stylusFixBuggyUSOsettings', _); document.removeEventListener('stylusFixBuggyUSOsettings', _);
// TODO: remove .replace(/^\?/, '') when minimum_chrome_version >= 52 (https://crbug.com/601425) // TODO: remove .replace(/^\?/, '') when minimum_chrome_version >= 52 (https://crbug.com/601425)
@ -408,7 +465,8 @@ document.documentElement.appendChild(document.createElement('script')).text = '(
return json; return json;
}); });
}; };
} + ')()'; }
) + `)('${chrome.runtime.getURL('').slice(0, -1)}')`;
// TODO: remove the following statement when USO pagination is fixed // TODO: remove the following statement when USO pagination is fixed
if (location.search.includes('category=')) { if (location.search.includes('category=')) {

View File

@ -100,15 +100,23 @@
</select> </select>
<svg class="svg-icon select-arrow"><use xlink:href="#svg-icon-select-arrow"/></svg> <svg class="svg-icon select-arrow"><use xlink:href="#svg-icon-select-arrow"/></svg>
</div> </div>
<div class="applies-value-wrapper">
<input name="applies-value" class="applies-value style-contributor" spellcheck="false"> <input name="applies-value" class="applies-value style-contributor" spellcheck="false">
<button class="remove-applies-to" i18n-text="appliesRemove"></button> <a class="remove-applies-to" href="#" i18n-text="appliesRemove" i18n-title="appliesRemove">
<button class="add-applies-to" i18n-text="appliesAdd"></button> <svg class="svg-icon remove"><use xlink:href="#svg-icon-minus"/></svg>
</a>
<a class="add-applies-to" href="#" i18n-text="appliesAdd" i18n-title="appliesAdd">
<svg class="svg-icon add"><use xlink:href="#svg-icon-plus"/></svg>
</a>
</div>
</li> </li>
</template> </template>
<template data-id="appliesToEverything"> <template data-id="appliesToEverything">
<li class="applies-to-everything" i18n-text="appliesToEverything"> <li class="applies-to-everything" i18n-text="appliesToEverything">
<button class="add-applies-to" i18n-text="appliesSpecify"></button> <a class="add-applies-to" i18n-text="appliesAdd" i18n-title="appliesAdd" href="#">
<svg class="svg-icon add"><use xlink:href="#svg-icon-plus"/></svg>
</a>
</li> </li>
</template> </template>
@ -124,11 +132,13 @@
</label> </label>
<ul class="applies-to-list"></ul> <ul class="applies-to-list"></ul>
</div> </div>
<div class="edit-actions">
<button class="remove-section" i18n-text="sectionRemove"></button> <button class="remove-section" i18n-text="sectionRemove"></button>
<button class="add-section" i18n-text="sectionAdd"></button> <button class="add-section" i18n-text="sectionAdd"></button>
<button class="beautify-section" i18n-text="styleBeautify"></button> <button class="beautify-section" i18n-text="styleBeautify"></button>
<button class="test-regexp" i18n-text="styleRegexpTestButton"></button> <button class="test-regexp" i18n-text="styleRegexpTestButton"></button>
</div> </div>
</div>
</template> </template>
<template data-id="searchReplaceDialog"> <template data-id="searchReplaceDialog">
@ -276,12 +286,16 @@
<svg class="svg-icon info"><use xlink:href="#svg-icon-help"/></svg> <svg class="svg-icon info"><use xlink:href="#svg-icon-help"/></svg>
</a> </a>
</h2> </h2>
<div id="mozilla-format-buttons">
<button id="from-mozilla" i18n-text="importLabel"></button> <button id="from-mozilla" i18n-text="importLabel"></button>
<button id="to-mozilla" i18n-text="exportLabel"></button> <button id="to-mozilla" i18n-text="exportLabel"></button>
</div> </div>
</div>
</section> </section>
<details id="options" data-pref="editor.options.expanded"> <details id="options" data-pref="editor.options.expanded">
<summary><h2 id="options-heading" i18n-text="optionsHeading"></h2></summary> <summary><h2 id="options-heading" i18n-text="optionsHeading"></h2></summary>
<div id="options-wrapper">
<div class="options-column">
<div class="option"> <div class="option">
<label id="lineWrapping-label" i18n-text="cm_lineWrapping"> <label id="lineWrapping-label" i18n-text="cm_lineWrapping">
<input id="editor.lineWrapping" type="checkbox"> <input id="editor.lineWrapping" type="checkbox">
@ -334,6 +348,8 @@
<svg class="svg-icon checked"><use xlink:href="#svg-icon-checked"/></svg> <svg class="svg-icon checked"><use xlink:href="#svg-icon-checked"/></svg>
</label> </label>
</div> </div>
</div>
<div class="options-column">
<div class="option aligned"> <div class="option aligned">
<label id="tabSize-label" for="editor.tabSize" i18n-text="cm_tabSize"></label> <label id="tabSize-label" for="editor.tabSize" i18n-text="cm_tabSize"></label>
<input id="editor.tabSize" type="number" min="0"> <input id="editor.tabSize" type="number" min="0">
@ -380,6 +396,8 @@
<svg class="svg-icon settings"><use xlink:href="#svg-icon-settings"/></svg> <svg class="svg-icon settings"><use xlink:href="#svg-icon-settings"/></svg>
</a> </a>
</div> </div>
</div>
</div>
</details> </details>
<details id="lint" class="hidden" data-pref="editor.lint.expanded"> <details id="lint" class="hidden" data-pref="editor.lint.expanded">
<summary> <summary>
@ -439,6 +457,14 @@
<path fill-rule="evenodd" d="M983.2,184.3L853,69.8c-4-3.5-9.3-5.3-14.5-5c-5.3,0.4-10.3,2.8-13.8,6.8L352.3,609.2L184.4,386.9c-3.2-4.2-8-7-13.2-7.8c-5.3-0.8-10.6,0.6-14.9,3.9L18,487.5c-8.8,6.7-10.6,19.3-3.9,28.1L325,927.2c3.6,4.8,9.3,7.7,15.3,8c0.2,0,0.5,0,0.7,0c5.8,0,11.3-2.5,15.1-6.8L985,212.6C992.3,204.3,991.5,191.6,983.2,184.3z"/> <path fill-rule="evenodd" d="M983.2,184.3L853,69.8c-4-3.5-9.3-5.3-14.5-5c-5.3,0.4-10.3,2.8-13.8,6.8L352.3,609.2L184.4,386.9c-3.2-4.2-8-7-13.2-7.8c-5.3-0.8-10.6,0.6-14.9,3.9L18,487.5c-8.8,6.7-10.6,19.3-3.9,28.1L325,927.2c3.6,4.8,9.3,7.7,15.3,8c0.2,0,0.5,0,0.7,0c5.8,0,11.3-2.5,15.1-6.8L985,212.6C992.3,204.3,991.5,191.6,983.2,184.3z"/>
</symbol> </symbol>
<symbol id="svg-icon-plus" viewBox="0 0 8 8">
<path fill-rule="evenodd" d="M3 0v3h-3v2h3v3h2v-3h3v-2h-3v-3h-2z"/>
</symbol>
<symbol id="svg-icon-minus" viewBox="0 0 8 8">
<path fill-rule="evenodd" d="M0 3v2h8v-2h-8z"/>
</symbol>
</svg> </svg>
</body> </body>

View File

@ -34,13 +34,14 @@ function createAppliesToLineWidget(cm) {
$create('li.applies-to-everything', t('appliesToEverything')), $create('li.applies-to-everything', t('appliesToEverything')),
}; };
$('button', TPL.listItem).insertAdjacentElement('beforebegin', $('.applies-value', TPL.listItem).insertAdjacentElement('afterend',
$create('button.test-regexp', t('styleRegexpTestButton'))); $create('button.test-regexp', t('styleRegexpTestButton')));
CLICK_ROUTE = { CLICK_ROUTE = {
'.test-regexp': showRegExpTester, '.test-regexp': showRegExpTester,
'.remove-applies-to': (item, apply) => { '.remove-applies-to': (item, apply, event) => {
event.preventDefault();
const applies = item.closest('.applies-to').__applies; const applies = item.closest('.applies-to').__applies;
const i = applies.indexOf(apply); const i = applies.indexOf(apply);
let repl; let repl;
@ -72,7 +73,8 @@ function createAppliesToLineWidget(cm) {
applies.splice(i, 1); applies.splice(i, 1);
}, },
'.add-applies-to': (item, apply) => { '.add-applies-to': (item, apply, event) => {
event.preventDefault();
const applies = item.closest('.applies-to').__applies; const applies = item.closest('.applies-to').__applies;
const i = applies.indexOf(apply); const i = applies.indexOf(apply);
const pos = apply.mark.find().to; const pos = apply.mark.find().to;
@ -109,12 +111,13 @@ function createAppliesToLineWidget(cm) {
changeItem(item, apply, 'value', target.value); changeItem(item, apply, 'value', target.value);
} }
}, },
onclick({target}) { onclick(event) {
const {target} = event;
for (const selector in CLICK_ROUTE) { for (const selector in CLICK_ROUTE) {
const routed = target.closest(selector); const routed = target.closest(selector);
if (routed) { if (routed) {
const item = routed.closest('.applies-to-item'); const item = routed.closest('.applies-to-item');
CLICK_ROUTE[selector].call(routed, item, item.__apply); CLICK_ROUTE[selector].call(routed, item, item.__apply, event);
return; return;
} }
} }

View File

@ -24,7 +24,7 @@ function beautify(event) {
showHelp(t('styleBeautify'), '<div class="beautify-options">' + showHelp(t('styleBeautify'), '<div class="beautify-options">' +
optionHtml('.selector1,', 'selector_separator_newline') + optionHtml('.selector1,', 'selector_separator_newline') +
optionHtml('.selector2,', 'newline_before_open_brace') + optionHtml('.selector2', 'newline_before_open_brace') +
optionHtml('{', 'newline_after_open_brace') + optionHtml('{', 'newline_after_open_brace') +
optionHtml('border: none;', 'newline_between_properties', true) + optionHtml('border: none;', 'newline_between_properties', true) +
optionHtml('display: block;', 'newline_before_close_brace', true) + optionHtml('display: block;', 'newline_before_close_brace', true) +

View File

@ -102,9 +102,65 @@
} }
Object.assign(CodeMirror.mimeModes['text/css'].propertyKeywords, { Object.assign(CodeMirror.mimeModes['text/css'].propertyKeywords, {
// CSS Backgrounds and Borders Module L4
'background-position-x': true,
'background-position-y': true,
// CSS Logical Properties and Values L1
'block-size': true,
'border-block-color': true,
'border-block-end': true,
'border-block-end-color': true,
'border-block-end-style': true,
'border-block-end-width': true,
'border-block-start': true,
'border-block-start-color': true,
'border-block-start-style': true,
'border-block-start-width': true,
'border-block-style': true,
'border-block-width': true,
'border-inline-color': true,
'border-inline-end': true,
'border-inline-end-color': true,
'border-inline-end-style': true,
'border-inline-end-width': true,
'border-inline-start': true,
'border-inline-start-color': true,
'border-inline-start-style': true,
'border-inline-start-width': true,
'border-inline-style': true,
'border-inline-width': true,
'inline-size': true,
'inset': true,
'inset-block': true,
'inset-block-end': true,
'inset-block-start': true,
'inset-inline': true,
'inset-inline-end': true,
'inset-inline-start': true,
'margin-block': true,
'margin-block-end': true,
'margin-block-start': true,
'margin-inline': true,
'margin-inline-end': true,
'margin-inline-start': true,
'max-block-size': true,
'max-inline-size': true,
'min-block-size': true,
'min-inline-size': true,
'padding-block': true,
'padding-block-end': true,
'padding-block-start': true,
'padding-inline': true,
'padding-inline-end': true,
'padding-inline-start': true,
'text-align-all': true,
'contain': true, 'contain': true,
'mix-blend-mode': true, 'mix-blend-mode': true,
'isolation': true, 'isolation': true,
'zoom': true,
// nonstandard https://compat.spec.whatwg.org/ // nonstandard https://compat.spec.whatwg.org/
'box-reflect': true, 'box-reflect': true,
'text-fill-color': true, 'text-fill-color': true,
@ -115,6 +171,8 @@
}); });
Object.assign(CodeMirror.mimeModes['text/css'].valueKeywords, { Object.assign(CodeMirror.mimeModes['text/css'].valueKeywords, {
'isolate': true, 'isolate': true,
'recto': true,
'verso': true,
}); });
Object.assign(CodeMirror.mimeModes['text/css'].colorKeywords, { Object.assign(CodeMirror.mimeModes['text/css'].colorKeywords, {
'darkgrey': true, 'darkgrey': true,
@ -171,7 +229,7 @@
}); });
// doubleclick option // doubleclick option
{ if (typeof editors !== 'undefined') {
const fn = (cm, repeat) => const fn = (cm, repeat) =>
repeat === 'double' ? repeat === 'double' ?
{unit: selectTokenOnDoubleclick} : {unit: selectTokenOnDoubleclick} :

View File

@ -1,7 +1,9 @@
/* global parserlib CSSLint parseMozFormat */ /* global importScripts parserlib CSSLint parseMozFormat */
'use strict'; 'use strict';
self.importScripts('./parserlib.js'); const CSSLINT_PATH = '/vendor-overwrites/csslint/';
importScripts(CSSLINT_PATH + 'parserlib.js');
parserlib.css.Tokens[parserlib.css.Tokens.COMMENT].hide = false; parserlib.css.Tokens[parserlib.css.Tokens.COMMENT].hide = false;
self.onmessage = ({data}) => { self.onmessage = ({data}) => {
@ -14,7 +16,7 @@ self.onmessage = ({data}) => {
return; return;
} }
if (!self.CSSLint) self.importScripts('./csslint.js'); if (!self.CSSLint) self.importScripts(CSSLINT_PATH + 'csslint.js');
switch (action) { switch (action) {
case 'getAllRuleIds': case 'getAllRuleIds':

View File

@ -28,17 +28,12 @@ body {
} }
/************ checkbox & select************/ /************ checkbox & select************/
#options > div[class="option"] { .options-column > div[class="option"] {
margin-bottom: 4px; margin-bottom: 4px;
} }
#options > div.option:nth-last-of-type(7) { .options-column > .usercss-only {
margin-bottom: 12px; margin-bottom: .75rem;
}
#options > div.option:nth-last-of-type(7) + .usercss-only {
margin-top: -8px;
margin-bottom: 12px;
} }
label { label {
@ -53,7 +48,7 @@ label {
overflow: auto; overflow: auto;
position: fixed; position: fixed;
top: 0; top: 0;
padding: 15px; padding: 1rem;
border-right: 1px dashed #AAA; border-right: 1px dashed #AAA;
-webkit-box-shadow: 0 0 3rem -1.2rem black; -webkit-box-shadow: 0 0 3rem -1.2rem black;
box-shadow: 0 0 3rem -1.2rem black; box-shadow: 0 0 3rem -1.2rem black;
@ -154,7 +149,7 @@ label {
margin: -2px 0 0 .1rem; margin: -2px 0 0 .1rem;
} }
.svg-inline-wrapper.applies-to-help { .svg-inline-wrapper.applies-to-help {
margin: -2px 0 0 .25rem; margin: 0 0 0 .25rem;
} }
.aligned .svg-inline-wrapper { .aligned .svg-inline-wrapper {
margin: -2px 0 0 .3rem; margin: -2px 0 0 .3rem;
@ -191,8 +186,8 @@ input:invalid {
align-items: center; align-items: center;
margin-left: -13px; margin-left: -13px;
cursor: pointer; cursor: pointer;
margin-top: 8px; margin-top: .5rem;
margin-bottom: 8px; margin-bottom: .5rem;
} }
#header summary h2 { #header summary h2 {
@ -210,8 +205,31 @@ input:invalid {
margin-top: -3px; margin-top: -3px;
} }
#actions { #actions > * {
margin-bottom: .5rem; display: inline-flex;
flex-wrap: wrap;
}
#mozilla-format-container {
flex-direction: column;
}
#mozilla-format-buttons {
display: flex;
flex-wrap: wrap;
}
#actions > div > a {
height: min-content;
}
#actions button,
#actions > div > a {
margin: 0 .2rem .5rem 0;
}
#actions #cancel-button {
margin: 0;
} }
#options:not([open]) + #lint h2 { #options:not([open]) + #lint h2 {
@ -248,16 +266,23 @@ input:invalid {
/************ content ***********/ /************ content ***********/
#sections > div { #sections > div {
margin: 0.7rem; margin: 0.7rem;
padding: 1rem; padding: 1rem 1rem .3rem;
}
#sections > div:first-of-type {
padding: 0 1rem .3rem;
} }
#sections > div:not(:first-of-type) { #sections > div:not(:first-of-type) {
border-top: 2px solid black; border-top: 2px solid hsl(0, 0%, 80%);
} }
#sections > div:only-of-type .remove-section { #sections > div:only-of-type .remove-section {
display: none; display: none;
} }
#sections > div > button:not(:first-of-type) { .edit-actions {
margin-left: 0.2rem; display: flex;
flex-wrap: wrap;
}
.edit-actions button {
margin: 0 .2rem .5rem 0;
} }
.dirty > label::before { .dirty > label::before {
content: "*"; content: "*";
@ -358,45 +383,76 @@ body[data-match-highlight="selection"] .CodeMirror-selection-highlight-scrollbar
/* applies-to */ /* applies-to */
.applies-to { .applies-to {
display: flex; display: flex;
align-items: flex-start;
min-height: 30px;
flex-wrap: wrap;
} }
.applies-to label { .applies-to label {
flex: auto; display: flex;
margin-top: 0.2rem; padding: 0;
height: 22px;
align-items: center;
margin: 0 .2em 0 0;
white-space: nowrap;
} }
.applies-to ul { .applies-to ul {
flex: auto; flex: auto;
flex-grow: 99; flex-grow: 1;
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
.applies-to li { .applies-to li {
display: flex; display: flex;
flex-wrap: wrap;
list-style-type: none; list-style-type: none;
align-items: center; align-items: center;
margin-bottom: 0.35rem;
} }
.applies-to li > *:not(button):not(.select-resizer) { .applies-to li.applies-to-everything {
flex: auto; align-items: unset;
line-height: 22px;
}
.applies-to li > input {
min-height: 1.4rem; min-height: 1.4rem;
margin-left: 0.35rem;
} }
html:not(.usercss) .applies-to li .add-applies-to { .applies-to li:not(.applies-to-everything) > * {
visibility: hidden; margin: 0 .2rem .5rem 0;
text-align: left;
}
html:not(.usercss) .applies-to li:last-child .add-applies-to {
visibility: visible
} }
.applies-to li .add-applies-to:first-child { .applies-to li .add-applies-to:first-child {
margin-left: 1rem; margin-left: 1rem;
} }
.applies-to li .applies-value-wrapper {
flex-grow: 1;
display: flex;
}
.applies-to li .applies-value { .applies-to li .applies-value {
flex-grow: 99; flex-grow: 1;
padding-left: 0.2rem; padding-left: 0.2rem;
} }
.applies-to img { .applies-to img {
vertical-align: bottom; vertical-align: bottom;
} }
.add-applies-to,
.remove-applies-to {
font-size: 0;
height: 22px;
width: 22px;
display: inline-flex;
align-items: center;
justify-content: center;
cursor: pointer;
}
.add-applies-to .svg-icon,
.remove-applies-to .svg-icon {
pointer-events: none;
fill: hsl(0, 0%, 60%);
height: 12px;
width: 12px;
}
.add-applies-to:hover .svg-icon,
.remove-applies-to:hover .svg-icon {
pointer-events: none;
fill: hsl(0, 0%, 0%);
}
.test-regexp { .test-regexp {
display: none; display: none;
} }
@ -563,7 +619,7 @@ html:not(.usercss) .applies-to li:last-child .add-applies-to {
position: absolute; position: absolute;
} }
#lint > div { #lint > div {
margin-top: 4em; margin-top: 2.75rem;
} }
#lint table { #lint table {
font-size: 100%; font-size: 100%;
@ -657,12 +713,26 @@ html:not(.usercss) .usercss-only,
display: none !important; /* hide during page init */ display: none !important; /* hide during page init */
} }
#lint {
padding: 1rem 0 0;
box-sizing: border-box;
}
#options:not([open]) + #lint {
padding-top: 0;
}
#options-wrapper .options-column:nth-child(2) {
margin-top: .75rem;
}
.usercss #name { .usercss #name {
background-color: #eee; background-color: #eee;
color: #888; color: #888;
} }
#sections .single-editor { #sections .single-editor,
#sections > div.single-editor:first-of-type {
margin: 0; margin: 0;
padding: 0; padding: 0;
display: flex; display: flex;
@ -695,7 +765,7 @@ html:not(.usercss) .usercss-only,
/************ line widget *************/ /************ line widget *************/
.CodeMirror-linewidget .applies-to { .CodeMirror-linewidget .applies-to {
margin: 1em 0; margin: 1em 0;
padding: 1em; padding: .75rem .75rem .25rem;
padding-right: calc(1em + 20px); padding-right: calc(1em + 20px);
} }
@ -717,19 +787,26 @@ html:not(.usercss) .usercss-only,
/************ reponsive layouts ************/ /************ reponsive layouts ************/
@media(max-width: 850px) { @media(max-width: 850px) {
body {
display: flex;
flex-direction: column;
}
#header { #header {
width: auto; flex: 0 1 auto;
height: auto; height: unset;
width: unset;
position: inherit; position: inherit;
border-right: none; border-right: none;
border-bottom: 1px dashed #AAA; border-bottom: 1px dashed #AAA;
min-height: var(--header-narrow-min-height); padding: 0;
max-height: 50vh;
flex-wrap: wrap;
flex-direction: row;
} }
#header section:not(:last-child) { #actions {
margin-bottom: .5rem; display: flex;
flex-wrap: wrap;
white-space: nowrap;
padding: 0 1rem;
margin: 0;
box-sizing: border-box;
} }
#header input[type="checkbox"] { #header input[type="checkbox"] {
vertical-align: middle; vertical-align: middle;
@ -739,45 +816,41 @@ html:not(.usercss) .usercss-only,
display: none; display: none;
} }
#basic-info { #basic-info {
padding: .5rem 1rem;
margin: 0;
box-sizing: border-box;
display: flex; display: flex;
align-items: baseline; flex-wrap: wrap;
flex: 1;
margin-right: 2em;
}
#basic-info > * {
flex: auto;
} }
#basic-info > *:first-child { #basic-info > *:first-child {
flex-grow: 99; flex-grow: 1;
display: flex;
} }
#basic-info > *:not(:last-child) { #basic-info > *:not(:last-child) {
margin-right: 0.8rem; margin-right: 0.8rem;
} }
#basic-info #name { #basic-info #name {
width: auto; flex-grow: 1;
flex-grow: 99;
} }
#actions { #options-wrapper {
display: flex;
flex-wrap: wrap;
padding: 0 1rem .5rem;
box-sizing: border-box;
}
.options-column {
flex-grow: 1;
padding-right: .5rem;
box-sizing: border-box;
}
#options-wrapper .options-column:nth-child(2) {
margin-top: 0; margin-top: 0;
white-space: nowrap;
}
#actions > * {
display: inline-block;
}
#options {
-webkit-column-count: 3;
-moz-column-count: 3;
column-count: 3;
width: 100%;
} }
#options:not([open]), #options:not([open]),
#lint:not([open]) { #lint:not([open]) {
column-count: 1;
overflow: initial; overflow: initial;
} }
#options:not([open]) + #lint:not([open]) { #options:not([open]) + #lint:not([open]) {
margin-top: -1em; margin-top: 0;
} }
#lint { #lint {
overflow: initial; overflow: initial;
@ -786,14 +859,18 @@ html:not(.usercss) .usercss-only,
position: static; position: static;
margin-bottom: 0; margin-bottom: 0;
} }
#lint tbody {
display: flex;
flex-direction: column;
}
#options summary { #options summary {
margin-top: -.25em; margin-left: 0;
padding-left: 4px;
} }
#options h2 { #options h2 {
margin: 0 0 .5em; margin: 0 0 .5em;
} }
.option label { .option label {
line-height: 1.25rem;
margin: 0; margin: 0;
} }
#options [type="number"] { #options [type="number"] {
@ -804,11 +881,18 @@ html:not(.usercss) .usercss-only,
position: relative; position: relative;
top: 0.2rem; top: 0.2rem;
} }
#options:not([open]) ~ #lint {
margin-top: -1em;
}
#lint > div { #lint > div {
margin-top: 0; margin-top: 0;
overflow: hidden;
}
#lint {
padding: 0 1rem .5rem;
}
#lint > summary {
margin-top: 0;
}
#lint caption {
text-indent: 4px;
} }
#lint table { #lint table {
width: 100%; width: 100%;
@ -820,13 +904,20 @@ html:not(.usercss) .usercss-only,
margin: .25em 0 -1em .25em; margin: .25em 0 -1em .25em;
} }
#sections { #sections {
height: unset !important;
min-height: 0;
padding-left: 0; padding-left: 0;
display: flex;
flex-direction: column;
flex: 1;
} }
#sections > div { #sections > div {
padding: 0; margin: 0 .5rem .5rem;
padding: .5rem 0 0;
} }
#sections > *:not(h2) { #sections > div:first-of-type {
padding-left: 0.4rem; margin: .5rem;
padding: 0;
} }
.usercss .CodeMirror-scroll { .usercss .CodeMirror-scroll {
max-height: calc(100vh - var(--header-narrow-min-height)); max-height: calc(100vh - var(--header-narrow-min-height));
@ -835,27 +926,28 @@ html:not(.usercss) .usercss-only,
.usercss #lint:not([open]) + #footer { .usercss #lint:not([open]) + #footer {
margin-top: -.25em; margin-top: -.25em;
} }
#help-popup.big { #help-popup.big[style="display: block;"],
left: 3rem; #help-popup[style="display: block;"] {
} width: max-content;
} height: min-content;
max-width: 90%;
@media (max-width: 720px) { max-height: 90vh;
#options { top: 0;
-webkit-column-count: 2; bottom: 0;
-moz-column-count: 2; left: 0;
column-count: 2; right: 0;
} margin: auto;
} }
#help-popup[style*="left:"] {
@media (max-width: 450px) { left: 1rem !important;
#options { margin-top: -2.35rem;
-webkit-column-count: 1; }
-moz-column-count: 1; #help-popup:not([style*="display: block;"]),
column-count: 1; #help-popup .CodeMirror-lint-markers,
} #help-popup .CodeMirror-guttermarker-subtle {
#actions { display: none !important;
flex-wrap: wrap; }
white-space: normal; #help-popup .CodeMirror-linenumber {
padding: 0;
} }
} }

View File

@ -93,9 +93,7 @@ onDOMready().then(() => {
replaceAll: () => doReplaceAll(), replaceAll: () => doReplaceAll(),
undo: () => doUndo(), undo: () => doUndo(),
clear() { clear() {
this._input.focus(); setInputValue(this._input, '');
document.execCommand('selectAll', false, null);
document.execCommand('delete', false, null);
}, },
case() { case() {
state.icase = !state.icase; state.icase = !state.icase;
@ -535,7 +533,7 @@ onDOMready().then(() => {
setActiveEditor(cm); setActiveEditor(cm);
const dialogFocused = state.dialog && state.dialog.contains(document.activeElement); const dialogFocused = state.dialog && state.dialog.contains(document.activeElement);
let sel = dialogFocused ? '' : getSelection().toString(); let sel = dialogFocused ? '' : getSelection().toString() || cm && cm.getSelection();
sel = !sel.includes('\n') && !sel.includes('\r') && sel; sel = !sel.includes('\n') && !sel.includes('\r') && sel;
if (sel) state.find = sel; if (sel) state.find = sel;
@ -543,9 +541,7 @@ onDOMready().then(() => {
destroyDialog(); destroyDialog();
createDialog(type); createDialog(type);
} else if (sel) { } else if (sel) {
state.input.focus(); setInputValue(state.input, sel);
state.input.select();
document.execCommand('insertText', false, sel);
} }
state.input.focus(); state.input.focus();
@ -929,4 +925,19 @@ onDOMready().then(() => {
}) })
})); }));
} }
function setInputValue(input, value) {
input.focus();
input.select();
// using execCommand to add to the input's undo history
document.execCommand(value ? 'insertText' : 'delete', false, value);
// some versions of Firefox ignore execCommand
if (input.value !== value) {
input.value = value;
input.dispatchEvent(new Event('input', {bubbles: true}));
}
}
//endregion
}); });

View File

@ -20,8 +20,8 @@ var linterConfig = {
stylelint: 'editorStylelintConfig', stylelint: 'editorStylelintConfig',
}, },
worker: { worker: {
csslint: {path: '/vendor-overwrites/csslint/csslint-loader.js'}, csslint: {path: '/edit/csslint-loader.js'},
stylelint: {path: '/vendor-overwrites/stylelint/stylelint-bundle.min.js'}, stylelint: {path: '/edit/stylelint-loader.js'},
}, },
allRuleIds: { allRuleIds: {
csslint: null, csslint: null,

View File

@ -125,7 +125,7 @@ function addSection(event, section) {
div.classList.toggle('has-regexp', show); div.classList.toggle('has-regexp', show);
appliesTo.oninput = appliesTo.oninput || show && (event => { appliesTo.oninput = appliesTo.oninput || show && (event => {
if (event.target.matches('.applies-value') && if (event.target.matches('.applies-value') &&
$('.applies-type', event.target.parentElement).value === 'regexp') { $('.applies-type', event.target.closest('.applies-to-item')).value === 'regexp') {
regExpTester.update(getRegExps()); regExpTester.update(getRegExps());
} }
}); });
@ -150,31 +150,46 @@ function addSection(event, section) {
return div; return div;
} }
function addAppliesTo(list, name, value) { // may be invoked as a DOM listener
const showingEverything = $('.applies-to-everything', list) !== null; function addAppliesTo(list, type, value) {
let clickedItem;
if (this instanceof Node) {
clickedItem = this.closest('.applies-to-item');
list = this.closest('.applies-to-list');
// dummy <a> wrapper was clicked
if (arguments[0] instanceof Event) arguments[0].preventDefault();
}
const showingEverything = $('.applies-to-everything', list);
// blow away 'Everything' if it's there // blow away 'Everything' if it's there
if (showingEverything) { if (showingEverything) {
list.removeChild(list.firstChild); list.removeChild(list.firstChild);
} }
let e; let item, toFocus;
if (name) {
e = template.appliesTo.cloneNode(true); // a section is added with known applies-to
$('[name=applies-type]', e).value = name; if (type) {
$('[name=applies-value]', e).value = value; item = template.appliesTo.cloneNode(true);
$('.remove-applies-to', e).addEventListener('click', removeAppliesTo, false); $('[name=applies-type]', item).value = type;
} else if (showingEverything || list.hasChildNodes()) { $('[name=applies-value]', item).value = value;
e = template.appliesTo.cloneNode(true); $('.remove-applies-to', item).addEventListener('click', removeAppliesTo);
if (list.hasChildNodes()) {
$('[name=applies-type]', e).value = $('li:last-child [name="applies-type"]', list).value; // a "+" button was clicked
} else if (showingEverything || clickedItem) {
item = template.appliesTo.cloneNode(true);
toFocus = $('[name=applies-type]', item);
if (clickedItem) {
$('[name=applies-type]', item).value = $('[name="applies-type"]', clickedItem).value;
} }
$('.remove-applies-to', e).addEventListener('click', removeAppliesTo, false); $('.remove-applies-to', item).addEventListener('click', removeAppliesTo);
// a global section is added
} else { } else {
e = template.appliesToEverything.cloneNode(true); item = template.appliesToEverything.cloneNode(true);
} }
$('.add-applies-to', e).addEventListener('click', function () {
addAppliesTo(this.parentNode.parentNode); $('.add-applies-to', item).addEventListener('click', addAppliesTo);
}, false); list.insertBefore(item, clickedItem && clickedItem.nextElementSibling);
list.appendChild(e); if (toFocus) toFocus.focus();
} }
function setupCodeMirror(sectionDiv, code, index) { function setupCodeMirror(sectionDiv, code, index) {
@ -403,8 +418,9 @@ function getSectionsHashes() {
} }
function removeAppliesTo(event) { function removeAppliesTo(event) {
const appliesTo = event.target.parentNode; event.preventDefault();
const appliesToList = appliesTo.parentNode; const appliesTo = event.target.closest('.applies-to-item');
const appliesToList = appliesTo.closest('.applies-to-list');
removeAreaAndSetDirty(appliesTo); removeAreaAndSetDirty(appliesTo);
if (!appliesToList.hasChildNodes()) { if (!appliesToList.hasChildNodes()) {
addAppliesTo(appliesToList); addAppliesTo(appliesToList);
@ -437,7 +453,7 @@ function removeAreaAndSetDirty(area) {
} }
}); });
updateTitle(); updateTitle();
area.parentNode.removeChild(area); area.remove();
} }
function makeSectionVisible(cm) { function makeSectionVisible(cm) {

58
edit/stylelint-loader.js Normal file
View File

@ -0,0 +1,58 @@
/* global require importScripts */
'use strict';
importScripts('/vendor/stylelint-bundle/stylelint-bundle.min.js');
const stylelint = require('stylelint');
self.onmessage = ({data: {action = 'run', code, config}}) => {
switch (action) {
case 'getAllRuleIds':
// the functions are non-tranferable
self.postMessage(Object.keys(stylelint.rules));
return;
case 'getAllRuleOptions':
self.postMessage(getAllRuleOptions());
return;
case 'run':
stylelint.lint({code, config}).then(results =>
self.postMessage(results));
return;
}
};
function getAllRuleOptions() {
const options = {};
const rxPossible = /\bpossible:("(?:[^"]*?)"|\[(?:[^\]]*?)\]|\{(?:[^}]*?)\})/g;
const rxString = /"([-\w\s]{3,}?)"/g;
for (const id of Object.keys(stylelint.rules)) {
const ruleCode = String(stylelint.rules[id]);
const sets = [];
let m, mStr;
while ((m = rxPossible.exec(ruleCode))) {
const possible = m[1];
const set = [];
while ((mStr = rxString.exec(possible))) {
const s = mStr[1];
if (s.includes(' ')) {
set.push(...s.split(/\s+/));
} else {
set.push(s);
}
}
if (possible.includes('ignoreAtRules')) {
set.push('ignoreAtRules');
}
if (possible.includes('ignoreShorthands')) {
set.push('ignoreShorthands');
}
if (set.length) {
sets.push(set);
}
}
if (sets.length) {
options[id] = sets;
}
}
return options;
}

View File

@ -2,6 +2,10 @@ button {
-webkit-appearance: none; -webkit-appearance: none;
-moz-appearance: none; -moz-appearance: none;
user-select: none; user-select: none;
max-width: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
padding: 2px 7px; padding: 2px 7px;
border: 1px solid hsl(0, 0%, 62%); border: 1px solid hsl(0, 0%, 62%);
font: 400 13.3333px Arial; font: 400 13.3333px Arial;

View File

@ -45,7 +45,8 @@
</head> </head>
<body id="stylus-install-usercss"> <body id="stylus-install-usercss">
<div class="container"> <div class="container">
<div class="header"> <div id="header">
<div id="header-content-wrapper">
<h1> <h1>
<span class="meta-name"></span> <span class="meta-name"></span>
<small class="meta-version"></small> <small class="meta-version"></small>
@ -75,10 +76,13 @@
<h3 i18n-text="license"></h3> <h3 i18n-text="license"></h3>
<span class="meta-license"></span> <span class="meta-license"></span>
</div> </div>
<div class="external-link"></div>
<div id="applies-to-wrapper">
<h3 i18n-text="appliesLabel"></h3> <h3 i18n-text="appliesLabel"></h3>
<ul class="applies-to"> <ul class="applies-to">
</ul> </ul>
<div class="external-link"></div> </div>
</div>
</div> </div>
<div class="main"> <div class="main">
<div class="warnings"></div> <div class="warnings"></div>

View File

@ -1,4 +1,5 @@
body { body {
overflow: hidden;
margin: 0; margin: 0;
font: 12px arial, sans-serif; font: 12px arial, sans-serif;
background: white; background: white;
@ -37,20 +38,13 @@ input:disabled + span {
.container { .container {
display: flex; display: flex;
height: 100vh; height: 100vh;
align-items: stretch;
} }
.main { #header,
display: flex;
flex-direction: column;
flex-grow: 1;
}
.header,
.warnings { .warnings {
flex: 0 0 280px; flex: 0 0 280px;
box-sizing: border-box; box-sizing: border-box;
padding: 15px; padding: 1rem;
border-right: 1px dashed #aaa; border-right: 1px dashed #aaa;
box-shadow: 0 0 50px -18px black; box-shadow: 0 0 50px -18px black;
overflow-wrap: break-word; overflow-wrap: break-word;
@ -58,7 +52,7 @@ input:disabled + span {
z-index: 100; z-index: 100;
} }
.header.meta-init-error { #header.meta-init-error {
display: none; display: none;
} }
@ -72,7 +66,7 @@ input:disabled + span {
} }
.has-warnings .warnings { .has-warnings .warnings {
display: initial; display: flex;
} }
.warning { .warning {
@ -85,6 +79,7 @@ input:disabled + span {
overflow-wrap: break-word; overflow-wrap: break-word;
white-space: pre-wrap; white-space: pre-wrap;
margin: 1ex 0 0; margin: 1ex 0 0;
font-family: monospace;
font-weight: normal; font-weight: normal;
font-size: 80%; font-size: 80%;
} }
@ -279,19 +274,21 @@ li {
overflow: hidden; overflow: hidden;
} }
.main,
.main .CodeMirror { .main .CodeMirror {
height: auto; height: 100% !important;
width: 100% !important;
border: none; border: none;
} }
/* spinner-related */ /* spinner-related */
.header { #header {
position: relative; position: relative;
} }
.header:not(.meta-init) > *:not(.lds-spinner), #header:not(.meta-init) > *:not(.lds-spinner),
.header.meta-init > .lds-spinner { #header.meta-init > .lds-spinner {
-webkit-user-select: none; -webkit-user-select: none;
-moz-user-select: none; -moz-user-select: none;
-ms-user-select: none; -ms-user-select: none;
@ -300,7 +297,7 @@ li {
opacity: 0; opacity: 0;
} }
.header.meta-init > * { #header.meta-init > * {
opacity: 1; opacity: 1;
transition: opacity .5s; transition: opacity .5s;
-webkit-user-select: auto; -webkit-user-select: auto;
@ -450,19 +447,82 @@ label {
/************ reponsive layouts ************/ /************ reponsive layouts ************/
@media (max-width:10in) { @media (max-width: 850px) {
body {
overflow: hidden;
}
.container { .container {
flex-direction: column; flex-direction: column;
} }
.header { #header {
flex-basis: auto; flex: 0 1 auto;
border-right: none; border-right: none;
border-bottom: 1px dashed #AAA; border-bottom: 1px dashed #AAA;
max-height: 50%;
overflow-x: auto; overflow-x: auto;
overflow-y: hidden; overflow-y: hidden;
padding: 0;
} }
.has-warnings .header { #header:not(.meta-init) {
min-height: 300px;
}
.main {
flex: 1;
}
#header-content-wrapper {
display: flex;
flex-wrap: wrap;
padding: .5rem 0 0 1rem;
box-sizing: border-box;
height: min-content;
}
#header-content-wrapper > * {
flex-grow: 1;
margin: 0;
padding: 0 1rem .5rem 0;
min-width: 0;
}
#header-content-wrapper > .meta-description + .flex-wrapper {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
padding: 0;
}
#header-content-wrapper > .meta-description + .flex-wrapper > * {
display: flex;
flex-direction: column;
flex: 1;
flex-wrap: wrap;
white-space: nowrap;
padding: 0 1rem .5rem 0;
box-sizing: border-box;
}
.flex-wrapper ul {
margin: 0;
}
#header-content-wrapper > .meta-description {
flex-basis: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.actions {
display: flex;
flex-wrap: wrap;
align-items: flex-start;
}
.set-update-url p {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.actions label {
min-width: 100px;
flex: 1;
}
.actions label span {
white-space: nowrap;
}
.has-warnings #header {
min-height: 4em; min-height: 4em;
max-height: 20%; max-height: 20%;
} }
@ -473,53 +533,32 @@ label {
border-bottom: 1px dashed #b57c7c; border-bottom: 1px dashed #b57c7c;
padding-bottom: 1em; padding-bottom: 1em;
} }
.header, ul.applies-to,
.warning { .actions label {
-webkit-column-count: 3; margin: 0;
-moz-column-count: 3;
column-count: 3;
} }
h1 { #header-content-wrapper > h1 {
-webkit-column-span: all; font-size: 1.75em;
column-span: all;
margin-bottom: .5em;
}
.actions {
display: flex; display: flex;
align-items: flex-start; align-items: baseline;
}
#header-content-wrapper > h1 > .meta-version {
padding-left: 3px;
}
#header-content-wrapper > h1 > .meta-name {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
#header-content-wrapper > * h3 {
margin: 0 0 .5rem;
} }
.install { .install {
flex-shrink: 0;
margin-right: 1em; margin-right: 1em;
} }
} }
@media (max-width:7in) {
.header,
.warning {
-webkit-column-count: 2;
-moz-column-count: 2;
column-count: 2;
}
}
@media (max-width:4in) {
.header {
overflow-x: hidden;
overflow-y: auto;
max-height: 100%;
}
.header,
.warning {
-webkit-column-count: 1;
-moz-column-count: 1;
column-count: 1;
}
.warning {
border: none;
padding-bottom: unset;
}
}
/* Retina-specific stuff here */ /* Retina-specific stuff here */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
.install:after { .install:after {

View File

@ -49,7 +49,7 @@
setTimeout(() => { setTimeout(() => {
if (!installed) { if (!installed) {
$('.header').appendChild($create('.lds-spinner', $('#header').appendChild($create('.lds-spinner',
new Array(12).fill($create('div')).map(e => e.cloneNode()))); new Array(12).fill($create('div')).map(e => e.cloneNode())));
} }
}, 200); }, 200);
@ -133,15 +133,15 @@
$('.external-link').appendChild(externalLink); $('.external-link').appendChild(externalLink);
} }
$('.header').classList.add('meta-init'); $('#header').classList.add('meta-init');
$('.header').classList.remove('meta-init-error'); $('#header').classList.remove('meta-init-error');
setTimeout(() => $.remove('.lds-spinner'), 1000); setTimeout(() => $.remove('.lds-spinner'), 1000);
showError(''); showError('');
requestAnimationFrame(adjustCodeHeight); requestAnimationFrame(adjustCodeHeight);
function makeAuthor(text) { function makeAuthor(text) {
const match = text.match(/^(.+?)(?:\s+<(.+?)>)?(?:\s+\((.+?)\))$/); const match = text.match(/^(.+?)(?:\s+<(.+?)>)?(?:\s+\((.+?)\))?$/);
if (!match) { if (!match) {
return document.createTextNode(text); return document.createTextNode(text);
} }
@ -222,7 +222,7 @@
API.buildUsercss({sourceCode, checkDup: true}) API.buildUsercss({sourceCode, checkDup: true})
.then(init) .then(init)
.catch(err => { .catch(err => {
$('.header').classList.add('meta-init-error'); $('#header').classList.add('meta-init-error');
showError(err); showError(err);
}); });
} }
@ -230,7 +230,7 @@
function buildWarning(err) { function buildWarning(err) {
const contents = Array.isArray(err) ? const contents = Array.isArray(err) ?
[$create('pre', err.join('\n'))] : [$create('pre', err.join('\n'))] :
[err && err.message || err || 'Unknown error']; [err && err.message && $create('pre', err.message) || err || 'Unknown error'];
if (Number.isInteger(err.index)) { if (Number.isInteger(err.index)) {
const pos = cm.posFromIndex(err.index); const pos = cm.posFromIndex(err.index);
contents[0] = `${pos.line + 1}:${pos.ch + 1} ` + contents[0]; contents[0] = `${pos.line + 1}:${pos.ch + 1} ` + contents[0];

View File

@ -35,10 +35,9 @@ var usercss = (() => {
const BUILDER = { const BUILDER = {
default: { default: {
postprocess(sections, vars) { postprocess(sections, vars) {
const varDef = let varDef = Object.keys(vars).map(k => ` --${k}: ${vars[k].value};\n`).join('');
':root {\n' + if (!varDef) return;
Object.keys(vars).map(k => ` --${k}: ${vars[k].value};\n`).join('') + varDef = ':root {\n' + varDef + '}\n';
'}\n';
for (const section of sections) { for (const section of sections) {
if (!styleCodeEmpty(section.code)) { if (!styleCodeEmpty(section.code)) {
section.code = varDef + section.code; section.code = varDef + section.code;
@ -51,6 +50,7 @@ var usercss = (() => {
return loadScript('/vendor/stylus-lang/stylus.min.js').then(() => ( return loadScript('/vendor/stylus-lang/stylus.min.js').then(() => (
new Promise((resolve, reject) => { new Promise((resolve, reject) => {
const varDef = Object.keys(vars).map(key => `${key} = ${vars[key].value};\n`).join(''); const varDef = Object.keys(vars).map(key => `${key} = ${vars[key].value};\n`).join('');
if (!Error.captureStackTrace) Error.captureStackTrace = () => {};
window.stylus(varDef + source).render((err, output) => { window.stylus(varDef + source).render((err, output) => {
if (err) { if (err) {
reject(err); reject(err);
@ -599,7 +599,7 @@ var usercss = (() => {
function invokeWorker(message) { function invokeWorker(message) {
if (!worker.queue) { if (!worker.queue) {
worker.instance = new Worker('/vendor-overwrites/csslint/csslint-loader.js'); worker.instance = new Worker('/edit/csslint-loader.js');
worker.queue = []; worker.queue = [];
worker.instance.onmessage = ({data}) => { worker.instance.onmessage = ({data}) => {
worker.queue.shift().resolve(data.__ERROR__ ? Promise.reject(data.__ERROR__) : data); worker.queue.shift().resolve(data.__ERROR__ ? Promise.reject(data.__ERROR__) : data);
@ -616,5 +616,5 @@ var usercss = (() => {
}); });
} }
return {buildMeta, buildCode, assignVars}; return {buildMeta, buildCode, assignVars, invokeWorker};
})(); })();

View File

@ -178,9 +178,13 @@
<div id="header"> <div id="header">
<h1 id="manage-heading" i18n-text="manageHeading"></h1> <h1 id="manage-heading" i18n-text="manageHeading"></h1>
<div id="manage-settings">
<div class="settings-column">
<details id="filters" data-pref="manage.filters.expanded"> <details id="filters" data-pref="manage.filters.expanded">
<summary> <summary>
<h2 i18n-text="manageFilters">: <span id="filters-stats"></span></h2> <h2 i18n-text="manageFilters">:
<div class="filter-stats-wrapper">
<span id="filters-stats"></span>
<a id="reset-filters" href="#" tabindex="0"> <a id="reset-filters" href="#" tabindex="0">
<svg class="svg-icon" viewBox="0 0 20 20"> <svg class="svg-icon" viewBox="0 0 20 20">
<title i18n-text="genericResetLabel"></title> <title i18n-text="genericResetLabel"></title>
@ -188,6 +192,8 @@
5.5,16.2 10,11.7 14.5,16.2 16.2,14.5 11.7,10 "/> 5.5,16.2 10,11.7 14.5,16.2 16.2,14.5 11.7,10 "/>
</svg> </svg>
</a> </a>
</div>
</h2>
</summary> </summary>
<div class="filter-selection"> <div class="filter-selection">
@ -273,24 +279,25 @@
</a> </a>
</div> </div>
<p class="nowrap"> <div id="style-actions">
<div id="update-check">
<button id="check-all-updates" i18n-text="checkAllUpdates"><span id="update-progress"></span></button> <button id="check-all-updates" i18n-text="checkAllUpdates"><span id="update-progress"></span></button>
<a href="#" id="update-history" i18n-title="genericHistoryLabel" tabindex="0"> <a href="#" id="update-history" i18n-title="genericHistoryLabel" tabindex="0">
<svg class="svg-icon" viewBox="0 0 20 20" i18n-alt="helpAlt"> <svg class="svg-icon" viewBox="0 0 20 20" i18n-alt="helpAlt">
<path d="M13,7H7V6h6Zm6,6.5A5.5,5.5,0,0,1,8.61,16H4V3H16V8.61A5.5,5.5,0,0,1,19,13.5ZM8,14c0-.16,0-.84,0-1H7V12H8.21a5.46,5.46,0,0,1,.39-1H7V10H9.26a5.55,5.55,0,0,1,1.09-1H7V8h7V5H6v9Zm10-.5A4.5,4.5,0,1,0,13.5,18,4.5,4.5,0,0,0,18,13.5ZM14,13V10H13v4h4V13Z"/> <path d="M13,7H7V6h6Zm6,6.5A5.5,5.5,0,0,1,8.61,16H4V3H16V8.61A5.5,5.5,0,0,1,19,13.5ZM8,14c0-.16,0-.84,0-1H7V12H8.21a5.46,5.46,0,0,1,.39-1H7V10H9.26a5.55,5.55,0,0,1,1.09-1H7V8h7V5H6v9Zm10-.5A4.5,4.5,0,1,0,13.5,18,4.5,4.5,0,0,0,18,13.5ZM14,13V10H13v4h4V13Z"/>
</svg> </svg>
</a> </a>
</p> </div>
<p> <div id="update-all">
<button id="apply-all-updates" class="hidden" i18n-text="applyAllUpdates"></button> <button id="apply-all-updates" class="hidden" i18n-text="applyAllUpdates"></button>
<span id="update-all-no-updates" class="hidden" i18n-text="updateAllCheckSucceededNoUpdate"></span> <span id="update-all-no-updates" class="hidden" i18n-text="updateAllCheckSucceededNoUpdate"></span>
<button id="check-all-updates-force" class="hidden" i18n-text="checkAllUpdatesForce"></button> <button id="check-all-updates-force" class="hidden" i18n-text="checkAllUpdatesForce"></button>
</p> </div>
<div id="add-style-wrapper"> <div id="add-style-wrapper">
<a href="edit.html"> <a href="edit.html">
<button id="add-style-label" i18n-text="addStyleLabel" tabindex="-1" class="nowrap"></button> <button id="add-style-label" i18n-text="addStyleLabel" tabindex="-1"></button>
</a> </a>
<label id="add-style-as-usercss-wrapper"> <label id="add-style-as-usercss-wrapper">
<input type="checkbox" id="newStyleAsUsercss"> <input type="checkbox" id="newStyleAsUsercss">
@ -306,7 +313,10 @@
</a> </a>
</label> </label>
</div> </div>
</div>
</div>
<div class="settings-column">
<details id="options" data-pref="manage.options.expanded"> <details id="options" data-pref="manage.options.expanded">
<summary><h2 id="options-heading" i18n-text="optionsHeading"></h2></summary> <summary><h2 id="options-heading" i18n-text="optionsHeading"></h2></summary>
@ -341,7 +351,7 @@
<label><input id="manage.newUI.targets" type="number" min="1" max="99"><span i18n-text="manageMaxTargets"></span></label> <label><input id="manage.newUI.targets" type="number" min="1" max="99"><span i18n-text="manageMaxTargets"></span></label>
</div> </div>
<p> <div id="options-buttons">
<button id="manage-options-button" i18n-text="openOptionsManage"></button> <button id="manage-options-button" i18n-text="openOptionsManage"></button>
<button id="manage-shortcuts-button" class="chromium-only" <button id="manage-shortcuts-button" class="chromium-only"
i18n-text="shortcuts" i18n-text="shortcuts"
@ -350,28 +360,28 @@
href="https://userstyles.org/styles/browse/chrome-extension" href="https://userstyles.org/styles/browse/chrome-extension"
i18n-title="editorStylesButton" i18n-title="editorStylesButton"
target="_blank"><button i18n-text="cm_theme" tabindex="-1"></button></a> target="_blank"><button i18n-text="cm_theme" tabindex="-1"></button></a>
</p> </div>
</details> </details>
<details id="backup" data-pref="manage.backup.expanded"> <details id="backup" data-pref="manage.backup.expanded">
<summary><h2 id="backup-title" i18n-text="backupButtons"></h2></summary> <summary><h2 id="backup-title" i18n-text="backupButtons"></h2></summary>
<span id="backup-message" i18n-text="backupMessage"></span> <span id="backup-message" i18n-text="backupMessage"></span>
<p> <div id="backup-buttons">
<button id="file-all-styles" i18n-text="bckpInstStyles"></button> <button id="file-all-styles" i18n-text="bckpInstStyles"></button>
<button id="unfile-all-styles" i18n-text="retrieveBckp"></button> <button id="unfile-all-styles" i18n-text="retrieveBckp"></button>
</p>
<p>
<button id="sync-dropbox-export" i18n-text="bckpDropboxStyles"></button> <button id="sync-dropbox-export" i18n-text="bckpDropboxStyles"></button>
<button id="sync-dropbox-import" i18n-text="retrieveDropboxBckp"></button> <button id="sync-dropbox-import" i18n-text="retrieveDropboxBckp"></button>
</p> </div>
</details> </details>
<p id="manage-text"> <div id="manage-text">
<span><a href="https://userstyles.org" target="_blank" i18n-text="linkGetStyles"></a></span> <span><a href="https://userstyles.org" target="_blank" i18n-text="linkGetStyles"></a></span>
<span><a href="https://add0n.com/stylus.html#features" target="_blank" i18n-text="linkGetHelp"></a></span> <span><a href="https://add0n.com/stylus.html#features" target="_blank" i18n-text="linkGetHelp"></a></span>
<span><a href="https://github.com/openstyles/stylus/wiki" target="_blank" i18n-text="linkStylusWiki"></a></span> <span><a href="https://github.com/openstyles/stylus/wiki" target="_blank" i18n-text="linkStylusWiki"></a></span>
</p> </div>
</div>
</div>
</div> </div>

View File

@ -23,8 +23,9 @@ HTMLSelectElement.prototype.adjustWidth = function () {
singleSelect.style.width = ''; singleSelect.style.width = '';
singleSelect.appendChild(option0.cloneNode(true)); singleSelect.appendChild(option0.cloneNode(true));
parent.replaceChild(singleSelect, this); parent.replaceChild(singleSelect, this);
if (this.style.width !== singleSelect.offsetWidth + 'px') { const w = singleSelect.offsetWidth;
this.style.width = singleSelect.offsetWidth + 'px'; if (w && this.style.width !== w + 'px') {
this.style.width = w + 'px';
} }
parent.replaceChild(this, singleSelect); parent.replaceChild(this, singleSelect);
}; };

View File

@ -1,7 +1,7 @@
/* global messageBox */ /* global messageBox */
'use strict'; 'use strict';
const DROPBOX_API_KEY = ''; const DROPBOX_API_KEY = 'uyfixgzre8v1bkg';
const FILENAME_ZIP_FILE = 'stylus.json'; const FILENAME_ZIP_FILE = 'stylus.json';
const DROPBOX_FILE = 'stylus.zip'; const DROPBOX_FILE = 'stylus.zip';
const API_ERROR_STATUS_FILE_NOT_FOUND = 409; const API_ERROR_STATUS_FILE_NOT_FOUND = 409;
@ -49,7 +49,7 @@ function uploadFileDropbox(client, stylesText) {
$('#sync-dropbox-export').onclick = () => { $('#sync-dropbox-export').onclick = () => {
messageProgressBar({ title: t('bckpDropboxStyles'), text: t('connectingDropbox')}); messageProgressBar({title: t('bckpDropboxStyles'), text: t('connectingDropbox')});
hasDropboxAccessToken().then(token => { hasDropboxAccessToken().then(token => {
if (typeof token === 'undefined') { if (typeof token === 'undefined') {
@ -76,24 +76,24 @@ $('#sync-dropbox-export').onclick = () => {
}) })
/** file deleted with success, get styles and create a file */ /** file deleted with success, get styles and create a file */
.then(_ => { .then(_ => {
messageProgressBar({ title: t('bckpDropboxStyles'), text: t('gettingStyles') }); messageProgressBar({title: t('bckpDropboxStyles'), text: t('gettingStyles') });
return API.getStyles().then(styles => JSON.stringify(styles, null, '\t')); return API.getStyles().then(styles => JSON.stringify(styles, null, '\t'));
}) })
/** create zip file */ /** create zip file */
.then(stylesText => { .then(stylesText => {
messageProgressBar({ title: t('bckpDropboxStyles'), text: t('compactStyles') }); messageProgressBar({title: t('bckpDropboxStyles'), text: t('compactStyles') });
return createZipFileFromText(FILENAME_ZIP_FILE, stylesText); return createZipFileFromText(FILENAME_ZIP_FILE, stylesText);
}) })
/** create file dropbox */ /** create file dropbox */
.then(zipedText =>{ .then(zipedText =>{
messageProgressBar({ title: t('bckpDropboxStyles'), text: t('uploadingFile') }); messageProgressBar({title: t('bckpDropboxStyles'), text: t('uploadingFile') });
return uploadFileDropbox(client, zipedText); return uploadFileDropbox(client, zipedText);
}) })
/** gives feedback to user */ /** gives feedback to user */
.then(_ => messageProgressBar({ title: t('bckpDropboxStyles'), text: t('exportSavedSuccess') })) .then(_ => messageProgressBar({title: t('bckpDropboxStyles'), text: t('exportSavedSuccess') }))
/* handle not found cases and cancel action */ /* handle not found cases and cancel action */
.catch(error => { .catch(error => {
/* saving file first time */ /* saving file first time */
@ -101,21 +101,21 @@ $('#sync-dropbox-export').onclick = () => {
API.getStyles() API.getStyles()
.then(styles => { .then(styles => {
messageProgressBar({ title: t('bckpDropboxStyles'), text: t('gettingStyles') }); messageProgressBar({title: t('bckpDropboxStyles'), text: t('gettingStyles') });
return JSON.stringify(styles, null, '\t'); return JSON.stringify(styles, null, '\t');
}) })
.then(stylesText => { .then(stylesText => {
messageProgressBar({ title: t('bckpDropboxStyles'), text: t('compactStyles') }); messageProgressBar({title: t('bckpDropboxStyles'), text: t('compactStyles') });
return createZipFileFromText(FILENAME_ZIP_FILE, stylesText); return createZipFileFromText(FILENAME_ZIP_FILE, stylesText);
}) })
.then(zipedText => { .then(zipedText => {
messageProgressBar({ title: t('bckpDropboxStyles'), text: t('uploadingFile') }); messageProgressBar({title: t('bckpDropboxStyles'), text: t('uploadingFile') });
return uploadFileDropbox(client, zipedText); return uploadFileDropbox(client, zipedText);
}) })
.then(_ => messageProgressBar({ title: t('bckpDropboxStyles'), text: t('exportSavedSuccess') })) .then(_ => messageProgressBar({title: t('bckpDropboxStyles'), text: t('exportSavedSuccess') }))
.catch(err => messageBox.alert(err)); .catch(err => messageBox.alert(err));
return; return;
@ -133,7 +133,7 @@ $('#sync-dropbox-export').onclick = () => {
$('#sync-dropbox-import').onclick = () => { $('#sync-dropbox-import').onclick = () => {
messageProgressBar({ title: t('retrieveDropboxBckp'), text: t('connectingDropbox') }); messageProgressBar({title: t('retrieveDropboxBckp'), text: t('connectingDropbox') });
hasDropboxAccessToken().then(token => { hasDropboxAccessToken().then(token => {
if (typeof token === 'undefined') { if (typeof token === 'undefined') {
@ -150,12 +150,12 @@ $('#sync-dropbox-import').onclick = () => {
return client.filesDownload({path: '/' + DROPBOX_FILE}) return client.filesDownload({path: '/' + DROPBOX_FILE})
.then(response => { .then(response => {
messageProgressBar({ title: t('retrieveDropboxBckp'), text: t('descompactStyles') }); messageProgressBar({title: t('retrieveDropboxBckp'), text: t('descompactStyles') });
return readZipFileFromBlob(response.fileBlob); return readZipFileFromBlob(response.fileBlob);
}) })
.then(zipedFileBlob => { .then(zipedFileBlob => {
messageProgressBar({ title: t('retrieveDropboxBckp'), text: t('readingStyles') }); messageProgressBar({title: t('retrieveDropboxBckp'), text: t('readingStyles') });
const fileBlob = zipedFileBlob; const fileBlob = zipedFileBlob;

View File

@ -49,22 +49,12 @@ select {
font-size: 12px; font-size: 12px;
} }
.nowrap {
white-space: nowrap;
}
.nowrap > * {
white-space: nowrap;
overflow-x: hidden;
text-overflow: ellipsis;
}
#header { #header {
width: var(--header-width); width: var(--header-width);
height: 100vh; height: 100vh;
position: fixed; position: fixed;
top: 0; top: 0;
padding: 15px; padding: 1rem;
border-right: 1px dashed #AAA; border-right: 1px dashed #AAA;
-webkit-box-shadow: 0 0 50px -18px black; -webkit-box-shadow: 0 0 50px -18px black;
box-shadow: 0 0 50px -18px black; box-shadow: 0 0 50px -18px black;
@ -73,8 +63,13 @@ select {
z-index: 9; z-index: 9;
} }
#update-check,
#update-all {
margin-bottom: .5rem;
}
#check-all-updates { #check-all-updates {
max-width: 220px; max-width: calc(100% - 30px);
} }
#header h1 { #header h1 {
@ -90,14 +85,12 @@ select {
#add-style-wrapper { #add-style-wrapper {
display: flex; display: flex;
align-items: center; align-items: center;
padding-bottom: 1.25em;
white-space: nowrap;
flex-wrap: wrap; flex-wrap: wrap;
} }
#add-style-wrapper > * { #add-style-wrapper > * {
/* in case the children are wrapped */ /* in case the children are wrapped */
margin-bottom: .25em; margin-bottom: .5rem;
} }
#add-style-as-usercss-wrapper { #add-style-as-usercss-wrapper {
@ -233,6 +226,11 @@ select {
display: none; display: none;
} }
.newUI .style-name::after,
.newUI .style-name-link::after {
vertical-align: text-top;
}
.disabled h2::after, .entry.usercss .style-name-link::after { .disabled h2::after, .entry.usercss .style-name-link::after {
font-weight: normal; font-weight: normal;
font-size: 11px; font-size: 11px;
@ -272,17 +270,25 @@ select {
} }
/* collapsibles */ /* collapsibles */
#header details:not(#filters) { #add-style-wrapper {
padding-bottom: .7em;
}
#add-style-wrapper,
#backup :last-child {
margin-bottom: 0; margin-bottom: 0;
} }
#options p:last-of-type { #backup-buttons {
margin-top: 0; display: flex;
flex-wrap: wrap;
margin-top: .5rem;
}
#options-buttons {
display: flex;
flex-wrap: wrap;
padding-top: .1rem;
}
#options-buttons button,
#backup-buttons button {
margin: 0 .2rem .5rem 0;
} }
#header details:not([open]), #header details:not([open]),
@ -291,17 +297,27 @@ select {
} }
#header details[open] summary { #header details[open] summary {
padding-bottom: .5em; padding-bottom: .5rem;
} }
#header summary { #header summary {
margin-top: .25rem;
align-items: center; align-items: center;
margin-left: -13px; margin-left: -13px;
cursor: pointer; cursor: pointer;
} }
#header #filters summary {
margin: 0 0 -2px -13px;
}
#header #filters summary h2 {
margin-left: -4px;
}
#header summary h2 { #header summary h2 {
display: inline-block; display: inline-flex;
flex-wrap: wrap;
border-bottom: 1px dotted transparent; border-bottom: 1px dotted transparent;
margin-top: .1em; margin-top: .1em;
margin-bottom: .1em; margin-bottom: .1em;
@ -362,6 +378,7 @@ select {
#header label { #header label {
padding-left: 16px; padding-left: 16px;
position: relative; position: relative;
white-space: nowrap;
} }
#header .filter-selection label { #header .filter-selection label {
@ -369,7 +386,6 @@ select {
box-sizing: border-box; box-sizing: border-box;
align-items: center; align-items: center;
height: 18px; height: 18px;
width: 100%;
padding: 0 0 0 8px; padding: 0 0 0 8px;
} }
@ -430,6 +446,7 @@ select {
#manage-text { #manage-text {
display: flex; display: flex;
align-items: baseline; align-items: baseline;
padding-top: .35rem;
} }
#manage-text > :not(:last-child):after { #manage-text > :not(:last-child):after {
@ -456,7 +473,7 @@ select {
cursor: pointer; cursor: pointer;
} }
.newUI .entry .style-name:hover::before { .newUI .entry .style-name::before {
content: ""; content: "";
position: absolute; position: absolute;
top: 0; top: 0;
@ -465,6 +482,13 @@ select {
bottom: 0; bottom: 0;
background: linear-gradient(to right, hsla(180, 50%, 30%, 0.2), hsla(180, 20%, 10%, 0.05) 50%, transparent); background: linear-gradient(to right, hsla(180, 50%, 30%, 0.2), hsla(180, 20%, 10%, 0.05) 50%, transparent);
pointer-events: none; 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 { .newUI .entry.enabled .style-name:hover .style-name-link {
@ -834,10 +858,6 @@ input[id^="manage.newUI"] {
border: 1px solid transparent; border: 1px solid transparent;
} }
#filters summary h2 {
margin-left: -4px;
}
.active #filters-stats { .active #filters-stats {
background-color: darkcyan; background-color: darkcyan;
border-color: darkcyan; border-color: darkcyan;
@ -846,13 +866,21 @@ input[id^="manage.newUI"] {
font-weight: normal; font-weight: normal;
padding: 2px 5px; padding: 2px 5px;
position: relative; position: relative;
top: -2px; white-space: nowrap;
} }
#reset-filters { .filter-stats-wrapper {
position: absolute; display: flex;
margin-top: 2px; align-items: center;
display: inline-block; margin-left: .2rem;
}
#header #filters summary {
white-space: nowrap;
}
#header #filters summary ::-webkit-details-marker {
margin-top: 4px
} }
#reset-filters svg { #reset-filters svg {
@ -876,21 +904,30 @@ input[id^="manage.newUI"] {
display: flex; display: flex;
align-items: center; align-items: center;
flex-wrap: wrap; flex-wrap: wrap;
margin-bottom: .5rem;
} }
#sort-wrapper { #search-wrapper {
margin-top: .25em; margin-top: .35rem;
} }
#sort-wrapper .sorter-selection { #sort-wrapper .sorter-selection {
display: inline-flex;
flex-grow: 1;
position: relative; position: relative;
width: calc(100% - 15px); max-width: calc(100% - 30px);
}
#manage\.newUI\.sort {
max-width: 100%;
}
#search {
max-width: calc(100% - 30px);
} }
#search, #manage\.newUI\.sort { #search, #manage\.newUI\.sort {
max-width: 100%;
flex-grow: 1; flex-grow: 1;
margin: 0.25rem 0 0;
background: #fff; background: #fff;
height: 20px; height: 20px;
box-sizing: border-box; box-sizing: border-box;
@ -910,11 +947,11 @@ input[id^="manage.newUI"] {
} }
#search-help, #sorter-help { #search-help, #sorter-help {
margin: 4px -5px 0 2px; margin: 0 -5px 0 2px;
} }
#sort-wrapper .select-arrow { #sort-wrapper .select-arrow {
top: 7px; top: 3px;
right: 4px; right: 4px;
} }
@ -1045,38 +1082,9 @@ input[id^="manage.newUI"] {
} }
} }
@media (max-width: 675px) { @media (max-width: 850px) {
#installed {
position: static;
padding-left: 0;
overflow: visible;
}
#header p,
#backup {
display: inline-block;
}
#find-editor-styles {
display: inline-block;
}
#backup {
margin-right: 1em;
}
#backup p {
margin: 0;
}
.entry {
margin: 0;
}
}
@media (max-width: 800px) {
body { body {
flex-direction: column; display: table;
} }
body.all-styles-hidden-by-filters:before { body.all-styles-hidden-by-filters:before {
@ -1090,16 +1098,58 @@ input[id^="manage.newUI"] {
left: 3.75rem; left: 3.75rem;
} }
html:not(.newUI) .applies-to {
word-break: break-all;
}
#installed {
table-layout: fixed;
}
.newUI .entry .actions {
padding-right: 30px
}
#search-wrapper,
#sort-wrapper,
#header summary {
max-width: 247px;
}
#message-box > div {
left: 0;
right: 0!important;
margin-left: auto;
margin-right: auto;
}
.filter-selection {
max-width: 226px;
}
#header { #header {
display: table-header-group;
height: auto; height: auto;
padding: 0;
width: 100%;
position: static; position: static;
width: auto;
border-right: none; border-right: none;
border-bottom: 1px dashed #AAA; border-bottom: 1px dashed #AAA;
overflow: visible; }
-webkit-column-count: 2;
-moz-column-count: 2; #manage-settings {
column-count: 2; display: flex;
flex-wrap: wrap;
width: 100%;
padding: .5rem 0 1rem;
}
#manage-settings > .settings-column {
display: flex;
flex-direction: column;
flex: 1;
padding: 0 1rem;
box-sizing: border-box;
} }
#installed { #installed {
@ -1114,38 +1164,50 @@ input[id^="manage.newUI"] {
display: none; display: none;
} }
#backup-buttons {
margin-top: 0;
}
#header summary {
margin-top: 0;
padding-bottom: .25rem;
}
.newUI .entry { .newUI .entry {
margin: 0; padding: 0;
} }
.newUI .style-name { .newUI .entry .checkmate {
width: 50%; position: absolute;
left: 14px;
top: 0;
bottom: 0;
margin: auto;
} }
.newUI .target { .newUI .entry .style-name {
max-width: calc(50vw - var(--actions-width)); padding: .5rem 0 .5rem 34px;
} text-indent: unset;
}
@media (max-width: 500px) {
#header {
-webkit-column-count: 1;
-moz-column-count: 1;
column-count: 1;
} }
.newUI #header > *:not(h1), .newUI .entry .actions {
.newUI #newUIoptions, width: 104px;
#newUIoptions > * { padding: .5rem 0 .5rem 6px;
display: inline;
} }
#header label { .newUI .entry .applies-to {
white-space: nowrap; padding: .25rem .5rem .25rem 0;
} }
.newUI .style-name { .newUI .entry .target {
word-break: break-all; max-width: 100%;
padding-right: 0;
}
.newUI .style-name::after,
.newUI .style-name-link::after {
text-indent: 0;
display: inline-block;
} }
} }

View File

@ -409,7 +409,13 @@ Object.assign(handleEvent, {
if (chrome.windows && openWindow) { if (chrome.windows && openWindow) {
chrome.windows.create(Object.assign(prefs.get('windowPosition'), {url})); chrome.windows.create(Object.assign(prefs.get('windowPosition'), {url}));
} else { } else {
openURL({url, active: openForegroundTab}); getOwnTab().then(({index}) => {
openURL({
url,
index: index + 1,
active: openForegroundTab
});
});
} }
} else { } else {
rememberScrollPosition(); rememberScrollPosition();
@ -458,7 +464,17 @@ Object.assign(handleEvent, {
}, },
external(event) { external(event) {
openURL({url: event.target.closest('a').href}); if (event.shiftKey && !event.altKey && !event.ctrlKey && !event.metaKey) {
// Shift-click = the built-in 'open in a new window' action
return;
}
getOwnTab().then(({index}) => {
openURL({
url: event.target.closest('a').href,
index: index + 1,
active: !event.ctrlKey || event.shiftKey,
});
});
event.preventDefault(); event.preventDefault();
}, },
@ -693,7 +709,9 @@ function usePrefsDuringPageLoad() {
el.value = value; el.value = value;
} }
} }
if (!VIVALDI) {
$$('#header select').forEach(el => el.adjustWidth()); $$('#header select').forEach(el => el.adjustWidth());
}
if (FIREFOX && 'update' in (chrome.commands || {})) { if (FIREFOX && 'update' in (chrome.commands || {})) {
const btn = $('#manage-shortcuts-button'); const btn = $('#manage-shortcuts-button');

View File

@ -1,6 +1,6 @@
{ {
"name": "Stylus", "name": "Stylus",
"version": "1.4.5", "version": "1.4.16",
"minimum_chrome_version": "49", "minimum_chrome_version": "49",
"description": "__MSG_description__", "description": "__MSG_description__",
"homepage_url": "https://add0n.com/stylus.html", "homepage_url": "https://add0n.com/stylus.html",
@ -14,6 +14,8 @@
"permissions": [ "permissions": [
"tabs", "tabs",
"webNavigation", "webNavigation",
"webRequest",
"webRequestBlocking",
"contextMenus", "contextMenus",
"storage", "storage",
"alarms", "alarms",
@ -61,7 +63,7 @@
{ {
"matches": ["http://userstyles.org/*", "https://userstyles.org/*"], "matches": ["http://userstyles.org/*", "https://userstyles.org/*"],
"run_at": "document_start", "run_at": "document_start",
"all_frames": false, "all_frames": true,
"js": ["content/install-hook-userstyles.js"] "js": ["content/install-hook-userstyles.js"]
}, },
{ {
@ -71,8 +73,25 @@
"js": ["content/install-hook-openusercss.js"] "js": ["content/install-hook-openusercss.js"]
}, },
{ {
"matches": ["<all_urls>"], "matches": [
"include_globs": ["*.user.css", "*.user.styl"], "*://*/*.user.css",
"*://*/*.user.styl",
"file://*/*.user.css",
"file://*/*.user.styl",
"ftp://*/*.user.css",
"ftp://*/*.user.styl",
"*://*/*.user.css?*",
"*://*/*.user.styl?*",
"file://*/*.user.css?*",
"file://*/*.user.styl?*",
"ftp://*/*.user.css?*",
"ftp://*/*.user.styl?*"
],
"run_at": "document_idle", "run_at": "document_idle",
"all_frames": false, "all_frames": false,
"js": ["content/install-hook-usercss.js"] "js": ["content/install-hook-usercss.js"]

View File

@ -95,7 +95,6 @@ label:not([disabled]):hover > :first-child {
cursor: pointer; cursor: pointer;
} }
button,
input[type=number], input[type=number],
input[type="color"], input[type="color"],
select, select,

View File

@ -213,9 +213,10 @@
<button id="popup-manage-button" i18n-text="openManage" <button id="popup-manage-button" i18n-text="openManage"
data-href="manage.html" i18n-title="popupManageTooltip"></button> data-href="manage.html" i18n-title="popupManageTooltip"></button>
<button id="popup-options-button" i18n-text="openOptionsPopup"></button> <button id="popup-options-button" i18n-text="openOptionsPopup"></button>
<button id="popup-shortcuts-button" class="chromium-only" <button id="popup-wiki-button"
i18n-text="shortcuts" i18n-text="linkStylusWiki"
i18n-title="shortcutsNote"></button> i18n-title="linkGetHelp"
data-href="https://github.com/openstyles/stylus/wiki"></button>
</div> </div>
</div> </div>

View File

@ -27,8 +27,8 @@ body {
} }
.firefox body { .firefox body {
background-color: #fff;
color: #000; color: #000;
background-color: #fff;
} }
body > div:not(#installed):not(#message-box):not(.colorpicker-popup) { body > div:not(#installed):not(#message-box):not(.colorpicker-popup) {
@ -208,6 +208,24 @@ html[style] .entry {
position: relative; position: relative;
} }
.entry .style-name::before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
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;
}
.entry .style-name:hover::before {
opacity: 1;
}
.entry .main-controls { .entry .main-controls {
height: 100%; height: 100%;
display: inline-flex; display: inline-flex;
@ -453,7 +471,7 @@ body.blocked .actions > .main-controls {
margin-right: 4px; margin-right: 4px;
/* several languages have labels of wildly different lengths so we try to maintain the proportion */ /* several languages have labels of wildly different lengths so we try to maintain the proportion */
flex: 1 1 auto; flex: 1 1 auto;
min-width: 4em; min-width: 2em;
} }
#popup-options button:last-child { #popup-options button:last-child {

View File

@ -96,16 +96,7 @@ function initPopup() {
window.close(); window.close();
}; };
const shortcutsButton = $('#popup-shortcuts-button'); $('#popup-wiki-button').onclick = handleEvent.openURLandHide;
shortcutsButton.dataset.href = URLS.configureCommands;
shortcutsButton.onclick = handleEvent.openURLandHide;
if (FIREFOX && 'update' in (chrome.commands || {})) {
shortcutsButton.classList.remove('chromium-only');
shortcutsButton.onclick = () => API.optionsCustomizeHotkeys().then(window.close);
} else if (FIREFOX) {
shortcutsButton.remove();
}
if (!prefs.get('popup.stylesFirst')) { if (!prefs.get('popup.stylesFirst')) {
document.body.insertBefore( document.body.insertBefore(

View File

@ -44,13 +44,17 @@ window.addEventListener('showStyles:done', function _() {
const CACHE_SIZE = 1e6; const CACHE_SIZE = 1e6;
const CACHE_PREFIX = 'usoSearchCache/'; const CACHE_PREFIX = 'usoSearchCache/';
const CACHE_DURATION = 24 * 3600e3; const CACHE_DURATION = 24 * 3600e3;
const CACHE_CLEANUP_THROTTLE = 60e3; const CACHE_CLEANUP_THROTTLE = 10e3;
const CACHE_CLEANUP_NEEDED = CACHE_PREFIX + 'clean?';
const CACHE_EXCEPT_PROPS = ['css', 'discussions', 'additional_info']; const CACHE_EXCEPT_PROPS = ['css', 'discussions', 'additional_info'];
let searchTotalPages; let searchTotalPages;
let searchCurrentPage = 1; let searchCurrentPage = 1;
let searchExhausted = false; let searchExhausted = false;
let usoFrame;
let usoFrameQueue;
const processedResults = []; const processedResults = [];
const unprocessedResults = []; const unprocessedResults = [];
@ -145,6 +149,9 @@ window.addEventListener('showStyles:done', function _() {
renderActionButtons($('#' + RESULT_ID_PREFIX + usoId)); renderActionButtons($('#' + RESULT_ID_PREFIX + usoId));
} }
}); });
chromeLocal.getValue(CACHE_CLEANUP_NEEDED).then(value =>
value && debounce(cleanupCache, CACHE_CLEANUP_THROTTLE));
} }
//endregion //endregion
@ -644,9 +651,7 @@ window.addEventListener('showStyles:done', function _() {
function fetchStyleJson(result) { function fetchStyleJson(result) {
return Promise.resolve( return Promise.resolve(
result.json || result.json ||
download(BASE_URL + '/styles/chrome/' + result.id + '.json', { downloadInFrame(BASE_URL + '/styles/chrome/' + result.id + '.json').then(json => {
responseType: 'json',
}).then(json => {
result.json = json; result.json = json;
return json; return json;
})); }));
@ -660,15 +665,7 @@ window.addEventListener('showStyles:done', function _() {
function fetchStyle(userstylesId) { function fetchStyle(userstylesId) {
return readCache(userstylesId).then(json => return readCache(userstylesId).then(json =>
json || json ||
download(BASE_URL + '/api/v1/styles/' + userstylesId, { downloadInFrame(BASE_URL + '/api/v1/styles/' + userstylesId).then(writeCache));
method: 'GET',
headers: {
'Content-type': 'application/json',
'Accept': '*/*'
},
responseType: 'json',
body: null
}).then(writeCache));
} }
/** /**
@ -697,15 +694,7 @@ window.addEventListener('showStyles:done', function _() {
return readCache(cacheKey) return readCache(cacheKey)
.then(json => .then(json =>
json || json ||
download(searchURL, { downloadInFrame(searchURL).then(writeCache))
method: 'GET',
headers: {
'Content-type': 'application/json',
'Accept': '*/*'
},
responseType: 'json',
body: null
}).then(writeCache))
.then(json => { .then(json => {
searchCurrentPage = json.current_page + 1; searchCurrentPage = json.current_page + 1;
searchTotalPages = json.total_pages; searchTotalPages = json.total_pages;
@ -742,6 +731,7 @@ window.addEventListener('showStyles:done', function _() {
setTimeout(writeCache, 100, data, true); setTimeout(writeCache, 100, data, true);
return data; return data;
} else { } else {
chromeLocal.setValue(CACHE_CLEANUP_NEEDED, true);
debounce(cleanupCache, CACHE_CLEANUP_THROTTLE); debounce(cleanupCache, CACHE_CLEANUP_THROTTLE);
return chromeLocal.loadLZStringScript().then(() => return chromeLocal.loadLZStringScript().then(() =>
chromeLocal.setValue(CACHE_PREFIX + data.id, { chromeLocal.setValue(CACHE_PREFIX + data.id, {
@ -756,15 +746,16 @@ window.addEventListener('showStyles:done', function _() {
} }
function cleanupCache() { function cleanupCache() {
if (!chrome.storage.local.getBytesInUse) { chromeLocal.remove(CACHE_CLEANUP_NEEDED);
chrome.storage.local.get(null, cleanupCacheInternal); if (chrome.storage.local.getBytesInUse) {
} else {
chrome.storage.local.getBytesInUse(null, size => { chrome.storage.local.getBytesInUse(null, size => {
if (size > CACHE_SIZE) { if (size > CACHE_SIZE) {
chrome.storage.local.get(null, cleanupCacheInternal); chrome.storage.local.get(null, cleanupCacheInternal);
} }
ignoreChromeError(); ignoreChromeError();
}); });
} else {
chrome.storage.local.get(null, cleanupCacheInternal);
} }
} }
@ -783,5 +774,91 @@ window.addEventListener('showStyles:done', function _() {
ignoreChromeError(); ignoreChromeError();
} }
//endregion
//region USO referrer spoofing via iframe
function downloadInFrame(url) {
return usoFrame ? new Promise((resolve, reject) => {
const id = performance.now();
const timeout = setTimeout(() => {
const {reject} = usoFrameQueue.get(id) || {};
usoFrameQueue.delete(id);
if (reject) reject();
}, 10e3);
const data = {url, resolve, reject, timeout};
usoFrameQueue.set(id, data);
usoFrame.contentWindow.postMessage({xhr: {id, url}}, '*');
}) : setupFrame().then(() => downloadInFrame(url));
}
function setupFrame() {
usoFrame = $create('iframe', {src: BASE_URL});
usoFrameQueue = new Map();
const stripHeaders = info => ({
responseHeaders: info.responseHeaders.filter(({name}) => !/^X-Frame-Options$/i.test(name)),
});
chrome.webRequest.onHeadersReceived.addListener(stripHeaders, {
urls: [BASE_URL + '/'],
types: ['sub_frame'],
}, [
'blocking',
'responseHeaders',
]);
let frameId;
const stripResources = info => {
if (!frameId &&
info.frameId &&
info.type === 'sub_frame' &&
(info.initiator === location.origin || !info.initiator) && // Chrome 63+
(info.originUrl === location.href || !info.originUrl) && // FF 48+
info.url === BASE_URL + '/') {
frameId = info.frameId;
} else if (frameId === info.frameId && info.type !== 'xmlhttprequest') {
return {redirectUrl: 'data:,'};
}
};
chrome.webRequest.onBeforeRequest.addListener(stripResources, {
urls: ['<all_urls>'],
}, [
'blocking',
]);
setTimeout(() => {
chrome.webRequest.onBeforeRequest.removeListener(stripResources);
}, 10e3);
window.addEventListener('message', ({data, origin}) => {
if (!data || origin !== BASE_URL) return;
const {resolve, reject, timeout} = usoFrameQueue.get(data.id) || {};
if (!resolve) return;
chrome.webRequest.onBeforeRequest.removeListener(stripResources);
usoFrameQueue.delete(data.id);
clearTimeout(timeout);
// [being overcautious] a string response is used instead of relying on responseType=json
// because it was invoked in a web page context so another extension may have incorrectly spoofed it
const json = tryJSONparse(data.response);
if (json && data.status < 400) {
resolve(json);
} else {
reject(data.status);
}
});
return new Promise((resolve, reject) => {
const done = event => {
chrome.webRequest.onHeadersReceived.removeListener(stripHeaders);
(event.type === 'load' ? resolve : reject)();
usoFrameQueue.forEach(({url}, id) => {
usoFrame.contentWindow.postMessage({xhr: {id, url}}, '*');
});
};
usoFrame.addEventListener('load', done, {once: true});
usoFrame.addEventListener('error', done, {once: true});
usoFrame.style.setProperty('display', 'none', 'important');
document.body.appendChild(usoFrame);
});
}
//endregion //endregion
}); });

View File

@ -0,0 +1,34 @@
CSS Beautifier
Written by Harutyun Amirjanyan, (amirjanyan@gmail.com)
https://github.com/beautify-web/js-beautify
Based on code initially developed by
Einar Lielmanis, <einar@jsbeautifier.org>
http://jsbeautifier.org/
https://github.com/beautify-web/js-beautify/blob/master/LICENSE
The MIT License (MIT)
Copyright (c) 2007-2017 Einar Lielmanis, Liam Newman, and contributors.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files
(the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -468,6 +468,7 @@
// when entering conditional groups, only rulesets are allowed // when entering conditional groups, only rulesets are allowed
if (enteringConditionalGroup) { if (enteringConditionalGroup) {
enteringConditionalGroup = false; enteringConditionalGroup = false;
insidePropertyValue = false;
insideConditionalGroup = true; insideConditionalGroup = true;
insideRule = (indentLevel > nestedLevel); insideRule = (indentLevel > nestedLevel);
} else { } else {
@ -507,11 +508,16 @@
// sass/less parent reference don't use a space // sass/less parent reference don't use a space
// sass nested pseudo-class don't use a space // sass nested pseudo-class don't use a space
/* Stylus override.
Disabling this block since we don't like the result.
// preserve space before pseudoclasses/pseudoelements, as it means "in any child" // preserve space before pseudoclasses/pseudoelements, as it means "in any child"
if (lookBack(" ") && output[output.length - 1] !== " ") { if (lookBack(" ") && output[output.length - 1] !== " ") {
output.push(" "); output.push(" ");
outputPosCol++; outputPosCol++;
} }
*/
if (peek() === ":") { if (peek() === ":") {
// pseudo-element // pseudo-element
next(); next();

View File

@ -1,3 +1,8 @@
https://github.com/easylogic/codemirror-colorpicker
https://github.com/easylogic/codemirror-colorpicker/blob/master/LICENSE
MIT License MIT License
Copyright (c) 2017 jinho park (cyberuls@gmail.com, easylogic) Copyright (c) 2017 jinho park (cyberuls@gmail.com, easylogic)

View File

@ -17,7 +17,7 @@ const colorConverter = (() => {
}; };
function format(color = '', type = color.type, hexUppercase) { function format(color = '', type = color.type, hexUppercase) {
if (!color || !type) return ''; if (!color || !type) return typeof color === 'string' ? color : '';
const a = formatAlpha(color.a); const a = formatAlpha(color.a);
const hasA = Boolean(a); const hasA = Boolean(a);
if (type === 'rgb' && color.type === 'hsl') { if (type === 'rgb' && color.type === 'hsl') {

View File

@ -620,10 +620,7 @@
if (!e.shiftKey && !e.ctrlKey && !e.altKey && !e.metaKey) { if (!e.shiftKey && !e.ctrlKey && !e.altKey && !e.metaKey) {
switch (e.which) { switch (e.which) {
case 13: case 13:
setFromInputs({});
// fallthrough to 27
case 27: case 27:
colorpickerCallback(e.which === 27 ? '' : undefined);
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
hide({notify: false}); hide({notify: false});

View File

@ -0,0 +1,27 @@
http://csslint.net/
https://github.com/CSSLint/csslint
https://github.com/CSSLint/csslint/blob/master/LICENSE
MIT License
Copyright (c) 2011 Nicole Sullivan and Nicholas C. Zakas. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@ -161,24 +161,49 @@ self.parserlib = (() => {
'background-color': '<color>', 'background-color': '<color>',
'background-image': '<bg-image>#', 'background-image': '<bg-image>#',
'background-origin': '<box>#', 'background-origin': '<box>#',
'background-position': '<bg-position>', 'background-position': '<bg-position>#',
'background-position-x': '[ center | [ left | right ]? <length-percentage>? ]#',
'background-position-y': '[ center | [ top | bottom ]? <length-percentage>? ]#',
'background-repeat': '<repeat-style>#', 'background-repeat': '<repeat-style>#',
'background-size': '<bg-size>#', 'background-size': '<bg-size>#',
'baseline-shift': 'baseline | sub | super | <percentage> | <length>', 'baseline-shift': 'baseline | sub | super | <percentage> | <length>',
'behavior': 1, 'behavior': 1,
'binding': 1, 'binding': 1,
'bleed': '<length>', 'bleed': '<length>',
'block-size': '<width>',
'bookmark-label': '<content-list>', 'bookmark-label': '<content-list>',
'bookmark-level': 'none | <integer>', 'bookmark-level': 'none | <integer>',
'bookmark-state': 'open | closed', 'bookmark-state': 'open | closed',
'bookmark-target': 'none | <uri> | attr()', 'bookmark-target': 'none | <uri> | attr()',
'border': '<border-width> || <border-style> || <color>', 'border': '<border-shorthand>',
'border-bottom': '<border-width> || <border-style> || <color>', 'border-block-color': '<color>{1,2}',
'border-block-end': '<border-shorthand>',
'border-block-end-color': '<color>',
'border-block-end-style': '<border-style>',
'border-block-end-width': '<border-width>',
'border-block-start': '<border-shorthand>',
'border-block-start-color': '<color>',
'border-block-start-style': '<border-style>',
'border-block-start-width': '<border-width>',
'border-block-style': '<border-style>{1,2}',
'border-block-width': '<border-width>{1,2}',
'border-bottom': '<border-shorthand>',
'border-bottom-color': '<color>', 'border-bottom-color': '<color>',
'border-bottom-left-radius': '<x-one-radius>', 'border-bottom-left-radius': '<x-one-radius>',
'border-bottom-right-radius': '<x-one-radius>', 'border-bottom-right-radius': '<x-one-radius>',
'border-bottom-style': '<border-style>', 'border-bottom-style': '<border-style>',
'border-bottom-width': '<border-width>', 'border-bottom-width': '<border-width>',
'border-inline-color': '<color>{1,2}',
'border-inline-end': '<border-shorthand>',
'border-inline-end-color': '<color>',
'border-inline-end-style': '<border-style>',
'border-inline-end-width': '<border-width>',
'border-inline-start': '<border-shorthand>',
'border-inline-start-color': '<color>',
'border-inline-start-style': '<border-style>',
'border-inline-start-width': '<border-width>',
'border-inline-style': '<border-style>{1,2}',
'border-inline-width': '<border-width>{1,2}',
'border-collapse': 'collapse | separate', 'border-collapse': 'collapse | separate',
'border-color': '<color>{1,4}', 'border-color': '<color>{1,4}',
'border-image': '[ none | <image> ] || <border-image-slice> ' + 'border-image': '[ none | <image> ] || <border-image-slice> ' +
@ -189,25 +214,25 @@ self.parserlib = (() => {
'border-image-slice': '<border-image-slice>', 'border-image-slice': '<border-image-slice>',
'border-image-source': '<image> | none', 'border-image-source': '<image> | none',
'border-image-width': '<border-image-width>', 'border-image-width': '<border-image-width>',
'border-left': '<border-width> || <border-style> || <color>', 'border-left': '<border-shorthand>',
'border-left-color': '<color>', 'border-left-color': '<color>',
'border-left-style': '<border-style>', 'border-left-style': '<border-style>',
'border-left-width': '<border-width>', 'border-left-width': '<border-width>',
'border-radius': '<border-radius>', 'border-radius': '<border-radius>',
'border-right': '<border-width> || <border-style> || <color>', 'border-right': '<border-shorthand>',
'border-right-color': '<color>', 'border-right-color': '<color>',
'border-right-style': '<border-style>', 'border-right-style': '<border-style>',
'border-right-width': '<border-width>', 'border-right-width': '<border-width>',
'border-spacing': '<length>{1,2}', 'border-spacing': '<length>{1,2}',
'border-style': '<border-style>{1,4}', 'border-style': '<border-style>{1,4}',
'border-top': '<border-width> || <border-style> || <color>', 'border-top': '<border-shorthand>',
'border-top-color': '<color>', 'border-top-color': '<color>',
'border-top-left-radius': '<x-one-radius>', 'border-top-left-radius': '<x-one-radius>',
'border-top-right-radius': '<x-one-radius>', 'border-top-right-radius': '<x-one-radius>',
'border-top-style': '<border-style>', 'border-top-style': '<border-style>',
'border-top-width': '<border-width>', 'border-top-width': '<border-width>',
'border-width': '<border-width>{1,4}', 'border-width': '<border-width>{1,4}',
'bottom': '<margin-width>', 'bottom': '<width>',
'box-decoration-break': 'slice | clone', 'box-decoration-break': 'slice | clone',
'box-shadow': '<box-shadow>', 'box-shadow': '<box-shadow>',
'box-sizing': 'content-box | border-box', 'box-sizing': 'content-box | border-box',
@ -237,8 +262,8 @@ self.parserlib = (() => {
// C // C
'caret-color': 'auto | <color>', 'caret-color': 'auto | <color>',
'caption-side': 'top | bottom', 'caption-side': 'top | bottom | inline-start | inline-end',
'clear': 'none | right | left | both', 'clear': 'none | right | left | both | inline-start | inline-end',
'clip': 'rect() | inset-rect() | auto', 'clip': 'rect() | inset-rect() | auto',
'clip-path': '<clip-source> | <clip-path> | none', 'clip-path': '<clip-source> | <clip-path> | none',
'clip-rule': 'nonzero | evenodd', 'clip-rule': 'nonzero | evenodd',
@ -250,7 +275,7 @@ self.parserlib = (() => {
'column-count': '<integer> | auto', 'column-count': '<integer> | auto',
'column-fill': 'auto | balance', 'column-fill': 'auto | balance',
'column-gap': '<column-gap>', 'column-gap': '<column-gap>',
'column-rule': '<border-width> || <border-style> || <color>', 'column-rule': '<border-shorthand>',
'column-rule-color': '<color>', 'column-rule-color': '<color>',
'column-rule-style': '<border-style>', 'column-rule-style': '<border-style>',
'column-rule-width': '<border-width>', 'column-rule-width': '<border-width>',
@ -314,7 +339,7 @@ self.parserlib = (() => {
'flex-grow': '<number>', 'flex-grow': '<number>',
'flex-shrink': '<number>', 'flex-shrink': '<number>',
'flex-wrap': 'nowrap | wrap | wrap-reverse', 'flex-wrap': 'nowrap | wrap | wrap-reverse',
'float': 'left | right | none', 'float': 'left | right | none | inline-start | inline-end',
'float-offset': 1, 'float-offset': 1,
'flood-color': 1, 'flood-color': 1,
'flood-opacity': '<opacity-value>', 'flood-opacity': '<opacity-value>',
@ -381,6 +406,14 @@ self.parserlib = (() => {
'image-resolution': 1, 'image-resolution': 1,
'ime-mode': 'auto | normal | active | inactive | disabled', 'ime-mode': 'auto | normal | active | inactive | disabled',
'inline-box-align': 'last | <integer>', 'inline-box-align': 'last | <integer>',
'inline-size': '<width>',
'inset': '<width>{1,4}',
'inset-block': '<width>{1,2}',
'inset-block-end': '<width>',
'inset-block-start': '<width>',
'inset-inline': '<width>{1,2}',
'inset-inline-end': '<width>',
'inset-inline-start': '<width>',
'isolation': 'auto | isolate', 'isolation': 'auto | isolate',
// J // J
@ -393,7 +426,7 @@ self.parserlib = (() => {
'kerning': 'auto | <length>', 'kerning': 'auto | <length>',
// L // L
'left': '<margin-width>', 'left': '<width>',
'letter-spacing': '<length> | normal', 'letter-spacing': '<length> | normal',
'line-height': '<line-height>', 'line-height': '<line-height>',
'line-break': 'auto | loose | normal | strict', 'line-break': 'auto | loose | normal | strict',
@ -409,11 +442,17 @@ self.parserlib = (() => {
'georgian | lower-alpha | upper-alpha | none', 'georgian | lower-alpha | upper-alpha | none',
// M // M
'margin': '<margin-width>{1,4}', 'margin': '<width>{1,4}',
'margin-bottom': '<margin-width>', 'margin-bottom': '<width>',
'margin-left': '<margin-width>', 'margin-left': '<width>',
'margin-right': '<margin-width>', 'margin-right': '<width>',
'margin-top': '<margin-width>', 'margin-top': '<width>',
'margin-block': '<width>{1,2}',
'margin-block-end': '<width>',
'margin-block-start': '<width>',
'margin-inline': '<width>{1,2}',
'margin-inline-end': '<width>',
'margin-inline-start': '<width>',
'mark': 1, 'mark': 1,
'mark-after': 1, 'mark-after': 1,
'mark-before': 1, 'mark-before': 1,
@ -431,6 +470,10 @@ self.parserlib = (() => {
'max-width': 'none | <width-height>', 'max-width': 'none | <width-height>',
'min-height': 'auto | <width-height>', 'min-height': 'auto | <width-height>',
'min-width': 'auto | <width-height>', 'min-width': 'auto | <width-height>',
'max-block-size': '<length-percentage> | none',
'max-inline-size': '<length-percentage> | none',
'min-block-size': '<length-percentage>',
'min-inline-size': '<length-percentage>',
'mix-blend-mode': '<blend-mode>', 'mix-blend-mode': '<blend-mode>',
'move-to': 1, 'move-to': 1,
@ -460,13 +503,19 @@ self.parserlib = (() => {
// P // P
'padding': '<padding-width>{1,4}', 'padding': '<padding-width>{1,4}',
'padding-block': '<padding-width>{1,2}',
'padding-block-end': '<padding-width>',
'padding-block-start': '<padding-width>',
'padding-bottom': '<padding-width>', 'padding-bottom': '<padding-width>',
'padding-inline': '<padding-width>{1,2}',
'padding-inline-end': '<padding-width>',
'padding-inline-start': '<padding-width>',
'padding-left': '<padding-width>', 'padding-left': '<padding-width>',
'padding-right': '<padding-width>', 'padding-right': '<padding-width>',
'padding-top': '<padding-width>', 'padding-top': '<padding-width>',
'page': 1, 'page': 1,
'page-break-after': 'auto | always | avoid | left | right', 'page-break-after': 'auto | always | avoid | left | right | recto | verso',
'page-break-before': 'auto | always | avoid | left | right', 'page-break-before': 'auto | always | avoid | left | right | recto | verso',
'page-break-inside': 'auto | avoid', 'page-break-inside': 'auto | avoid',
'page-policy': 1, 'page-policy': 1,
'pause': 1, 'pause': 1,
@ -493,12 +542,12 @@ self.parserlib = (() => {
// R // R
'rendering-intent': 1, 'rendering-intent': 1,
'resize': 1, 'resize': 'none | both | horizontal | vertical | block | inline',
'rest': 1, 'rest': 1,
'rest-after': 1, 'rest-after': 1,
'rest-before': 1, 'rest-before': 1,
'richness': 1, 'richness': 1,
'right': '<margin-width>', 'right': '<width>',
'rotate': 'none | <number>{3}? <angle>', 'rotate': 'none | <number>{3}? <angle>',
'rotation': 1, 'rotation': 1,
'rotation-point': 1, 'rotation-point': 1,
@ -538,8 +587,9 @@ self.parserlib = (() => {
'target-name': 1, 'target-name': 1,
'target-new': 1, 'target-new': 1,
'target-position': 1, 'target-position': 1,
'text-align': 'left | right | center | justify | match-parent | start | end', 'text-align': 'start | end | left | right | center | justify | match-parent | justify-all',
'text-align-last': 1, 'text-align-all': 'start | end | left | right | center | justify | match-parent',
'text-align-last': 'auto | start | end | left | right | center | justify',
'text-anchor': 'start | middle | end', 'text-anchor': 'start | middle | end',
'text-decoration': '<text-decoration-line> || <text-decoration-style> || <text-decoration-color>', 'text-decoration': '<text-decoration-line> || <text-decoration-style> || <text-decoration-color>',
'text-decoration-color': '<text-decoration-color>', 'text-decoration-color': '<text-decoration-color>',
@ -557,7 +607,7 @@ self.parserlib = (() => {
'text-shadow': 'none | [ [ <color> && <length>{2,3} ] | <length>{2,3} ]#', 'text-shadow': 'none | [ [ <color> && <length>{2,3} ] | <length>{2,3} ]#',
'text-transform': 'capitalize | uppercase | lowercase | none', 'text-transform': 'capitalize | uppercase | lowercase | none',
'text-wrap': 'normal | none | avoid', 'text-wrap': 'normal | none | avoid',
'top': '<margin-width>', 'top': '<width>',
'touch-action': 'auto | none | pan-x | pan-y | pan-left | pan-right | pan-up | pan-down | manipulation', 'touch-action': 'auto | none | pan-x | pan-y | pan-left | pan-right | pan-up | pan-down | manipulation',
'transform': 'none | <transform-function>+', 'transform': 'none | <transform-function>+',
'transform-box': 'border-box | fill-box | view-box', 'transform-box': 'border-box | fill-box | view-box',
@ -751,8 +801,6 @@ self.parserlib = (() => {
); );
}, },
'<margin-width>': '<length> | <percentage> | auto',
'<miterlimit>': function (part) { '<miterlimit>': function (part) {
return this['<number>'](part) && part.value >= 1; return this['<number>'](part) && part.value >= 1;
}, },
@ -843,7 +891,7 @@ self.parserlib = (() => {
); );
}, },
'<width>': '<margin-width>', '<width>': '<length> | <percentage> | auto',
}, },
complex: { complex: {
@ -887,6 +935,7 @@ self.parserlib = (() => {
'fill'), 'fill'),
'<border-image-width>': '[ <length> | <percentage> | <number> | auto ]{1,4}', '<border-image-width>': '[ <length> | <percentage> | <number> | auto ]{1,4}',
'<border-radius>': '<nonnegative-length-or-percentage>{1,4} [ / <nonnegative-length-or-percentage>{1,4} ]?', '<border-radius>': '<nonnegative-length-or-percentage>{1,4} [ / <nonnegative-length-or-percentage>{1,4} ]?',
'<border-shorthand>': '<border-width> || <border-style> || <color>',
'<box-shadow>': 'none | <shadow>#', '<box-shadow>': 'none | <shadow>#',
@ -4895,10 +4944,12 @@ self.parserlib = (() => {
_function({asText} = {}) { _function({asText} = {}) {
const stream = this._tokenStream; const stream = this._tokenStream;
if (!stream.match(Tokens.FUNCTION)) return null; if (!stream.match(Tokens.FUNCTION)) return null;
this._ws();
const start = stream._token; const start = stream._token;
const name = start.value.slice(0, -1); const name = start.value.slice(0, -1);
this._ws();
const expr = this._expr(lower(name)); const expr = this._expr(lower(name));
const ieFilter = this.options.ieFilters && stream.peek() === Tokens.EQUALS ? const ieFilter = this.options.ieFilters && stream.peek() === Tokens.EQUALS ?
this._functionIeFilter() : ''; this._functionIeFilter() : '';

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
Stylelint bundle file from https://github.com/Mottie/stylelint/tree/mod - see the readme for details.

View File

@ -1,3 +1,8 @@
https://codemirror.net/
https://github.com/codemirror/CodeMirror/blob/master/LICENSE
MIT License MIT License
Copyright (C) 2017 by Marijn Haverbeke <marijnh@gmail.com> and others Copyright (C) 2017 by Marijn Haverbeke <marijnh@gmail.com> and others

13
vendor/jsonlint/LICENSE vendored Normal file
View File

@ -0,0 +1,13 @@
https://github.com/zaach/jison
https://github.com/zaach/jsonlint
Copyright (c) 2009-2014 Zachary Carter
MIT LICENSE
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

181
vendor/less/LICENSE vendored Normal file
View File

@ -0,0 +1,181 @@
https://github.com/less/less.js
https://github.com/less/less.js/blob/master/LICENSE
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS

File diff suppressed because one or more lines are too long

23
vendor/lz-string/LICENSE vendored Normal file
View File

@ -0,0 +1,23 @@
http://pieroxy.net/blog/pages/lz-string/index.html
https://github.com/pieroxy/lz-string/blob/master/LICENSE.txt
Copyright (c) 2013 Pieroxy <pieroxy@pieroxy.net>
This work is free. You can redistribute it and/or modify it
under the terms of the WTFPL, Version 2
For more information see LICENSE.txt or http://www.wtfpl.net/
For more information, the home page:
http://pieroxy.net/blog/pages/lz-string/testing.html
LZ-based compression algorithm, version 1.4.4
Copyright (c) 2013 Pieroxy <pieroxy@pieroxy.net>
This work is free. You can redistribute it and/or modify it
under the terms of the WTFPL, Version 2
For more information see LICENSE.txt or http://www.wtfpl.net/
For more information, the home page:
http://pieroxy.net/blog/pages/lz-string/testing.html
LZ-based compression algorithm, version 1.4.4

20
vendor/node-semver/LICENSE vendored Normal file
View File

@ -0,0 +1,20 @@
https://github.com/eight04/node-semver-bundle
https://github.com/eight04/node-semver-bundle/blob/master/LICENSE
The ISC License
Copyright (c) Isaac Z. Schlueter and Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

26
vendor/stylelint-bundle/LICENSE vendored Normal file
View File

@ -0,0 +1,26 @@
https://github.com/stylelint/stylelint
https://github.com/openstyles/stylelint-bundle/tree/v8.0.0
https://github.com/stylelint/stylelint/blob/master/LICENSE
The MIT License (MIT)
Copyright (c) 2015 - present Maxime Thirouin, David Clark & Richard Hallows
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

File diff suppressed because one or more lines are too long

28
vendor/stylus-lang/LICENSE vendored Normal file
View File

@ -0,0 +1,28 @@
http://stylus-lang.com/
https://github.com/stylus/stylus/
https://github.com/stylus/stylus/blob/dev/LICENSE
The MIT License
Copyright (c) Automattic <developer.wordpress.com>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -1 +0,0 @@
The content of this folder belongs to [stylus preprocessor](https://github.com/stylus/stylus/).

File diff suppressed because one or more lines are too long