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
1. [Getting Involved](#getting-involved)
2. [How to Report Issues](#how-to-report-issues)
3. [Adding Tranlations](#adding-translations)
4. [Core Style Guide](#core-style-guide)
5. [Getting Started](#getting-started)
1. [Getting involved](#getting-involved)
2. [How to report issues](#how-to-report-issues)
3. [Adding translations](#adding-translations)
4. [Pull requests](#pull-requests)
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.
## 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).
## Core Style Guide
* Use the provided `.editorconfig` file with your code editor. Don't know what that is? Then check out http://editorconfig.org/.
## Getting Started
## Pull requests
* First open an issue to discuss your changes.
* 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).
* 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
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))
3. [Opera add-ons](https://addons.opera.com/extensions/details/stylus/)
2. [Firefox add-ons](https://addons.mozilla.org/firefox/addon/styl-us/)
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
@ -28,9 +28,9 @@ Stylus is a fork of Stylish for Chrome, also compatible with Firefox as a WebExt
## Help
[![Discord][chat-image]][chat-link]
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.
- [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
- Discord: [![Discord][chat-image]][chat-link]
[chat-image]: https://img.shields.io/discord/379521691774353408.svg
[chat-link]: https://discordapp.com/widget?id=379521691774353408
@ -45,12 +45,13 @@ See our [contributing](./.github/CONTRIBUTING.md) page for more details.
## 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>
Copyright (C) 2017 Stylus Team
Current Stylus:
Copyright &copy; 2017-2018 [Stylus Team](https://github.com/openstyles/stylus/graphs/contributors)
**[GNU GPLv3](./LICENSE)**
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
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.
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",
"description": "Heading for the manage page"
},
"styleBeautify": {
"message": "Code formatieren",
"description": "Label for the CSS-beautifier button on the edit style page"
},
"styleRegexpProblemTooltip": {
"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"
@ -375,7 +379,7 @@
"description": "Label (must be very short) for the checkbox in the toolbar button context menu controlling toolbar badge text."
},
"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."
},
"cm_lineWrapping": {
@ -778,7 +782,7 @@
"description": "Text that displays when an update check skipped updating the style to avoid losing local modifications"
},
"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"
},
"styleUpdateDiscardChanges": {
@ -823,7 +827,7 @@
"description": "Text after the number of styles updated entirely in the report shown after importing styles"
},
"cm_smartIndent": {
"message": "Intelligenten Einzug verwenden",
"message": "Intelligenter Einzug",
"description": "Label for the checkbox controlling smart indentation option for the style editor."
},
"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"
},
"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"
},
"findStyles": {
@ -1123,7 +1127,7 @@
"description": "'Save' button in a confirm dialog"
},
"manageNewUI": {
"message": "Neues Verwaltungs Design-Layout.",
"message": "Neues Verwaltungs-Layout",
"description": "Label for the checkbox that toggles the new UI on manage page"
},
"unreachableAMOHintOldFF": {
@ -1139,7 +1143,7 @@
"description": "Used in various lists/options to indicate that something is disabled"
},
"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."
},
"replaceWith": {
@ -1232,7 +1236,7 @@
"description": "Reset button tooltip to inform user on how to undo an accidental reset"
},
"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"
},
"confirmClose": {

View File

@ -27,6 +27,10 @@
"message": "Ainult Usercss stiilid",
"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": {
"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"
@ -48,7 +52,7 @@
"description": "Label for the button to export a style ('edit' page) or all styles ('manage' page)"
},
"installButton": {
"message": "Installi stiil",
"message": "Paigalda stiil",
"description": "Label for install button"
},
"styleMetaErrorCheckbox": {
@ -143,6 +147,10 @@
"message": "Lohista importimiseks oma varundusfail kuskile siia lehele.",
"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": {
"message": "Abi",
"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"
},
"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"
},
"confirmYes": {
@ -176,7 +184,7 @@
"description": "Text for a link that gets a list of styles for the current site"
},
"manageHeading": {
"message": "Installitud stiilid",
"message": "Paigaldatud stiilid",
"description": "Heading for the manage page"
},
"styleBeautify": {
@ -239,6 +247,10 @@
"message": "Impordi stiilid",
"description": ""
},
"cm_selectByTokens": {
"message": "Topeltklõps valib sõnesid",
"description": "Label for the checkbox in the editor."
},
"confirmStop": {
"message": "Peata",
"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"
},
"styleInstall": {
"message": "Installida \"$stylename$\" Stylus'isse?",
"message": "Paigaldad \"$stylename$\" Stylus'isse?",
"description": "Confirmation when installing a style",
"placeholders": {
"stylename": {
@ -343,7 +355,7 @@
"description": "Note in the toolbar popup for file:// URLs"
},
"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"
},
"disableStyleLabel": {
@ -366,6 +378,10 @@
"message": "Kuva aktiivsete stiilide hulka",
"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": {
"message": "Reamurdmine",
"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"
},
"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"
},
"searchRegexp": {
@ -534,7 +550,7 @@
"description": "Help text for sections"
},
"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"
},
"appliesDisplayTruncatedSuffix": {
@ -546,7 +562,7 @@
"description": "Label for the button to remove an 'applies' entry"
},
"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."
},
"styleToMozillaFormatTitle": {
@ -611,7 +627,7 @@
"description": "Label for the button to make a style apply only to specific sites"
},
"installUpdate": {
"message": "Installi uuendus",
"message": "Paigalda uuendus",
"description": "Label for the button to install an update for a single style"
},
"syncStorageErrorSaving": {
@ -623,7 +639,7 @@
"description": "Text for a checkbox that opens search results 'inline' (within the Stylus popup window)"
},
"optionsCheckUpdate": {
"message": "Kontrolli ja installi kõik saadaolevad uuendused",
"message": "Kontrolli ja paigalda kõik saadaolevad uuendused",
"description": ""
},
"clickToUninstall": {
@ -722,6 +738,10 @@
"message": "Lehti kokku",
"description": ""
},
"cm_selectByTokensTooltip": {
"message": "Sõnede näited: .foo-bar-2 #aabbcc 0.32 !important\nKeelamisel valitakse punktidega eraldatud sõnad.",
"description": ""
},
"checkingForUpdate": {
"message": "Kontrollin...",
"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"
},
"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",
"placeholders": {
"stylename": {
@ -790,7 +810,7 @@
"description": "Tooltip for the '->' (next page) button in search results"
},
"searchResultInstallCount": {
"message": "Installimisi kokku",
"message": "Paigaldusi kokku",
"description": "Text for label that shows the number of times a search result was installed"
},
"sectionCode": {
@ -838,6 +858,10 @@
"message": "Hangi abi",
"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": {
"message": "Leia stiile",
"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"
},
"dateInstalled": {
"message": "Installimise kuupäev",
"message": "Paigaldamise kuupäev",
"description": "Option text for the user to sort the style by install date"
},
"optionsAdvanced": {
@ -961,7 +985,7 @@
"description": "Tooltip for the button to import a style and append to the existing sections"
},
"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"
},
"editorStylesButton": {
@ -989,7 +1013,7 @@
"description": "Checkbox to show only externally installed styles i.e. updatable"
},
"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"
},
"replaceAll": {
@ -1021,7 +1045,7 @@
"description": "Go to line or line:column on Ctrl-G in style code editor"
},
"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"
},
"checkAllUpdates": {
@ -1074,7 +1098,7 @@
"description": "Label for the checkbox in the style editor."
},
"installButtonReinstall": {
"message": "Installi stiil uuesti",
"message": "Paigalda stiil uuesti",
"description": "Label for reinstall button"
},
"linterInvalidConfigError": {
@ -1130,6 +1154,10 @@
"message": "Uus haldusliidese välimus",
"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": {
"message": "Importimine on tagasi võetud",
"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"
},
"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"
},
"styleInstallFailed": {
"message": "Kasutajastiili installimine ebaõnnestus!\n$error$",
"message": "Kasutajastiili paigaldamine ebaõnnestus!\n$error$",
"description": "Warning when installation failed",
"placeholders": {
"error": {
@ -1196,7 +1224,7 @@
"description": "Label for the button to go to the edit style page"
},
"installButtonInstalled": {
"message": "Stiil installitud",
"message": "Stiil paigaldatud",
"description": "Text displayed when the style is successfully installed"
},
"author": {
@ -1240,7 +1268,7 @@
"description": "Wiki link text on the manage page e.g. https://github.com/openstyles/stylus/wiki"
},
"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"
},
"confirmClose": {

View File

@ -7,10 +7,18 @@
"message": "défaut",
"description": "Default CodeMirror CSS theme option on the edit style page"
},
"bckpInstStyles": {
"message": "Exporter des styles",
"description": ""
},
"exportLabel": {
"message": "Exportez",
"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": {
"message": "Taille des tabulations",
"description": "Label for the text box controlling tab size option for the style editor."
@ -31,6 +39,10 @@
"message": "Rechercher des mises à jour",
"description": "Label for the button to check a single style for an update"
},
"optionsOpenManager": {
"message": "Gérer les styles",
"description": ""
},
"updateAllCheckSucceededNoUpdate": {
"message": "All styles are up to date.",
"description": "Text that displays when an update all check completed and no updates are available"
@ -39,6 +51,10 @@
"message": "Aide",
"description": "Alternate text for help buttons"
},
"search": {
"message": "Rechercher",
"description": "Label before the search input field in the editor shown on Ctrl-F"
},
"confirmYes": {
"message": "Oui",
"description": "'Yes' button in a confirm dialog"
@ -51,6 +67,10 @@
"message": "Styles installés",
"description": "Heading for the manage page"
},
"styleBeautify": {
"message": "Embellir ",
"description": "Label for the CSS-beautifier button on the edit style page"
},
"styleEnabledLabel": {
"message": "Activé",
"description": "Label for the enabled state of styles"
@ -67,10 +87,30 @@
"message": "Enregistrer",
"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": {
"message": "cette 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": {
"message": "Ajouter",
"description": "Label for the button to add an 'applies' entry"
@ -88,6 +128,10 @@
}
}
},
"optionsCheck": {
"message": "Mettre à jour les styles",
"description": ""
},
"disableStyleLabel": {
"message": "Désactiver",
"description": "Label for the button to disable a style"
@ -108,6 +152,10 @@
"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"
},
"importLabel": {
"message": "Importer",
"description": "Label for the button to import a style ('edit' page) or all styles ('manage' page)"
},
"updateCheckFailServerUnreachable": {
"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"
@ -116,6 +164,10 @@
"message": "Filtres",
"description": "Label for filters container"
},
"applyAllUpdates": {
"message": "Appliquer toutes les mises à jour",
"description": "Label for the button to apply all detected updates"
},
"deleteStyleConfirm": {
"message": "Voulez-vous vraiment supprimer ce 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": {
"message": "Voulez-vous mettre à jour '$stylename$'?",
"description": "Confirmation when updating a style",
@ -179,10 +235,18 @@
"message": "Supprimer",
"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": {
"message": "S'applique à",
"description": "Label for 'applies to' fields on the edit/add screen"
},
"openOptionsPopup": {
"message": "Paramètres",
"description": "Go to Options UI"
},
"openManage": {
"message": "Gérer les styles installés",
"description": "Link to open the manage page."
@ -212,6 +276,10 @@
"message": "Désactiver tous les styles",
"description": "Label for the checkbox that turns all enabled styles off."
},
"undoGlobal": {
"message": "Tout annuler",
"description": "CSS-beautify global Undo button label"
},
"updateCompleted": {
"message": "Mise à jour terminée.",
"description": "Text that displays when an update completed"
@ -220,6 +288,10 @@
"message": "Vérification en cours…",
"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": {
"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"
@ -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 ?",
"description": "Prompt when a DB error is encountered"
},
"optionsOpen": {
"message": "Ouvrir",
"description": ""
},
"checkAllUpdates": {
"message": "Rechercher des mises à jour pour tous les styles",
"description": "Label for the button to check all styles for updates"
},
"openOptionsManage": {
"message": "Paramètres d'interface graphique",
"description": "Go to Options UI"
},
"confirmNo": {
"message": "Non",
"description": "'No' button in a confirm dialog"
},
"undo": {
"message": "Annuler",
"description": "Button label"
},
"deleteStyleLabel": {
"message": "Supprimer",
"description": "Label for the button to delete a style"
@ -256,10 +340,18 @@
"message": "Créer un nouveau style",
"description": "Label for the button to go to the add style page"
},
"backupButtons": {
"message": "Sauvergarde",
"description": "Heading for backup"
},
"editStyleLabel": {
"message": "Modifier",
"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": {
"message": "Tapez un nom de commande",
"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",
"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": {
"message": "Ativar",
"description": "Label for the button to enable a style"
@ -19,10 +35,26 @@
"message": "Verificar atualizações",
"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": {
"message": "Ajuda",
"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": {
"message": "Procurar mais estilos para este site",
"description": "Text for a link that gets a list of styles for the current site"
@ -31,6 +63,10 @@
"message": "Estilos instalados",
"description": "Heading for the manage page"
},
"styleBeautify": {
"message": "Embelezar",
"description": "Label for the CSS-beautifier button on the edit style page"
},
"styleEnabledLabel": {
"message": "Ativado",
"description": "Label for the enabled state of styles"
@ -47,6 +83,30 @@
"message": "Salvar",
"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": {
"message": "Adicionar",
"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": {
"message": "Desativar",
"description": "Label for the button to disable a style"
@ -80,14 +152,30 @@
"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"
},
"importLabel": {
"message": "Importar",
"description": "Label for the button to import a style ('edit' page) or all styles ('manage' page)"
},
"updateCheckFailServerUnreachable": {
"message": "A atualização falhou: servidor inacessível.",
"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": {
"message": "Tem certeza de que deseja excluir este estilo?",
"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": {
"message": "Aplica-se a: $applies$",
"description": "Text on the manage screen to describe what the style applies to",
@ -134,10 +222,18 @@
"message": "Remover",
"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": {
"message": "Aplica-se a",
"description": "Label for 'applies to' fields on the edit/add screen"
},
"openOptionsPopup": {
"message": "Opções",
"description": "Go to Options UI"
},
"openManage": {
"message": "Gerenciar estilos instalados",
"description": "Link to open the manage page."
@ -159,10 +255,22 @@
"message": "Instalar atualização",
"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": {
"message": "Remover seção",
"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": {
"message": "Atualização concluída.",
"description": "Text that displays when an update completed"
@ -187,10 +295,46 @@
"message": "Adicionar estilo",
"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": {
"message": "Verificar atualizações para todos os estilos",
"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": {
"message": "Excluir",
"description": "Label for the button to delete a style"
@ -203,6 +347,10 @@
"message": "Editar",
"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": {
"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"

View File

@ -19,10 +19,22 @@
"message": "Exportar estilos",
"description": ""
},
"sortStylesHelpTitle": {
"message": "Ordenar conteúdos",
"description": "Label for the sort info popup on the Manage styles page"
},
"exportLabel": {
"message": "Exportar",
"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": {
"message": "Cor de fundo",
"description": ""
@ -316,7 +328,7 @@
"description": "Option to make the style apply to the entered string as a URL prefix"
},
"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"
},
"updateCheckManualUpdateHint": {
@ -436,6 +448,10 @@
"message": "Desfazer em todas as seções",
"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": {
"message": "Atualização completa.",
"description": "Text that displays when an update completed"
@ -452,6 +468,10 @@
"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"
},
"genericUnknown": {
"message": "Desconhecido",
"description": "Used in various parts of the UI to indicate if something is unknown (e.g. an unknown date)"
},
"manageFaviconsHelp": {
"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"
@ -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?",
"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": {
"message": "Avançado",
"description": ""
},
"alphaChannel": {
"message": "Opacidade",
"description": "Label of color's opacity"
},
"importAppendTooltip": {
"message": "Anexar o estilo importado ao estilo atual",
"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",
"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": {
"message": "Substituir todos",
"description": "Label before the replace input field in the editor shown on 'replaceAll' hotkey"
@ -544,6 +576,10 @@
"message": "Nada foi mudado",
"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": {
"message": "Ações",
"description": ""
@ -564,6 +600,19 @@
"message": "Opções de interface",
"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": {
"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"

View File

@ -3,8 +3,16 @@
"message": "Allt",
"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": {
"message": "Flikstorlek",
"message": "Tabbstorlek",
"description": "Label for the text box controlling tab size option for the style editor."
},
"enableStyleLabel": {
@ -15,6 +23,10 @@
"message": "Ange ett namn",
"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": {
"message": "URL:er på domänen",
"description": "Option to make the style apply to the entered string as a domain"
@ -23,14 +35,38 @@
"message": "Leta efter uppdatering",
"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": {
"message": "Alla stilar är fullt uppdaterade.",
"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": {
"message": "Hjälp",
"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": {
"message": "Hitta fler stilar för denna sida",
"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": {
"message": "Inaktivera",
"description": "Label for the button to disable a style"
@ -100,6 +152,10 @@
"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"
},
"importLabel": {
"message": "Importera",
"description": "Label for the button to import a style ('edit' page) or all styles ('manage' page)"
},
"updateCheckFailServerUnreachable": {
"message": "Uppdateringen misslyckades: server onåbar.",
"description": "Text that displays when an update check failed because the update server is unreachable"
@ -146,6 +202,10 @@
"message": "Sektioner",
"description": "Title for the style sections section"
},
"optionsAdvancedNewStyleAsUsercss": {
"message": "Skriv ny stil som Usercss",
"description": ""
},
"editStyleTitle": {
"message": "Ändra i Stil $stylename$",
"description": "Title of the page for editing styles",
@ -163,6 +223,10 @@
"message": "URL:er som börjar på",
"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": {
"message": "Lista stilar före kommandon i verktygsfältets knappmeny",
"description": "Label for the checkbox controlling section order in the popup."
@ -183,14 +247,18 @@
"message": "Ta bort",
"description": "Label for the button to remove an 'applies' entry"
},
"manageTitle": {
"message": "Tyylikäs",
"description": "Title for the manage page"
"styleToMozillaFormatTitle": {
"message": "Stil i Mozilla-format",
"description": "Title of the popup with the style code in Mozilla format, shown after pressing the Export button on Edit style page"
},
"writeStyleFor": {
"message": "Skriv stil för:",
"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": {
"message": "Gäller för",
"description": "Label for 'applies to' fields on the edit/add screen"
@ -216,6 +284,10 @@
"message": "Installera uppdatering",
"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": {
"message": "Ta bort sektion",
"description": "Label for the button to remove a section"
@ -224,6 +296,10 @@
"message": "Stäng av alla stilar",
"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": {
"message": "Uppdatering slutförd.",
"description": "Text that displays when an update completed"
@ -236,6 +312,10 @@
"message": "Kod",
"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": {
"message": "Använd smart indrag",
"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.",
"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": {
"message": "Ändra i Stil",
"description": "Title of the page for editing styles"
},
"manageOnlyDisabled": {
"message": "Endast inaktiverade stilar",
"description": "Checkbox to show only disabled styles"
},
"stylusUnavailableForURL": {
"message": "Stylus fungerar inte på sidor som denna.",
"description": "Note in the toolbar pop-up when on a URL Stylus can't affect"
@ -256,26 +344,66 @@
"message": "Lägg till stil",
"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": {
"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"
},
"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": {
"message": "Gå till rad (eller rad:kol)",
"description": "Go to line or line:column on Ctrl-G in style code editor"
},
"checkAllUpdates": {
"message": "Leta igenom alla stilar efter uppdateringar",
"message": "Sök efter uppdateringar",
"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": {
"message": "Nyckelkarta",
"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": {
"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."
},
"replaceWith": {
"message": "Ersätt med",
"description": "Label before the replace-with input field in the editor shown on Ctrl-H etc."
},
"deleteStyleLabel": {
"message": "Ta bort",
"description": "Label for the button to delete a style"
@ -292,8 +420,16 @@
"message": "Ändra",
"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": {
"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"
},
"confirmClose": {
"message": "Stäng",
"description": "'Close' button in a confirm dialog"
}
}

View File

@ -39,6 +39,10 @@
"message": "每隔 N 小时检查所有样式更新0 为关闭检查)",
"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": {
"message": "最旧的优先",
"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 = 错误)",
"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": {
"message": "没有找到与此页面相关的样式.",
"description": "Error text in the popup when inline search didn't find any site-specific styles"
@ -714,6 +722,10 @@
"message": "更新已完成。",
"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": {
"message": "总页面",
"description": ""

View File

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

View File

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

View File

@ -10,8 +10,7 @@
chrome.runtime.onMessage.addListener(onMessage);
document.addEventListener('DOMContentLoaded', function _() {
document.removeEventListener('DOMContentLoaded', _);
onDOMready().then(() => {
window.postMessage({
direction: 'from-content-script',
message: 'StylishInstalled',
@ -42,7 +41,6 @@
sendEvent(sendEvent.lastEvent);
});
});
return;
}
}
@ -243,6 +241,21 @@
function getStyleJson() {
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);
}
@ -324,21 +337,65 @@
// In Chrome content script is orphaned on an extension update/reload
// so we need to detach event listeners
window.removeEventListener(chrome.runtime.id + '-install', orphanCheck, true);
['Update', 'Install'].forEach(type =>
['', 'Chrome', 'Opera'].forEach(browser =>
document.addEventListener('stylish' + type + browser, onClick)));
document.removeEventListener('stylishInstallChrome', onClick);
document.removeEventListener('stylishUpdateChrome', onClick);
try {
chrome.runtime.onMessage.removeListener(onMessage);
} catch (e) {}
}
})();
// TODO: remove the following statement when USO is fixed
document.documentElement.appendChild(document.createElement('script')).text = '(' +
function () {
// run in page context
document.documentElement.appendChild(document.createElement('script')).text = '(' + (
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;
const originalResponseJson = Response.prototype.json;
document.currentScript.remove();
document.addEventListener('stylusFixBuggyUSOsettings', function _({detail}) {
document.removeEventListener('stylusFixBuggyUSOsettings', _);
// 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;
});
};
} + ')()';
}
) + `)('${chrome.runtime.getURL('').slice(0, -1)}')`;
// TODO: remove the following statement when USO pagination is fixed
if (location.search.includes('category=')) {

238
edit.html
View File

@ -100,15 +100,23 @@
</select>
<svg class="svg-icon select-arrow"><use xlink:href="#svg-icon-select-arrow"/></svg>
</div>
<input name="applies-value" class="applies-value style-contributor" spellcheck="false">
<button class="remove-applies-to" i18n-text="appliesRemove"></button>
<button class="add-applies-to" i18n-text="appliesAdd"></button>
<div class="applies-value-wrapper">
<input name="applies-value" class="applies-value style-contributor" spellcheck="false">
<a class="remove-applies-to" href="#" i18n-text="appliesRemove" i18n-title="appliesRemove">
<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>
</template>
<template data-id="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>
</template>
@ -124,10 +132,12 @@
</label>
<ul class="applies-to-list"></ul>
</div>
<button class="remove-section" i18n-text="sectionRemove"></button>
<button class="add-section" i18n-text="sectionAdd"></button>
<button class="beautify-section" i18n-text="styleBeautify"></button>
<button class="test-regexp" i18n-text="styleRegexpTestButton"></button>
<div class="edit-actions">
<button class="remove-section" i18n-text="sectionRemove"></button>
<button class="add-section" i18n-text="sectionAdd"></button>
<button class="beautify-section" i18n-text="styleBeautify"></button>
<button class="test-regexp" i18n-text="styleRegexpTestButton"></button>
</div>
</div>
</template>
@ -276,109 +286,117 @@
<svg class="svg-icon info"><use xlink:href="#svg-icon-help"/></svg>
</a>
</h2>
<button id="from-mozilla" i18n-text="importLabel"></button>
<button id="to-mozilla" i18n-text="exportLabel"></button>
<div id="mozilla-format-buttons">
<button id="from-mozilla" i18n-text="importLabel"></button>
<button id="to-mozilla" i18n-text="exportLabel"></button>
</div>
</div>
</section>
<details id="options" data-pref="editor.options.expanded">
<summary><h2 id="options-heading" i18n-text="optionsHeading"></h2></summary>
<div class="option">
<label id="lineWrapping-label" i18n-text="cm_lineWrapping">
<input id="editor.lineWrapping" type="checkbox">
<svg class="svg-icon checked"><use xlink:href="#svg-icon-checked"/></svg>
</label>
</div>
<div class="option">
<label id="smartIndent-label" i18n-text="cm_smartIndent">
<input id="editor.smartIndent" type="checkbox">
<svg class="svg-icon checked"><use xlink:href="#svg-icon-checked"/></svg>
</label>
</div>
<div class="option">
<label id="indentWithTabs-label" i18n-text="cm_indentWithTabs">
<input id="editor.indentWithTabs" type="checkbox">
<svg class="svg-icon checked"><use xlink:href="#svg-icon-checked"/></svg>
</label>
</div>
<div class="option">
<label i18n-text="cm_autoCloseBrackets" i18n-title="cm_autoCloseBracketsTooltip">
<input id="editor.autoCloseBrackets" type="checkbox">
<svg class="svg-icon checked"><use xlink:href="#svg-icon-checked"/></svg>
</label>
</div>
<div class="option">
<label i18n-text="cm_autocompleteOnTyping">
<input id="editor.autocompleteOnTyping" type="checkbox">
<svg class="svg-icon checked"><use xlink:href="#svg-icon-checked"/></svg>
</label>
</div>
<div class="option">
<label i18n-text="cm_selectByTokens"
i18n-title="cm_selectByTokensTooltip">
<input id="editor.selectByTokens" type="checkbox">
<svg class="svg-icon checked"><use xlink:href="#svg-icon-checked"/></svg>
</label>
</div>
<div class="option">
<label i18n-text="cm_colorpicker">
<input id="editor.colorpicker" type="checkbox">
<svg class="svg-icon checked"><use xlink:href="#svg-icon-checked"/></svg>
</label>
<a id="colorpicker-settings" href="#" class="svg-inline-wrapper" i18n-title="shortcutsNote" tabindex="0">
<svg class="svg-icon settings"><use xlink:href="#svg-icon-settings"/></svg>
</a>
</div>
<div class="option usercss-only">
<label i18n-text="appliesLineWidgetLabel" i18n-title="appliesLineWidgetWarning">
<input id="editor.appliesToLineWidget" type="checkbox">
<svg class="svg-icon checked"><use xlink:href="#svg-icon-checked"/></svg>
</label>
</div>
<div class="option aligned">
<label id="tabSize-label" for="editor.tabSize" i18n-text="cm_tabSize"></label>
<input id="editor.tabSize" type="number" min="0">
</div>
<div class="option aligned">
<label id="keyMap-label" for="editor.keyMap" i18n-text="cm_keyMap"></label>
<div class="select-resizer">
<select id="editor.keyMap"></select>
<svg class="svg-icon select-arrow"><use xlink:href="#svg-icon-select-arrow"/></svg>
</div>
<a id="keyMap-help" href="#" class="svg-inline-wrapper" tabindex="0">
<svg class="svg-icon info"><use xlink:href="#svg-icon-help"/></svg>
</a>
</div>
<div class="option aligned">
<label id="theme-label" for="editor.theme" i18n-text="cm_theme"></label>
<div class="select-resizer">
<select id="editor.theme"></select>
<svg class="svg-icon select-arrow"><use xlink:href="#svg-icon-select-arrow"/></svg>
</div>
</div>
<div class="option aligned">
<label id="highlight-label" for="editor.matchHighlight" i18n-text="cm_matchHighlight"></label>
<div class="select-resizer">
<select id="editor.matchHighlight">
<option i18n-text="cm_matchHighlightToken" value="token">
<option i18n-text="cm_matchHighlightSelection" value="selection">
<option i18n-text="genericDisabledLabel" value="">
</select>
<svg class="svg-icon select-arrow"><use xlink:href="#svg-icon-select-arrow"/></svg>
</div>
</div>
<div class="option aligned">
<label id="linter-label" for="editor.linter" i18n-text="cm_linter"></label>
<div class="select-resizer">
<select id="editor.linter">
<option value="csslint" selected>CSSLint</option>
<option value="stylelint">Stylelint</option>
<option value="" i18n-text="genericDisabledLabel"></option>
</select>
<svg class="svg-icon select-arrow"><use xlink:href="#svg-icon-select-arrow"/></svg>
<div id="options-wrapper">
<div class="options-column">
<div class="option">
<label id="lineWrapping-label" i18n-text="cm_lineWrapping">
<input id="editor.lineWrapping" type="checkbox">
<svg class="svg-icon checked"><use xlink:href="#svg-icon-checked"/></svg>
</label>
</div>
<a id="linter-settings" href="#" class="svg-inline-wrapper" i18n-title="linterConfigTooltip" tabindex="0">
<svg class="svg-icon settings"><use xlink:href="#svg-icon-settings"/></svg>
</a>
<div class="option">
<label id="smartIndent-label" i18n-text="cm_smartIndent">
<input id="editor.smartIndent" type="checkbox">
<svg class="svg-icon checked"><use xlink:href="#svg-icon-checked"/></svg>
</label>
</div>
<div class="option">
<label id="indentWithTabs-label" i18n-text="cm_indentWithTabs">
<input id="editor.indentWithTabs" type="checkbox">
<svg class="svg-icon checked"><use xlink:href="#svg-icon-checked"/></svg>
</label>
</div>
<div class="option">
<label i18n-text="cm_autoCloseBrackets" i18n-title="cm_autoCloseBracketsTooltip">
<input id="editor.autoCloseBrackets" type="checkbox">
<svg class="svg-icon checked"><use xlink:href="#svg-icon-checked"/></svg>
</label>
</div>
<div class="option">
<label i18n-text="cm_autocompleteOnTyping">
<input id="editor.autocompleteOnTyping" type="checkbox">
<svg class="svg-icon checked"><use xlink:href="#svg-icon-checked"/></svg>
</label>
</div>
<div class="option">
<label i18n-text="cm_selectByTokens"
i18n-title="cm_selectByTokensTooltip">
<input id="editor.selectByTokens" type="checkbox">
<svg class="svg-icon checked"><use xlink:href="#svg-icon-checked"/></svg>
</label>
</div>
<div class="option">
<label i18n-text="cm_colorpicker">
<input id="editor.colorpicker" type="checkbox">
<svg class="svg-icon checked"><use xlink:href="#svg-icon-checked"/></svg>
</label>
<a id="colorpicker-settings" href="#" class="svg-inline-wrapper" i18n-title="shortcutsNote" tabindex="0">
<svg class="svg-icon settings"><use xlink:href="#svg-icon-settings"/></svg>
</a>
</div>
<div class="option usercss-only">
<label i18n-text="appliesLineWidgetLabel" i18n-title="appliesLineWidgetWarning">
<input id="editor.appliesToLineWidget" type="checkbox">
<svg class="svg-icon checked"><use xlink:href="#svg-icon-checked"/></svg>
</label>
</div>
</div>
<div class="options-column">
<div class="option aligned">
<label id="tabSize-label" for="editor.tabSize" i18n-text="cm_tabSize"></label>
<input id="editor.tabSize" type="number" min="0">
</div>
<div class="option aligned">
<label id="keyMap-label" for="editor.keyMap" i18n-text="cm_keyMap"></label>
<div class="select-resizer">
<select id="editor.keyMap"></select>
<svg class="svg-icon select-arrow"><use xlink:href="#svg-icon-select-arrow"/></svg>
</div>
<a id="keyMap-help" href="#" class="svg-inline-wrapper" tabindex="0">
<svg class="svg-icon info"><use xlink:href="#svg-icon-help"/></svg>
</a>
</div>
<div class="option aligned">
<label id="theme-label" for="editor.theme" i18n-text="cm_theme"></label>
<div class="select-resizer">
<select id="editor.theme"></select>
<svg class="svg-icon select-arrow"><use xlink:href="#svg-icon-select-arrow"/></svg>
</div>
</div>
<div class="option aligned">
<label id="highlight-label" for="editor.matchHighlight" i18n-text="cm_matchHighlight"></label>
<div class="select-resizer">
<select id="editor.matchHighlight">
<option i18n-text="cm_matchHighlightToken" value="token">
<option i18n-text="cm_matchHighlightSelection" value="selection">
<option i18n-text="genericDisabledLabel" value="">
</select>
<svg class="svg-icon select-arrow"><use xlink:href="#svg-icon-select-arrow"/></svg>
</div>
</div>
<div class="option aligned">
<label id="linter-label" for="editor.linter" i18n-text="cm_linter"></label>
<div class="select-resizer">
<select id="editor.linter">
<option value="csslint" selected>CSSLint</option>
<option value="stylelint">Stylelint</option>
<option value="" i18n-text="genericDisabledLabel"></option>
</select>
<svg class="svg-icon select-arrow"><use xlink:href="#svg-icon-select-arrow"/></svg>
</div>
<a id="linter-settings" href="#" class="svg-inline-wrapper" i18n-title="linterConfigTooltip" tabindex="0">
<svg class="svg-icon settings"><use xlink:href="#svg-icon-settings"/></svg>
</a>
</div>
</div>
</div>
</details>
<details id="lint" class="hidden" data-pref="editor.lint.expanded">
@ -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"/>
</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>
</body>

View File

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

View File

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

View File

@ -102,9 +102,65 @@
}
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,
'mix-blend-mode': true,
'isolation': true,
'zoom': true,
// nonstandard https://compat.spec.whatwg.org/
'box-reflect': true,
'text-fill-color': true,
@ -115,6 +171,8 @@
});
Object.assign(CodeMirror.mimeModes['text/css'].valueKeywords, {
'isolate': true,
'recto': true,
'verso': true,
});
Object.assign(CodeMirror.mimeModes['text/css'].colorKeywords, {
'darkgrey': true,
@ -171,7 +229,7 @@
});
// doubleclick option
{
if (typeof editors !== 'undefined') {
const fn = (cm, repeat) =>
repeat === 'double' ?
{unit: selectTokenOnDoubleclick} :

View File

@ -1,7 +1,9 @@
/* global parserlib CSSLint parseMozFormat */
/* global importScripts parserlib CSSLint parseMozFormat */
'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;
self.onmessage = ({data}) => {
@ -14,7 +16,7 @@ self.onmessage = ({data}) => {
return;
}
if (!self.CSSLint) self.importScripts('./csslint.js');
if (!self.CSSLint) self.importScripts(CSSLINT_PATH + 'csslint.js');
switch (action) {
case 'getAllRuleIds':

View File

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

View File

@ -93,9 +93,7 @@ onDOMready().then(() => {
replaceAll: () => doReplaceAll(),
undo: () => doUndo(),
clear() {
this._input.focus();
document.execCommand('selectAll', false, null);
document.execCommand('delete', false, null);
setInputValue(this._input, '');
},
case() {
state.icase = !state.icase;
@ -535,7 +533,7 @@ onDOMready().then(() => {
setActiveEditor(cm);
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;
if (sel) state.find = sel;
@ -543,9 +541,7 @@ onDOMready().then(() => {
destroyDialog();
createDialog(type);
} else if (sel) {
state.input.focus();
state.input.select();
document.execCommand('insertText', false, sel);
setInputValue(state.input, sel);
}
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',
},
worker: {
csslint: {path: '/vendor-overwrites/csslint/csslint-loader.js'},
stylelint: {path: '/vendor-overwrites/stylelint/stylelint-bundle.min.js'},
csslint: {path: '/edit/csslint-loader.js'},
stylelint: {path: '/edit/stylelint-loader.js'},
},
allRuleIds: {
csslint: null,

View File

@ -125,7 +125,7 @@ function addSection(event, section) {
div.classList.toggle('has-regexp', show);
appliesTo.oninput = appliesTo.oninput || show && (event => {
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());
}
});
@ -150,31 +150,46 @@ function addSection(event, section) {
return div;
}
function addAppliesTo(list, name, value) {
const showingEverything = $('.applies-to-everything', list) !== null;
// may be invoked as a DOM listener
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
if (showingEverything) {
list.removeChild(list.firstChild);
}
let e;
if (name) {
e = template.appliesTo.cloneNode(true);
$('[name=applies-type]', e).value = name;
$('[name=applies-value]', e).value = value;
$('.remove-applies-to', e).addEventListener('click', removeAppliesTo, false);
} else if (showingEverything || list.hasChildNodes()) {
e = template.appliesTo.cloneNode(true);
if (list.hasChildNodes()) {
$('[name=applies-type]', e).value = $('li:last-child [name="applies-type"]', list).value;
let item, toFocus;
// a section is added with known applies-to
if (type) {
item = template.appliesTo.cloneNode(true);
$('[name=applies-type]', item).value = type;
$('[name=applies-value]', item).value = value;
$('.remove-applies-to', item).addEventListener('click', removeAppliesTo);
// 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 {
e = template.appliesToEverything.cloneNode(true);
item = template.appliesToEverything.cloneNode(true);
}
$('.add-applies-to', e).addEventListener('click', function () {
addAppliesTo(this.parentNode.parentNode);
}, false);
list.appendChild(e);
$('.add-applies-to', item).addEventListener('click', addAppliesTo);
list.insertBefore(item, clickedItem && clickedItem.nextElementSibling);
if (toFocus) toFocus.focus();
}
function setupCodeMirror(sectionDiv, code, index) {
@ -403,8 +418,9 @@ function getSectionsHashes() {
}
function removeAppliesTo(event) {
const appliesTo = event.target.parentNode;
const appliesToList = appliesTo.parentNode;
event.preventDefault();
const appliesTo = event.target.closest('.applies-to-item');
const appliesToList = appliesTo.closest('.applies-to-list');
removeAreaAndSetDirty(appliesTo);
if (!appliesToList.hasChildNodes()) {
addAppliesTo(appliesToList);
@ -437,7 +453,7 @@ function removeAreaAndSetDirty(area) {
}
});
updateTitle();
area.parentNode.removeChild(area);
area.remove();
}
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;
-moz-appearance: none;
user-select: none;
max-width: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
padding: 2px 7px;
border: 1px solid hsl(0, 0%, 62%);
font: 400 13.3333px Arial;

View File

@ -45,40 +45,44 @@
</head>
<body id="stylus-install-usercss">
<div class="container">
<div class="header">
<h1>
<span class="meta-name"></span>
<small class="meta-version"></small>
</h1>
<div class="actions">
<h2 class="installed" i18n-text="installButtonInstalled"></h2>
<button class="install" i18n-text="installButton"></button>
<p id="live-reload-install-hint" i18n-text="liveReloadInstallHint" class="hidden"></p>
<label class="set-update-url">
<input type="checkbox">
<svg class="svg-icon checked"><use xlink:href="#svg-icon-checked"/></svg>
<span></span>
<p></p>
</label>
<label class="live-reload">
<input type="checkbox">
<svg class="svg-icon checked"><use xlink:href="#svg-icon-checked"/></svg>
<span i18n-text="liveReloadLabel"></span>
</label>
<div id="header">
<div id="header-content-wrapper">
<h1>
<span class="meta-name"></span>
<small class="meta-version"></small>
</h1>
<div class="actions">
<h2 class="installed" i18n-text="installButtonInstalled"></h2>
<button class="install" i18n-text="installButton"></button>
<p id="live-reload-install-hint" i18n-text="liveReloadInstallHint" class="hidden"></p>
<label class="set-update-url">
<input type="checkbox">
<svg class="svg-icon checked"><use xlink:href="#svg-icon-checked"/></svg>
<span></span>
<p></p>
</label>
<label class="live-reload">
<input type="checkbox">
<svg class="svg-icon checked"><use xlink:href="#svg-icon-checked"/></svg>
<span i18n-text="liveReloadLabel"></span>
</label>
</div>
<p class="meta-description"></p>
<div>
<h3 i18n-text="author"></h3>
<span class="meta-author"></span>
</div>
<div>
<h3 i18n-text="license"></h3>
<span class="meta-license"></span>
</div>
<div class="external-link"></div>
<div id="applies-to-wrapper">
<h3 i18n-text="appliesLabel"></h3>
<ul class="applies-to">
</ul>
</div>
</div>
<p class="meta-description"></p>
<div>
<h3 i18n-text="author"></h3>
<span class="meta-author"></span>
</div>
<div>
<h3 i18n-text="license"></h3>
<span class="meta-license"></span>
</div>
<h3 i18n-text="appliesLabel"></h3>
<ul class="applies-to">
</ul>
<div class="external-link"></div>
</div>
<div class="main">
<div class="warnings"></div>

View File

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

View File

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

View File

@ -35,10 +35,9 @@ var usercss = (() => {
const BUILDER = {
default: {
postprocess(sections, vars) {
const varDef =
':root {\n' +
Object.keys(vars).map(k => ` --${k}: ${vars[k].value};\n`).join('') +
'}\n';
let varDef = Object.keys(vars).map(k => ` --${k}: ${vars[k].value};\n`).join('');
if (!varDef) return;
varDef = ':root {\n' + varDef + '}\n';
for (const section of sections) {
if (!styleCodeEmpty(section.code)) {
section.code = varDef + section.code;
@ -51,6 +50,7 @@ var usercss = (() => {
return loadScript('/vendor/stylus-lang/stylus.min.js').then(() => (
new Promise((resolve, reject) => {
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) => {
if (err) {
reject(err);
@ -599,7 +599,7 @@ var usercss = (() => {
function invokeWorker(message) {
if (!worker.queue) {
worker.instance = new Worker('/vendor-overwrites/csslint/csslint-loader.js');
worker.instance = new Worker('/edit/csslint-loader.js');
worker.queue = [];
worker.instance.onmessage = ({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,200 +178,210 @@
<div id="header">
<h1 id="manage-heading" i18n-text="manageHeading"></h1>
<details id="filters" data-pref="manage.filters.expanded">
<summary>
<h2 i18n-text="manageFilters">: <span id="filters-stats"></span></h2>
<a id="reset-filters" href="#" tabindex="0">
<svg class="svg-icon" viewBox="0 0 20 20">
<title i18n-text="genericResetLabel"></title>
<polygon points="16.2,5.5 14.5,3.8 10,8.3 5.5,3.8 3.8,5.5 8.3,10 3.8,14.5
5.5,16.2 10,11.7 14.5,16.2 16.2,14.5 11.7,10 "/>
</svg>
</a>
</summary>
<div id="manage-settings">
<div class="settings-column">
<details id="filters" data-pref="manage.filters.expanded">
<summary>
<h2 i18n-text="manageFilters">:
<div class="filter-stats-wrapper">
<span id="filters-stats"></span>
<a id="reset-filters" href="#" tabindex="0">
<svg class="svg-icon" viewBox="0 0 20 20">
<title i18n-text="genericResetLabel"></title>
<polygon points="16.2,5.5 14.5,3.8 10,8.3 5.5,3.8 3.8,5.5 8.3,10 3.8,14.5
5.5,16.2 10,11.7 14.5,16.2 16.2,14.5 11.7,10 "/>
</svg>
</a>
</div>
</h2>
</summary>
<div class="filter-selection">
<label>
<div class="checkmate">
<input id="manage.onlyEnabled" type="checkbox"
data-filter=".enabled"
data-filter-hide=".disabled">
<svg class="svg-icon checked"><use xlink:href="#svg-icon-checked"/></svg>
</div>
</label>
<div class="select-resizer">
<select id="manage.onlyEnabled.invert">
<option i18n-text="manageOnlyEnabled" value="false"></option>
<option i18n-text="manageOnlyDisabled" value="true"></option>
</select>
<svg class="svg-icon select-arrow"><use xlink:href="#svg-icon-select-arrow"/></svg>
</div>
</div>
<div class="filter-selection">
<label>
<div class="checkmate">
<input id="manage.onlyLocal" type="checkbox"
data-filter=":not(.updatable):not(.update-done)"
data-filter-hide=".updatable, .update-done">
<svg class="svg-icon checked"><use xlink:href="#svg-icon-checked"/></svg>
</div>
</label>
<div class="select-resizer">
<select id="manage.onlyLocal.invert" i18n-title="manageOnlyLocalTooltip">
<option i18n-text="manageOnlyLocal" value="false"></option>
<option i18n-text="manageOnlyExternal" value="true"></option>
</select>
<svg class="svg-icon select-arrow"><use xlink:href="#svg-icon-select-arrow"/></svg>
</div>
</div>
<div class="filter-selection">
<label>
<div class="checkmate">
<input id="manage.onlyUsercss" type="checkbox"
data-filter=".usercss"
data-filter-hide=":not(.usercss)">
<svg class="svg-icon checked"><use xlink:href="#svg-icon-checked"/></svg>
</div>
</label>
<div class="select-resizer">
<select id="manage.onlyUsercss.invert">
<option i18n-text="manageOnlyUsercss" value="false"></option>
<option i18n-text="manageOnlyNonUsercss" value="true"></option>
</select>
<svg class="svg-icon select-arrow"><use xlink:href="#svg-icon-select-arrow"/></svg>
</div>
</div>
<label id="only-updates" class="hidden">
<input type="checkbox"
data-filter=".can-update, .update-problem, .update-done"
data-filter-hide=":not(.updatable):not(.update-done), .no-update:not(.update-problem)">
<svg class="svg-icon checked"><use xlink:href="#svg-icon-checked"/></svg>
<span i18n-text="manageOnlyUpdates"></span>
</label>
<div id="search-wrapper">
<input id="search" type="search" i18n-placeholder="searchStyles" spellcheck="false"
data-filter=":not(.not-matching)"
data-filter-hide=".not-matching">
<a href="#" id="search-help" tabindex="0">
<svg class="svg-icon info"><use xlink:href="#svg-icon-help"/></svg>
</a>
</div>
</details>
<div id="sort-wrapper">
<div class="sorter-selection" i18n-title="sortLabel">
<select id="manage.newUI.sort"></select>
<svg class="svg-icon select-arrow"><use xlink:href="#svg-icon-select-arrow"/></svg>
</div>
<a href="#" id="sorter-help" tabindex="0">
<svg class="svg-icon info"><use xlink:href="#svg-icon-help"/></svg>
</a>
</div>
<p class="nowrap">
<button id="check-all-updates" i18n-text="checkAllUpdates"><span id="update-progress"></span></button>
<a href="#" id="update-history" i18n-title="genericHistoryLabel" tabindex="0">
<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"/>
</svg>
</a>
</p>
<p>
<button id="apply-all-updates" class="hidden" i18n-text="applyAllUpdates"></button>
<span id="update-all-no-updates" class="hidden" i18n-text="updateAllCheckSucceededNoUpdate"></span>
<button id="check-all-updates-force" class="hidden" i18n-text="checkAllUpdatesForce"></button>
</p>
<div id="add-style-wrapper">
<a href="edit.html">
<button id="add-style-label" i18n-text="addStyleLabel" tabindex="-1" class="nowrap"></button>
</a>
<label id="add-style-as-usercss-wrapper">
<input type="checkbox" id="newStyleAsUsercss">
<svg class="svg-icon checked"><use xlink:href="#svg-icon-checked"/></svg>
<span i18n-text="manageNewStyleAsUsercss" i18n-title="optionsAdvancedNewStyleAsUsercss"></span>
<a id="usercss-wiki"
href="https://github.com/openstyles/stylus/wiki/Usercss"
i18n-title="externalUsercssDocument"
tabindex="0">
<svg class="svg-icon" viewBox="0 0 20 20">
<path d="M4,4h5v2H6v8h8v-3h2v5H4V4z M11,3h6v6l-2-2l-4,4L9,9l4-4L11,3z"/>
</svg>
</a>
</label>
</div>
<details id="options" data-pref="manage.options.expanded">
<summary><h2 id="options-heading" i18n-text="optionsHeading"></h2></summary>
<label>
<input id="manage.newUI" type="checkbox">
<svg class="svg-icon checked"><use xlink:href="#svg-icon-checked"/></svg>
<span i18n-text="manageNewUI"></span>
</label>
<div id="newUIoptions">
<div>
<label for="manage.newUI.favicons" i18n-text="manageFavicons">
<input id="manage.newUI.favicons" type="checkbox">
<svg class="svg-icon checked"><use xlink:href="#svg-icon-checked"/></svg>
<a href="#" data-toggle-on-click="#faviconsHelp" tabindex="0">
<svg class="svg-icon select-arrow">
<title i18n-text="optionsSubheading"></title>
<use xlink:href="#svg-icon-select-arrow"/>
</svg>
</a>
</label>
<div id="faviconsHelp" class="hidden" i18n-text="manageFaviconsHelp">
<div>
<label for="manage.newUI.faviconsGray" i18n-text="manageFaviconsGray">
<input id="manage.newUI.faviconsGray" type="checkbox">
<div class="filter-selection">
<label>
<div class="checkmate">
<input id="manage.onlyEnabled" type="checkbox"
data-filter=".enabled"
data-filter-hide=".disabled">
<svg class="svg-icon checked"><use xlink:href="#svg-icon-checked"/></svg>
</label>
</div>
</label>
<div class="select-resizer">
<select id="manage.onlyEnabled.invert">
<option i18n-text="manageOnlyEnabled" value="false"></option>
<option i18n-text="manageOnlyDisabled" value="true"></option>
</select>
<svg class="svg-icon select-arrow"><use xlink:href="#svg-icon-select-arrow"/></svg>
</div>
</div>
<div class="filter-selection">
<label>
<div class="checkmate">
<input id="manage.onlyLocal" type="checkbox"
data-filter=":not(.updatable):not(.update-done)"
data-filter-hide=".updatable, .update-done">
<svg class="svg-icon checked"><use xlink:href="#svg-icon-checked"/></svg>
</div>
</label>
<div class="select-resizer">
<select id="manage.onlyLocal.invert" i18n-title="manageOnlyLocalTooltip">
<option i18n-text="manageOnlyLocal" value="false"></option>
<option i18n-text="manageOnlyExternal" value="true"></option>
</select>
<svg class="svg-icon select-arrow"><use xlink:href="#svg-icon-select-arrow"/></svg>
</div>
</div>
<div class="filter-selection">
<label>
<div class="checkmate">
<input id="manage.onlyUsercss" type="checkbox"
data-filter=".usercss"
data-filter-hide=":not(.usercss)">
<svg class="svg-icon checked"><use xlink:href="#svg-icon-checked"/></svg>
</div>
</label>
<div class="select-resizer">
<select id="manage.onlyUsercss.invert">
<option i18n-text="manageOnlyUsercss" value="false"></option>
<option i18n-text="manageOnlyNonUsercss" value="true"></option>
</select>
<svg class="svg-icon select-arrow"><use xlink:href="#svg-icon-select-arrow"/></svg>
</div>
</div>
<label id="only-updates" class="hidden">
<input type="checkbox"
data-filter=".can-update, .update-problem, .update-done"
data-filter-hide=":not(.updatable):not(.update-done), .no-update:not(.update-problem)">
<svg class="svg-icon checked"><use xlink:href="#svg-icon-checked"/></svg>
<span i18n-text="manageOnlyUpdates"></span>
</label>
<div id="search-wrapper">
<input id="search" type="search" i18n-placeholder="searchStyles" spellcheck="false"
data-filter=":not(.not-matching)"
data-filter-hide=".not-matching">
<a href="#" id="search-help" tabindex="0">
<svg class="svg-icon info"><use xlink:href="#svg-icon-help"/></svg>
</a>
</div>
</details>
<div id="sort-wrapper">
<div class="sorter-selection" i18n-title="sortLabel">
<select id="manage.newUI.sort"></select>
<svg class="svg-icon select-arrow"><use xlink:href="#svg-icon-select-arrow"/></svg>
</div>
<a href="#" id="sorter-help" tabindex="0">
<svg class="svg-icon info"><use xlink:href="#svg-icon-help"/></svg>
</a>
</div>
<div id="style-actions">
<div id="update-check">
<button id="check-all-updates" i18n-text="checkAllUpdates"><span id="update-progress"></span></button>
<a href="#" id="update-history" i18n-title="genericHistoryLabel" tabindex="0">
<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"/>
</svg>
</a>
</div>
<div id="update-all">
<button id="apply-all-updates" class="hidden" i18n-text="applyAllUpdates"></button>
<span id="update-all-no-updates" class="hidden" i18n-text="updateAllCheckSucceededNoUpdate"></span>
<button id="check-all-updates-force" class="hidden" i18n-text="checkAllUpdatesForce"></button>
</div>
<div id="add-style-wrapper">
<a href="edit.html">
<button id="add-style-label" i18n-text="addStyleLabel" tabindex="-1"></button>
</a>
<label id="add-style-as-usercss-wrapper">
<input type="checkbox" id="newStyleAsUsercss">
<svg class="svg-icon checked"><use xlink:href="#svg-icon-checked"/></svg>
<span i18n-text="manageNewStyleAsUsercss" i18n-title="optionsAdvancedNewStyleAsUsercss"></span>
<a id="usercss-wiki"
href="https://github.com/openstyles/stylus/wiki/Usercss"
i18n-title="externalUsercssDocument"
tabindex="0">
<svg class="svg-icon" viewBox="0 0 20 20">
<path d="M4,4h5v2H6v8h8v-3h2v5H4V4z M11,3h6v6l-2-2l-4,4L9,9l4-4L11,3z"/>
</svg>
</a>
</label>
</div>
</div>
<label><input id="manage.newUI.targets" type="number" min="1" max="99"><span i18n-text="manageMaxTargets"></span></label>
</div>
<p>
<button id="manage-options-button" i18n-text="openOptionsManage"></button>
<button id="manage-shortcuts-button" class="chromium-only"
i18n-text="shortcuts"
i18n-title="shortcutsNote"></button>
<a id="find-editor-styles"
href="https://userstyles.org/styles/browse/chrome-extension"
i18n-title="editorStylesButton"
target="_blank"><button i18n-text="cm_theme" tabindex="-1"></button></a>
</p>
<div class="settings-column">
<details id="options" data-pref="manage.options.expanded">
</details>
<summary><h2 id="options-heading" i18n-text="optionsHeading"></h2></summary>
<details id="backup" data-pref="manage.backup.expanded">
<summary><h2 id="backup-title" i18n-text="backupButtons"></h2></summary>
<span id="backup-message" i18n-text="backupMessage"></span>
<p>
<button id="file-all-styles" i18n-text="bckpInstStyles"></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-import" i18n-text="retrieveDropboxBckp"></button>
</p>
</details>
<label>
<input id="manage.newUI" type="checkbox">
<svg class="svg-icon checked"><use xlink:href="#svg-icon-checked"/></svg>
<span i18n-text="manageNewUI"></span>
</label>
<p id="manage-text">
<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://github.com/openstyles/stylus/wiki" target="_blank" i18n-text="linkStylusWiki"></a></span>
</p>
<div id="newUIoptions">
<div>
<label for="manage.newUI.favicons" i18n-text="manageFavicons">
<input id="manage.newUI.favicons" type="checkbox">
<svg class="svg-icon checked"><use xlink:href="#svg-icon-checked"/></svg>
<a href="#" data-toggle-on-click="#faviconsHelp" tabindex="0">
<svg class="svg-icon select-arrow">
<title i18n-text="optionsSubheading"></title>
<use xlink:href="#svg-icon-select-arrow"/>
</svg>
</a>
</label>
<div id="faviconsHelp" class="hidden" i18n-text="manageFaviconsHelp">
<div>
<label for="manage.newUI.faviconsGray" i18n-text="manageFaviconsGray">
<input id="manage.newUI.faviconsGray" type="checkbox">
<svg class="svg-icon checked"><use xlink:href="#svg-icon-checked"/></svg>
</label>
</div>
</div>
</div>
<label><input id="manage.newUI.targets" type="number" min="1" max="99"><span i18n-text="manageMaxTargets"></span></label>
</div>
<div id="options-buttons">
<button id="manage-options-button" i18n-text="openOptionsManage"></button>
<button id="manage-shortcuts-button" class="chromium-only"
i18n-text="shortcuts"
i18n-title="shortcutsNote"></button>
<a id="find-editor-styles"
href="https://userstyles.org/styles/browse/chrome-extension"
i18n-title="editorStylesButton"
target="_blank"><button i18n-text="cm_theme" tabindex="-1"></button></a>
</div>
</details>
<details id="backup" data-pref="manage.backup.expanded">
<summary><h2 id="backup-title" i18n-text="backupButtons"></h2></summary>
<span id="backup-message" i18n-text="backupMessage"></span>
<div id="backup-buttons">
<button id="file-all-styles" i18n-text="bckpInstStyles"></button>
<button id="unfile-all-styles" i18n-text="retrieveBckp"></button>
<button id="sync-dropbox-export" i18n-text="bckpDropboxStyles"></button>
<button id="sync-dropbox-import" i18n-text="retrieveDropboxBckp"></button>
</div>
</details>
<div id="manage-text">
<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://github.com/openstyles/stylus/wiki" target="_blank" i18n-text="linkStylusWiki"></a></span>
</div>
</div>
</div>
</div>

View File

@ -2,34 +2,34 @@
'use strict';
onDOMready().then(_ => {
zip.workerScriptsPath = "/vendor/zipjs/";
zip.workerScriptsPath = "/vendor/zipjs/";
});
function createZipFileFromText(filename, text) {
return new Promise((resolve, reject) => {
// use a BlobWriter to store the zip into a Blob object
zip.createWriter(new zip.BlobWriter('application/zip'), writer => {
// use a TextReader to read the String to add
writer.add(filename, new zip.TextReader(text), function () {
// close the zip writer
writer.close(blob => {
// blob contains the zip file as a Blob object
resolve(blob);
});
});
}, error => reject(error));
});
return new Promise((resolve, reject) => {
// use a BlobWriter to store the zip into a Blob object
zip.createWriter(new zip.BlobWriter('application/zip'), writer => {
// use a TextReader to read the String to add
writer.add(filename, new zip.TextReader(text), function () {
// close the zip writer
writer.close(blob => {
// blob contains the zip file as a Blob object
resolve(blob);
});
});
}, error => reject(error));
});
}
function readZipFileFromBlob(blob) {
return new Promise((resolve, reject) => {
zip.createReader(new zip.BlobReader(blob), zipReader => {
zipReader.getEntries(entries => {
entries[0].getData(new zip.BlobWriter('text/plain'), data => {
zipReader.close();
resolve(data);
});
});
}, error => reject(error))
});
return new Promise((resolve, reject) => {
zip.createReader(new zip.BlobReader(blob), zipReader => {
zipReader.getEntries(entries => {
entries[0].getData(new zip.BlobWriter('text/plain'), data => {
zipReader.close();
resolve(data);
});
});
}, error => reject(error))
});
}

View File

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

View File

@ -1,7 +1,7 @@
/* global messageBox */
'use strict';
const DROPBOX_API_KEY = '';
const DROPBOX_API_KEY = 'uyfixgzre8v1bkg';
const FILENAME_ZIP_FILE = 'stylus.json';
const DROPBOX_FILE = 'stylus.zip';
const API_ERROR_STATUS_FILE_NOT_FOUND = 409;
@ -19,8 +19,8 @@ function messageProgressBar(data) {
dataset: {cmd: 'close'},
}],
}).then(_ => {
document.body.style.minWidth = '';
document.body.style.minHeight = '';
document.body.style.minWidth = '';
document.body.style.minHeight = '';
});
}
@ -49,7 +49,7 @@ function uploadFileDropbox(client, stylesText) {
$('#sync-dropbox-export').onclick = () => {
messageProgressBar({ title: t('bckpDropboxStyles'), text: t('connectingDropbox')});
messageProgressBar({title: t('bckpDropboxStyles'), text: t('connectingDropbox')});
hasDropboxAccessToken().then(token => {
if (typeof token === 'undefined') {
@ -76,24 +76,24 @@ $('#sync-dropbox-export').onclick = () => {
})
/** file deleted with success, get styles and create a file */
.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 */
.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 */
.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 */
.then(_ => messageProgressBar({ title: t('bckpDropboxStyles'), text: t('exportSavedSuccess') }))
.then(_ => messageProgressBar({title: t('bckpDropboxStyles'), text: t('exportSavedSuccess') }))
/* handle not found cases and cancel action */
.catch(error => {
/* saving file first time */
@ -101,21 +101,21 @@ $('#sync-dropbox-export').onclick = () => {
API.getStyles()
.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 => {
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 => {
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));
return;
@ -133,7 +133,7 @@ $('#sync-dropbox-export').onclick = () => {
$('#sync-dropbox-import').onclick = () => {
messageProgressBar({ title: t('retrieveDropboxBckp'), text: t('connectingDropbox') });
messageProgressBar({title: t('retrieveDropboxBckp'), text: t('connectingDropbox') });
hasDropboxAccessToken().then(token => {
if (typeof token === 'undefined') {
@ -150,14 +150,14 @@ $('#sync-dropbox-import').onclick = () => {
return client.filesDownload({path: '/' + DROPBOX_FILE})
.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 => {
messageProgressBar({ title: t('retrieveDropboxBckp'), text: t('readingStyles') });
messageProgressBar({title: t('retrieveDropboxBckp'), text: t('readingStyles') });
const fileBlob = zipedFileBlob;
const fileBlob = zipedFileBlob;
/* it's based on the import-export.js */
const fReader = new FileReader();

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -96,16 +96,7 @@ function initPopup() {
window.close();
};
const shortcutsButton = $('#popup-shortcuts-button');
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();
}
$('#popup-wiki-button').onclick = handleEvent.openURLandHide;
if (!prefs.get('popup.stylesFirst')) {
document.body.insertBefore(

View File

@ -44,13 +44,17 @@ window.addEventListener('showStyles:done', function _() {
const CACHE_SIZE = 1e6;
const CACHE_PREFIX = 'usoSearchCache/';
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'];
let searchTotalPages;
let searchCurrentPage = 1;
let searchExhausted = false;
let usoFrame;
let usoFrameQueue;
const processedResults = [];
const unprocessedResults = [];
@ -145,6 +149,9 @@ window.addEventListener('showStyles:done', function _() {
renderActionButtons($('#' + RESULT_ID_PREFIX + usoId));
}
});
chromeLocal.getValue(CACHE_CLEANUP_NEEDED).then(value =>
value && debounce(cleanupCache, CACHE_CLEANUP_THROTTLE));
}
//endregion
@ -644,9 +651,7 @@ window.addEventListener('showStyles:done', function _() {
function fetchStyleJson(result) {
return Promise.resolve(
result.json ||
download(BASE_URL + '/styles/chrome/' + result.id + '.json', {
responseType: 'json',
}).then(json => {
downloadInFrame(BASE_URL + '/styles/chrome/' + result.id + '.json').then(json => {
result.json = json;
return json;
}));
@ -660,15 +665,7 @@ window.addEventListener('showStyles:done', function _() {
function fetchStyle(userstylesId) {
return readCache(userstylesId).then(json =>
json ||
download(BASE_URL + '/api/v1/styles/' + userstylesId, {
method: 'GET',
headers: {
'Content-type': 'application/json',
'Accept': '*/*'
},
responseType: 'json',
body: null
}).then(writeCache));
downloadInFrame(BASE_URL + '/api/v1/styles/' + userstylesId).then(writeCache));
}
/**
@ -697,15 +694,7 @@ window.addEventListener('showStyles:done', function _() {
return readCache(cacheKey)
.then(json =>
json ||
download(searchURL, {
method: 'GET',
headers: {
'Content-type': 'application/json',
'Accept': '*/*'
},
responseType: 'json',
body: null
}).then(writeCache))
downloadInFrame(searchURL).then(writeCache))
.then(json => {
searchCurrentPage = json.current_page + 1;
searchTotalPages = json.total_pages;
@ -742,6 +731,7 @@ window.addEventListener('showStyles:done', function _() {
setTimeout(writeCache, 100, data, true);
return data;
} else {
chromeLocal.setValue(CACHE_CLEANUP_NEEDED, true);
debounce(cleanupCache, CACHE_CLEANUP_THROTTLE);
return chromeLocal.loadLZStringScript().then(() =>
chromeLocal.setValue(CACHE_PREFIX + data.id, {
@ -756,15 +746,16 @@ window.addEventListener('showStyles:done', function _() {
}
function cleanupCache() {
if (!chrome.storage.local.getBytesInUse) {
chrome.storage.local.get(null, cleanupCacheInternal);
} else {
chromeLocal.remove(CACHE_CLEANUP_NEEDED);
if (chrome.storage.local.getBytesInUse) {
chrome.storage.local.getBytesInUse(null, size => {
if (size > CACHE_SIZE) {
chrome.storage.local.get(null, cleanupCacheInternal);
}
ignoreChromeError();
});
} else {
chrome.storage.local.get(null, cleanupCacheInternal);
}
}
@ -783,5 +774,91 @@ window.addEventListener('showStyles:done', function _() {
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
});

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
if (enteringConditionalGroup) {
enteringConditionalGroup = false;
insidePropertyValue = false;
insideConditionalGroup = true;
insideRule = (indentLevel > nestedLevel);
} else {
@ -507,11 +508,16 @@
// sass/less parent reference 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"
if (lookBack(" ") && output[output.length - 1] !== " ") {
output.push(" ");
outputPosCol++;
}
*/
if (peek() === ":") {
// pseudo-element
next();

View File

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

View File

@ -17,7 +17,7 @@ const colorConverter = (() => {
};
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 hasA = Boolean(a);
if (type === 'rgb' && color.type === 'hsl') {

View File

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