Commit Graph

58 Commits

Author SHA1 Message Date
eight
a004bc3c7d Move styleCodeEmpty to util 2018-09-25 21:10:35 +08:00
tophf
36b0e8f4bb clear entire cache when updating styles with global sections 2018-03-22 04:26:43 +03:00
tophf
02989edb05 eat unclosed comments 2018-01-30 18:59:28 +03:00
tophf
90aacefff8 ignore @charset when deciding if section is empty
fixes #337
2018-01-30 18:59:28 +03:00
tophf
b42dfc8300 fixup bb34538d: decrement styles.length on delete 2018-01-14 15:40:36 +03:00
tophf
bb34538da0 smart invalidateCache: try to update filters in-place 2018-01-12 00:54:40 +03:00
tophf
650cf3521b correctly strip 'code' from style hash 2018-01-10 22:18:35 +03:00
tophf
9fdabe3582 simplify getStyles
* 'asHash' implies 'enabled'
* 'length' is added to the style hash
2018-01-10 22:18:30 +03:00
tophf
2374c88e1b extract styleSectionsEqual 2018-01-04 16:43:54 +03:00
tophf
3418ac9cb9 FF: support private/container tabs 2018-01-03 10:43:56 +03:00
tophf
adabb9aeff use LZString alias for LZStringUnsafe 2017-12-11 04:49:59 +03:00
tophf
6fb9d2d157 switch to a much faster LZStringUnsafe
https://github.com/pieroxy/lz-string/pull/98
2017-12-10 11:30:57 +03:00
tophf
405400de68 move 'tempUsercssCode' cleanup to usercss helper 2017-12-10 10:11:18 +03:00
tophf
5d54ce3464 DRY chromeLocal and chromeSync 2017-12-10 10:11:18 +03:00
tophf
9486c7f3df don't report usercss as installed on USO if homepage matches 2017-12-09 04:43:02 +03:00
tophf
f4677a7b7b actually use the name when saving 2017-12-03 20:32:50 +03:00
tophf
7de3e37a51 show "Style installed" in manager for styles added while it's open 2017-12-02 07:07:12 +03:00
tophf
ff175d9af4 store installDate and updateDate 2017-11-26 20:47:23 +03:00
tophf
aedb02bbb1 install usercss from raw.githubusercontent.com 2017-11-25 18:24:37 +03:00
tophf
9503acc2bf styleSectionsEqual() order of sections should be identical
Thus we account for the case of multiple sections matching the same URL because the order of rules is part of cascading
2017-11-14 09:38:09 +03:00
tophf
1d463d7820
Merge pull request #134 from eight04/dev-user-css
Install styles from *.user.css file
2017-11-14 08:22:56 +03:00
tophf
72714160bb storage: fallback on any IndexedDB-related failure 2017-11-05 06:13:51 +03:00
eight
79b6266cf9 Fix: no new line before use strict 2017-11-01 11:13:57 +08:00
eight
54076d9f17 Merge branch 'master' of https://github.com/openstyles/stylus into dev-user-css 2017-10-12 16:28:18 +08:00
eight
f194155830 Add: close source tab after install 2017-10-06 16:33:50 +08:00
tophf
9585aea08d insertCSS#cssOrigin requires FF53 2017-09-30 02:32:43 +03:00
eight
1d829fe8f5 Fix: split up usercss logic from saveStyle 2017-09-18 11:34:12 +08:00
eight
a0495f466f Change style structure 2017-09-16 10:14:23 +08:00
eight
eaf33afbe3 Rewrite parser, add uso preprocessor 2017-09-15 13:40:04 +08:00
eight
f3176de950 Fix: findDupUsercss indent 2017-09-12 18:57:06 +08:00
eight
e1d221e9a9 Fix: saveStyle indent 2017-09-12 18:54:38 +08:00
eight
e13a6f6f92 Fix: saveUsercss 2017-09-12 18:52:55 +08:00
eight
a395df18f9 Fix: rewrite filterUsercss 2017-09-12 18:49:17 +08:00
tophf
a8796b0bd2 prevent race condition in getStyles before dbExec.initialized
fixes #184
2017-09-12 12:12:11 +03:00
eight
d4ddefe8a0 Merge branch 'master' of https://github.com/openstyles/stylus into dev-user-css 2017-09-12 03:40:56 +08:00
eight
cb23f89b6a Add: allow saveUsercss to build style 2017-09-10 22:04:43 +08:00
eight
3daff40acf Add: vars validation 2017-09-09 19:29:35 +08:00
eight
f74641e20d Add: make filterUsercss build code to get section includes 2017-09-05 18:48:18 +08:00
tophf
36d790e0c2 improve CSS transition suppression on own pages in FF 2017-09-04 01:05:32 +03:00
tophf
538da08a95 fixup d843b4e2: a shallow copy is needed 2017-09-03 22:34:42 +03:00
tophf
50239a49df fixup 53aa239d for new installations 2017-09-03 21:56:46 +03:00
tophf
09010c20a6 enqueue stuff dependent on DB decision 2017-09-03 21:25:19 +03:00
tophf
53aa239da3 fallback to chrome.storage when IndexedDB is dysfunctional 2017-09-03 20:06:42 +03:00
tophf
d843b4e23f filterStyles: code cosmetics and a bug fix 2017-09-03 19:43:38 +03:00
tophf
519d745f59 globally disable CSS transitions for a moment during page opening
the problem we fix is that since we add the styles asynchronously, the browsers, esp. Firefox, sometimes apply transitions from the null/default state to the one specified in the injected CSS.

supersedes 72e8213b and 4dbca46b
2017-09-03 19:43:37 +03:00
eight
dece4b57f3 Add: install styles from *.user.css file
Fix: handle dup name+namespace

Fix: eslint eqeqeq

Fix: trim @name's spaces

Add: check update for userstyle

Add: build CSS variable

Fix: only check dup when id is not provided

Refactor: userStyle2json -> userstyle.json

Add: style for input

Add: config dialog

Fix: preserve config during update

Fix: onchange doesn't fire on keyboard enter event

Fix: remove empty file

Add: validator. Metas must stay in the same line

Add: warn the user if installation failed

Fix: add some delay before starting installation

Add: open the editor after first installation

Fix: add openEditor to globals

Fix: i18n

Add: preprocessor. Move userstyle.build to background page.

Fix: remove unused global

Fix: preserved unknown prop in saveStyleSource() like saveStyle()

Add: edit userstyle source

Fix: load preprocessor dynamically

Fix: load content script dynamically

Fix: buildCode is async function

Fix: drop Object.entries

Fix: style.sections is undefined

Fix: don't hide the name input but disable it

Fix: query the style before installation

Revert: changes to editor, editor.html

Refactor: use term `usercss` instead of `userstyle`

Fix: don't show homepage action for usercss

Refactor: move script-loader to js/

Refactor: pull out mozParser

Fix: code style

Fix: we don't need to build meta anymore

Fix: use saveUsercss instead of saveStyle to get responsed error

Fix: last is undefined, load script error

Fix: switch to moz-format

Fix: drop injectContentScript. Move usercss check into install-user-css

Fix: response -> respond

Fix: globals -> global

Fix: queryUsercss -> filterUsercss

Fix: add processUsercss function

Fix: only open editor for usercss

Fix: remove findupUsercss fixme

Fix: globals -> global

Fix: globals -> global

Fix: global pollution

Revert: update.js

Refactor: checkStyle

Add: support usercss

Fix: no need to getURL in background page

Fix: merget semver.js into usercss.js

Fix: drop all_urls in match pattern

Fix: drop respondWithError

Move stylus -> stylus-lang

Add stylus-lang/readme

Fix: use include_globs

Fix: global pollution
2017-08-30 17:29:41 +08:00
tophf
37bff1c5c9 handle null response from API in chromeSync 2017-08-28 15:20:38 +03:00
tophf
9946f3c781 regroup some of lint* data and code
* all lint-related js files are prefixed by lint-
* config-related stuff is grouped in linterConfig
* CM helper is rewritten and moved in /edit now that CSSLint supports these features
* chromeSync methods that apply LZString got LZ in their names
* empty string is used for 'disabled' in linter selector
2017-08-28 15:20:37 +03:00
Rob Garrison
988af5f1b8 Store linter rules with sync & LZ compression 2017-08-27 17:20:47 -05:00
Rob Garrison
8dc2115347 Revert no-inline-comments (2ea5a3bbaa2fdb0a) 2017-08-27 17:20:46 -05:00