Commit Graph

171 Commits

Author SHA1 Message Date
tophf
1e5f118d2d
update USO-archive urls (#1308) 2021-08-12 20:35:56 +03:00
tophf
49af723078 don't let wrapped text flow below the usw icon 2021-08-12 16:56:35 +03:00
tophf
304dcb1489
show installation error inline, allow retrying (#1309) 2021-08-12 16:44:02 +03:00
Gusted
2dbccf71db
Prefer webp when available (#1306) 2021-08-12 16:02:48 +03:00
Gusted
ce2250a1f3
clarify purpose of unused rule (#1307) 2021-08-12 15:30:22 +03:00
tophf
6650a37194
tidy up USW-related UI and code (#1285)
* shortened the title to "Publish" and fixed the compact mode
* made collapsed <details> share the same line in compact mode
* made hard-coded strings localizable
* IIFE modules instead of generically named globals
* unified and sorted the names of localized messages
* adjusted spacing of header items
* center auth popup to current window

Co-authored-by: Gusted <williamzijl7@hotmail.com>
2021-07-30 15:44:06 +03:00
tophf
fa43c6d94d
fix flicker when hovering buttons in popup [Firefox] (#1267) 2021-06-29 05:37:30 -04:00
tophf
23aa036db5 show USW styles with 'stylus' category 2021-04-20 21:05:49 +03:00
Gusted
f10ebffeff
Add USw to the inline search and proper installing (#1223)
* remember sort order in popup, use "updated" by default
* add a USW link in the manager

Co-authored-by: tophf <tophf@gmx.com>
2021-04-20 20:40:04 +03:00
tophf
3f4fb0617e reimplement #1192 using dummy links
as omitting href attribute is sufficient to avoid the useless tooltip
2021-03-19 22:53:52 +03:00
tophf
9531698dd7 show unreachableMozSiteHint on any site in FF
fixes #1210
2021-03-12 08:51:57 +03:00
tophf
4ae2c67033 unbork install button style + dedupe svg-icon
regressed in b8f6f5db
2021-03-06 21:22:24 +03:00
tophf
b8f6f5db8d
switch from dummy links to dummy buttons (#1192)
The reason is that dummy links like <a href="#"> cause the built-in tooltip pop up on hover which is just useless noise
2021-02-27 20:42:49 +03:00
tophf
41533e863d enforce eslint radix rule for parseInt 2021-02-26 13:02:54 +03:00
tophf
cf1f51af0a
vivaldi bug workaround: open webAuth flow in a tab (#1186) 2021-02-22 15:12:19 +03:00
tophf
a674874861 show global styles for frames if main page is blocked
fixes #1183
2021-02-16 17:03:18 +03:00
tophf
75db3601d0 fix #1177
regressed in fdbfb235
2021-02-10 19:47:07 +03:00
tophf
890ff395c0
use a new solid gear icon everywhere (#1173) 2021-02-10 12:11:52 +03:00
tophf
c12d3fc5e3 convert USO styles to USO-archive on update 2021-02-04 14:10:30 +03:00
tophf
914943ed4c remove sliders
* can be already implemented as a userstyle
* will be exposed in usercss config dialog later
2021-01-15 13:24:21 +03:00
tophf
fdbfb23547
API groups + use executeScript for early injection (#1149)
* parserlib: fast section extraction, tweaks and speedups
* csslint: "simple-not" rule
* csslint: enable and fix "selector-newline" rule
* simplify db: resolve with result
* simplify download()
* remove noCode param as it wastes more time/memory on copying
* styleManager: switch style<->data names to reflect their actual contents
* inline method bodies to avoid indirection and enable better autocomplete/hint/jump support in IDE
* upgrade getEventKeyName to handle mouse clicks
* don't trust location.href as it hides text fragment
* getAllKeys is implemented since Chrome48, FF44
* allow recoverable css errors + async'ify usercss.js
* openManage: unminimize windows
* remove the obsolete Chrome pre-65 workaround
* fix temporal dead zone in apply.js
* ff bug workaround for simple editor window
* consistent window scrolling in scrollToEditor and jumpToPos
* rework waitForSelector and collapsible <details>
* blank paint frame workaround for new Chrome
* extract stuff from edit.js and load on demand
* simplify regexpTester::isShown
* move MozDocMapper to sections-util.js
* extract fitSelectBox()
* initialize router earlier
* use helpPopup.close()
* fix autofocus in popups, follow-up to 5bb1b5ef
* clone objects in prefs.get() + cosmetics
* reuse getAll result for INC
2021-01-01 17:27:58 +03:00
tophf
eb99101f35 inform if the found style doesn't match site url 2020-11-24 00:07:49 +03:00
tophf
5bb1b5ef35 dedup code for modals in popup 2020-11-24 00:07:49 +03:00
tophf
4d198f56e2 faster popup load to avoid resize flicker 2020-11-24 00:07:49 +03:00
tophf
51f125113d restore top margin for #no-styles after 2bf30ed1 2020-11-23 07:29:30 +03:00
tophf
2bf30ed16d
tweaks and fixes (#1123)
* same color for disabled styles in popup/manager
* reduce slider knob
* fix click-to-edit in popup on slider and iframe badge
* indicate slider interactivity on hovering name
* remove 2px gap when first/last entry is striped
* stretch 'blocked' separator to full width
* unreachable dimming should not apply to frames
* restore CWS check in popup
* increase not-applied opacity on name as it's #999 now
* oldUI: restore 'disabled' bubble + show 'usercss' fully
* adjust disabled colors to match perception because transparent text is rendered using gamma-blending whereas colored text uses LCD-antialiasing so to match opacity .6 of #000 we need #888 not #666
2020-11-22 14:09:59 +03:00
tophf
008e33254d add option to use sliders in manager and popup 2020-11-21 10:13:30 +03:00
tophf
3dc684f85f reduce usercss bubble to UC + tweak CSS
* remove 'disabled' bubble
* simplify .style-info
* fix double padding between version and UC
* match manager's font-weight for disabled styles in popup
2020-11-21 10:13:30 +03:00
tophf
420733b93a
PatchCSP + tweaks/fixes/features (#1107)
* add Patch CSP option
* show style version, size, and update age in manager
* add scope selector to style search in manager
* keep scroll position and selections in tab's session
* directly install usercss from raw github links
* ditch localStorage, use on-demand SessionStore proxy
* simplify localization
* allow <code> tag in i18n-html
* keep &nbsp; nodes in HTML templates
* API.getAllStyles is actually faster with code untouched
* fix fitToContent when applies-to is taller than window
* dedupe linter.enableForEditor calls
* prioritize visible CMs in refreshOnViewListener
* don't scroll to last style on editing a new one
* delay colorview for invisible CMs
* eslint comma-dangle error + autofix files
* styleViaXhr: also toggle for disableAll pref
* styleViaXhr: allow cookies for sandbox CSP
* simplify notes in options
* simplify getStylesViaXhr
* oldUI fixups:
  * remove separator before 1st applies-to
  * center name bubbles
* fix updateToc focus on a newly added section
* fix fitToContent when cloning section
* remove CSS `contain` as it makes no difference
* replace overrides with declarative CSS + code cosmetics
* simplify adjustWidth and make it work in FF
2020-11-18 14:17:15 +03:00
tophf
0b3e027bfd auto-promisify browser.* methods on call 2020-11-13 20:07:43 +03:00
tophf
71cabc2029 fix animateElement() when animation is disabled 2020-11-06 21:04:10 +03:00
tophf
aac0f476b2 tweaks/fixes for popup search link
* use a less specific category if the inline search wasn't used yet
* set a href in html to prevent transitions during init
2020-11-05 22:45:22 +03:00
tophf
2e1a903cc7 fix local name customization for usercss/legacy 2020-10-22 15:01:49 +03:00
tophf
9e487b03e5
tweak editor (#1063)
* also apply live-preview if an unsaved style was disabled

* use box-shadow instead of outline for focus everywhere

* allow focus outline on click in text/search input or textarea

* search inputs should use the same style as text inputs

* also use box-shadow focus on delete buttons

* remove URLSearchParams workaround, not needed since Chrome 55

* use `once` in addEventListener, available since Chrome 55

* update USO bug workarounds, remove obsolete ones

* ping/pong to fix openURL with `message` in FF

* use unprefixed CSS filter, available since Chrome 53

* use unprefixed CSS user-select, available since Chrome 54

* focus tweaks

* also use text query in inline search for Stylus category

* use event.key, available since Chrome 51

Co-authored-by: narcolepticinsomniac
2020-10-13 21:14:54 +03:00
tophf
af726405e1 also search in global styles 2020-10-10 14:25:43 +03:00
tophf
0162f39163 switch to USO-archive for inline search in popup
feature: retry sub.domain.tld as domain.tld if no styles are found

old bug fix: show newly added style in popup

dedupe/simplify bits of popup.js
2020-10-09 13:47:57 +03:00
tophf
54b1f218e0
Enhance: promisify chrome into browser, drop promisify (#866)
* promisify `chrome` into `browser`

* comment

* comment

* comment

* Add: a naive browser polyfill

* Fix: polyfill doesn't detect content script env correctly

Co-authored-by: eight04 <eight04@gmail.com>
2020-08-14 20:16:01 +08:00
tophf
2f4658657d
increase USO style search timeout (#984) 2020-06-29 12:16:44 -04:00
narcolepticinsomniac
60d314b165
Improve delete confirmation autofocus visual indication (#956) 2020-06-02 02:33:07 -04:00
tophf
a7a9ee7205
use major browser version in CHROME constant (#946) 2020-05-31 01:43:56 -04:00
tophf
8192fab1b8
show write-style entries for iframes in popup (#861)
* account for iframes in popup list/write-style and badge

* fix and simplify openURL + onTabReady + message from popup

* fixup! resolve about:blank iframes to their parent URL

* fixup! don't underline iframe links until hovered

* fix width bug in popup only when needed (Chrome 66-69)

* fixup! reset styleIds on main page navigation

* fixup! call updateCount explicitly on extension pages

* fixup! ensure frame url is present

* fixup! frameResults entry may be empty

* fixup! init main frame first

* fixup! track iframes via ports

* fixup! reduce badge update rate during page load

* fixup! cosmetics

* fixup! don't add frames with errors

* fixup! cosmetics
2020-02-24 18:16:45 -05:00
tophf
c3b7657433
fix category check when searching for foo.bar.tld (#863) 2020-02-22 07:37:22 -05:00
narcolepticinsomniac
1f12d50aaf
Embed options in manager (#828)
* Embed options in manager

* fix indent again

* Fix edit URL detected as manage URL when creating manager style from popup

* Syntax, hash only, and prevent empty hash

* Fix: move origin check to background

* Rename eslintrc

* Refactor: openURL

* Add: fixme comment about openEditor

* Fix: allow activating manager in other windows

* Add: trimHash method

* Fix: limit the scope of styleViaAPI

* Breaking: add router, keep search params

* Fix: focus options when activated

* Add: some fixme

* Fix: remove unused fixme

* Fix: minor

* Fix: remove unused message

* Add: doc

* Change: activate manager in other windows

* Fix: make sure sender is available in getTabUrlPrefix

* Add: openManage API

* Change: reuse editor in openEditor

* Fix: greedly pop the buffer

* Fix: backward detection

* Fix: remove unused important

* Fix: remove unused workaround

* Fix: avoid empty search param

* Change: detect all kinds of manager in openManage

* Fix: minor

* Manage button text

Co-authored-by: eight <eight04@gmail.com>
2020-02-01 23:36:54 -05:00
tophf
2b985a0a91 automatic category fallback in style search (#831)
Even better. Seems way more reliable. Thanks tophf.
2020-01-27 21:36:43 -05:00
narcolepticinsomniac
6cb038535e
Copyable elements accessibility (#808) 2020-01-06 19:13:49 -05:00
Rob Garrison
2ea5290ea0 Fix word breaks in popup (#805)
* Fix word breaks in popup. See #312

* Click to copy

* Copy styling

* Copy message

* Copy styling

* cleanup

* cleanup
2019-11-17 22:23:12 -05:00
Rob Garrison
a7defbfc40
Popup border (#781)
* Popup: Fix horizontal scrollbar in Chrome

* Hide popup borer option in newer Chrome versions. Closes #780

* Add chrome bug range constant
2019-09-24 08:21:36 -05:00
narcolepticinsomniac
00c2455b07
Slightly wider menu button 2019-07-22 02:31:11 -04:00
narcolepticinsomniac
bc56a7abd6
menus as dialogs (#727)
* 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
2019-06-20 15:37:40 -04:00
narcolepticinsomniac
514fa3204f
Simplify exclusions (#724)
* 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
2019-06-11 10:44:32 -04:00