* Add key
* Add: a second index uuid, push changes to sync controller
* Add: sync.js
* Add: tokenManager
* Change: log entire body for http error
* Add: token flow
* Fix: minor
* Fix: move cleanup to stop function
* Add: syncNow
* Update dependencies
* Fix: handle 401 error
* Add: handle 401 error
* Fix: then -> catch
* Add: sync options to options page
* Update db-to-cloud
* Change: make prefs.set return a promise
* Add: disble selector if connected
* Add: update selector state
* Fix: return promise in prefs.set
* Fix: manage complex state
* Fix: handle prefs change
* Change: manage sync status in background
* Add: show current status in the UI
* Add: schedule a faster sync when db changed
* Update dependencies
* Add: include progress in sync status
* Add: more detail status
* Show status text only
* Bump dependencies
* Change: show loaded and total
* Fix: syncTarget is undefined
* Add: google and onedrive
* Fix: token is not reused
* Bump dependencies
* Don't use minified version since it is hard to debug
* Fix: expire time is incorrect
* Change: switch google to code flow
* Bump dependencies
* Change: only modify pref if the initialization success?
* Don't stop the sync if the first sync is not triggered by the user
* Add: implement refresh token
* Change: switch microsoft to code flow
* Add: subtract expire with a latency
* Add: microsoft client secret
* Add: display error message
* Fix: fromPref is not used
* Change: try to revoke the token when log out
* Add: revoke dropbox token
* Fix: Google only generates one refresh token for one user by default
* Bump dependencies, fix onedrive list issue
* Fix: arguments sent to sync.put is wrong
* Fix: don't schedule a sync on db changed if not connected
* Bump dependencies. Fix issue of switching drives
* Bump db-to-cloud, fix switching drive issue
* Fix: only auth user on 401 error, don't display login window without user interaction
* Fix: don't call revoke() if token is undefined
* Add: login button to generate the access token interactively
* Fix: make addMissingProperties a local
* Fix: store missing props in an object
* Fix: sync.getStatus should be sync
* LATENCY -> NETWORK_LATENCY
* Fix: cache the token forever if there is no expire time e.g. dropbox
* Add some comments
* Fix: i18n
* Fix: i18n sync status
* fixup! Fix: i18n sync status
* Fix: 'sync to cloud' is displayed twice
* find @-moz-doc sections faster in the editor
* only recreate widgets if section data is changed
* CodeMirror speedup: reuse the old folding marks
* add a reminder to remove the CodeMirror hack in the future
* use precise getTokenAt
* check doc type for string/comment to be more mode-agnostic
* fix setGutterMarker hack
* fix skipSpace: EOL is a space too
* move deepEqual next to deepCopy
* fix getTokenTypeAt check for some cases
* remove the unnecessary \s*
* Revert "Revert defer page script injection (#758)"
This reverts commit 7d52326eb7.
* Add: store style count in sessionStorage
* Change: use localStorage instead of sessionStorage
* Update web-ext
* Fix: page script doesn't work in XML
* Fix: promise never returns if the script is rejected
* Change: disable page script preload
* Drop: stylusStyleCount
* linter and compact layout improvements
Closes#748
While investigating the best way to fix linter scrolling, when I double-checked the compact layout, an old bug I meant to fix a long time ago was immediately apparent. Basically, the linter adds/removes errors as you type, causing the editor to bounce up and down, making it practically unusable.
This PR fixes scrolling, and also collapses options and the linter in the compact layout, but always shows the collapsed linter so you're aware of the error count without the content jumping. It also collapses options in the non-compact layout if the viewport is too short to accommodate them, factoring in the min-height of the linter. All automatic collapsing factors in whether a linter is active so they can adjust accordingly, and disables the setting of collapsed state prefs, since we're deciding the pref anyway, and this allows for re-expanding on resize based on the previous pref.
It's quite possible I failed to account for certain scenarios, so try to break it. Also think it's problematic for the linter to not always be visible if enabled, so I hooked up a 40px fixed header on scroll with just the linter in it for the compact layout.
A few other little details are included. I removed redundant line and column numbers spelled out at the end of lint messages to prevent horizontal overflow. I noticed that the expand/collapse prefs do not toggle correctly when clicking directly on the details-marker arrow. Simplest solution was covering them with the `h2` (we may wanna hook up the manager as well). Also, unrelated, but I switched to opacity to hide resizing sectioned editors, because `visibility: hidden;` breaks editor auto-focus.
If either of you guys wanna fix any bugs, or improve any code, feel free to just commit to this PR directly.
* linter and compact layout improvements
* linter and compact layout improvements
* No usercss scroll listener and delay header check
* Some code tweaks
* menus as dialogs
I think it's better in general, and also eliminates the glitchiness of expandable menus in FF, not to mention possible scroll issues on long style lists with overflow, plus the fact that we could add many menu items in the future without the menu looking ridiculous.
IDEK how the formatting got screwed up and borked the diffs in the other PR. I updated my editor config plugin, so let's see if that helps. I restarted with a fresh master and copy/pasted the changes, so if it's still screwy, I guess my editor needs more help. If not, I'm not playing around with it anymore right now, and the other PR does at least work.
* menus as dialogs
* Add: auto resize section editor on init
* Fix: calculate cm height correctly
* Fix: query heights before set
* Fix: work with small layout, hide sections before ready
* Change: exclusion should match urlWithoutParams
Revert to eight04's initial two commits in #681 which make exclusion toggles domain and singular URLs only, plus reincorporate the js menu height calculation.
* Change: drop excludeStyleByUrlRedundant plus menu height
* menu item text
* Make exclusion rules work like match pattern and handle invalid URLs
* Exclude rules in tooltips
* Remove leftover code
* Cross-browser overflow consistency
* Improve height restriction for popup config dialog
Noticed unnecessary overflow in Github Dark's config dialog. We should allow it to utilize available height.
* Shave off 2px to allow for borders without overflow
* Prevent importing styles with no section. Fixes#687
And prevent issues with existing styles with no section
* Revert sections checks for empty array
* Add styleJSONseemsValid function
* Clean up
* Fix eslint nags
* Fix missing FF favicons Closes#683
I think the combo of swapping `window.prefs` for `prefs`, and moving the function inside `onDOMready()` does the trick.
@eight04 Any idea why `window.prefs` no longer works? Does the rest LGTY?
* Add suggestions