Commit Graph

53 Commits

Author SHA1 Message Date
tophf
2a75159d2a USO bug workaround: collapse long URL vars
#195
2018-04-12 09:13:55 +03:00
tophf
009970965f let openURL() replace browser-specific New/empty Tab Page 2018-03-30 03:23:21 +03:00
tophf
89d4bb1ed4 handle chrome:// scheme in openURL() 2018-03-22 03:09:20 +03:00
tophf
f2d49ecbb9 resolve activateTab() to tab instead of [tab, window] 2018-03-14 22:00:25 +03:00
tophf
06ded49131 openURL+message: use onTabReady instead of repeated sending
because the tab may take many seconds to start loading depending on connectivity etc.
2018-03-14 05:58:28 +03:00
tophf
4901e97f9f open USO style settings even if the site tab is auto-activated 2018-03-13 18:35:28 +03:00
tophf
34799263eb fixup 259f3732: only switch to POST if 'body' wasn't customized 2018-03-12 22:39:19 +03:00
tophf
259f373207 properly cut URL#href on '?' when sending a POST request
fixes #365
2018-03-12 21:41:25 +03:00
tophf
a8769e375b browser.runtime.getBrowserInfo was added in FF 51 2018-02-25 16:51:07 +03:00
tophf
ca5f8c941b don't refresh own tabs twice
fixes #336
2018-01-29 04:37:24 +03:00
tophf
4493c9e9f0 don't double-process 'styleUpdated' in manager 2018-01-14 18:18:08 +03:00
tophf
989df35b05 live preview in editor
* refreshAllTabs was extracted
* ...and fixed to use each frame's url when getting the styles
2018-01-12 00:54:36 +03:00
tophf
3418ac9cb9 FF: support private/container tabs 2018-01-03 10:43:56 +03:00
tophf
5bc4206593 reuse existing usercss installer tab
A few additional checks were needed to circumvent FF bugs
so openURL was refactored to keep the code readable
2017-12-31 17:59:32 +03:00
tophf
4946aad684 FF: allow access to AMO in FF (actually works in 59+)
fixes #312
2017-12-22 08:36:10 +03:00
tophf
6607455e8f silence eslint; switch shirt-circuiting to single-line if/else 2017-12-18 10:27:50 +03:00
tophf
d035e18b9f expose responseType in download() 2017-12-10 10:11:19 +03:00
tophf
0a865318a4 popup: "configure" opens USO page and expands the settings area 2017-12-10 07:56:41 +03:00
tophf
e4e8f04c95 code cosmeticsiv 2017-12-07 06:54:51 +03:00
tophf
fb3138f700 add .vivaldi class on <html> 2017-12-07 06:52:43 +03:00
tophf
03b6f6c263 manage: search regexps, add search help, fix favicons toggle icon
* the toggle icon is now a triangle, rotated when open
2017-12-06 09:39:45 +03:00
tophf
a6f63d096e extract checkboxes to global.css, fixes 2017-12-05 04:39:29 +03:00
tophf
39a521fb80 FF: don't style checkboxes in FF < 54, not 57
See #271
2017-12-03 07:59:41 +03:00
tophf
e6e762505f FF: don't style checkboxes in FF < 57 2017-12-03 07:07:43 +03:00
tophf
55564b543a replace 'about:blank' tabs in openURL() 2017-12-03 02:44:20 +03:00
tophf
0d80177691 accept xhr options in download(url, options)
also fixup d1964bbc: an error should reject with a code, not XHR's ProgressEvent
2017-11-26 21:09:29 +03:00
tophf
6aef6cdcd7 0 is a valid tab id 2017-11-25 20:24:15 +03:00
tophf
978e5ca9f0 sendMessage()
Promise mode [default]:
  - rejects on receiving {__ERROR__: message} created by
    background.js::onRuntimeMessage
  - suppresses chrome.runtime.lastError
    by browserAction.setText which lacks a callback param in chrome API

Callback mode:
  - enabled by passing a second param
  - doesn't suppress chrome.runtime.lastError
2017-11-25 18:00:38 +03:00
tophf
8f04e17d27 fix #223 - Android compatibility 2017-11-25 16:25:20 +03:00
tophf
94ed435e75 fixup d2b9b302: prevent setting version var to 'undefined' 2017-11-14 11:12:18 +03:00
tophf
3c08342e98 open usercss installer tab next to the source tab 2017-11-14 09:38:08 +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
eight
988a920a2f Fix: use getOwnTab in closeCurrentTab 2017-11-09 14:11:26 +08:00
eight
0c292c3150 Fix: download should throw status code 2017-11-09 09:12:14 +08:00
eight
5f5b06b10c Fix: use FIREFOX variable 2017-11-09 09:12:14 +08:00
tophf
d2b9b30239 reliable userAgent detection in FF before 57
fixes #228
2017-11-08 06:53:36 +03:00
tophf
721dfc4787 export: create blob directly
fixes #211
2017-10-14 04:25:54 +03:00
eight
54076d9f17 Merge branch 'master' of https://github.com/openstyles/stylus into dev-user-css 2017-10-12 16:28:18 +08:00
tophf
0978308325 openerTabId added in FF57: https://bugzil.la/1238314 2017-09-30 02:40:01 +03:00
tophf
bf9ebab295 extract browser version instead of boolean 2017-09-30 02:32:05 +03:00
eight
7365a8bada Fix: various fixes 2017-09-25 18:43:55 +08:00
eight
d1964bbc16 Fix: make download be able to read file: 2017-09-19 08:51:55 +08: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
5330db11af FF: ignore lastError in sendMessage where irrelevant 2017-08-28 15:20:38 +03:00
tophf
cd6bcc6511 FF: when not dom.storage.enabled use dummies 2017-08-28 15:20:38 +03:00
tophf
243da0b0d1 fix opening own pages from an incognito window popup in Chrome 2017-08-26 15:57:33 +03:00
tophf
815f8ca959 also find styles for URLs with stripped #hash
kinda fixes #155

as per spec the fragment portion is ignored in @-moz-document:
https://www.w3.org/TR/2012/WD-css3-conditional-20120911/#url-of-doc
but we still respect url("foo#hash") set in userstyles
because the spec is outdated and doesn't account for SPA sites

collateral damage: simplified URLS.supported()
2017-08-18 13:18:19 +03:00
tophf
30c19cf64e fixup 860443b9: BG can point to itself 2017-08-04 12:42:34 +03:00
tophf
860443b909 ensure getBackgroundPage is fully loaded 2017-07-29 08:17:49 +03:00
tophf
3b49d83616 In Chrome 61.0.3161+ NTP can't be styled anymore 2017-07-23 12:42:34 +03:00