Commit Graph

56 Commits

Author SHA1 Message Date
eight
5b3b4e680f Add: navigator-util 2018-10-07 21:20:39 +08:00
eight
b5107b78a5 Add: broadcast messages with reasons 2018-10-07 01:42:43 +08:00
eight
e7ef4948cd Fix: observer is unavailable? 2018-10-06 18:10:58 +08:00
eight
1c635b5bc1 Drop requestStyles 2018-10-06 17:47:43 +08:00
eight
75f2561154 Fix: don't recreate element when style update in popup 2018-10-06 16:38:04 +08:00
eight
196b6aac63 Fix: the return value of getSectionsByUrl is changed 2018-10-06 15:16:00 +08:00
eight
095998f07c Change: switch to msg.js 2018-10-06 13:27:58 +08:00
eight
fa3127d988 Change: switch to msg.js 2018-10-06 13:02:45 +08:00
eight
34497ebe16 WIP: switch to API 2018-10-05 18:47:52 +08:00
eight
f1639cc33e WIP: broadcastMessage 2018-10-05 01:03:40 +08:00
eight
6d32ffb76b WIP 2018-10-04 12:46:19 +08:00
tophf
e128498518 code cosmetics: convert to a lintable template string 2018-09-11 17:41:46 +03:00
tophf
6fdc01201b FF: preserve sheet's disabled state in workaround for #461 2018-09-11 17:39:43 +03:00
tophf
dcdb4be10b FF59+: always set style's textContent in page context
see #461
2018-09-05 15:58:15 +03:00
tophf
bfe18e74a4 FF bug workaround: set style element code in page context
fixes #461
2018-08-25 09:42:35 +03:00
tophf
406a7cd4c0 FF bug workaround: apply styles to more iframes 2018-08-09 21:22:26 +03:00
tophf
1b7c131c37 fixup 1a42e6bf 2018-08-06 21:27:48 +03:00
tophf
91fb0579f1 code clarification 2018-08-06 17:38:38 +03:00
tophf
1a42e6bf00 move the iframe styles in the next animation frame
fixes #461
2018-08-06 17:38:38 +03:00
tophf
75a9ce4696 don't overwrite url in stylus-iframe attr with "true" 2018-01-20 16:26:13 +03:00
tophf
a3962b7adf put https://top.site.origin in "stylus-iframe" attr 2018-01-19 15:37:26 +03:00
tophf
0fa391732b workaround for Chrome devtools bug (fixed in v65)
recreate the style element on style code change because older devtools inspector can't edit injected rules after we update textContent of an existing element
2018-01-15 19:43:35 +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
9fdabe3582 simplify getStyles
* 'asHash' implies 'enabled'
* 'length' is added to the style hash
2018-01-10 22:18:30 +03:00
tophf
11dbfea897 apply.js: FF forgets the extra methods on MutationObserver 2018-01-10 19:50:48 +03:00
tophf
9aa382ebf5 disconnect an orphaned chrome.runtime message/port listener 2018-01-10 19:50:29 +03:00
tophf
825fd00a80 fixes for FF52 2018-01-07 12:50:17 +03:00
tophf
3418ac9cb9 FF: support private/container tabs 2018-01-03 10:43:56 +03:00
tophf
7832c3c581 code cosmetics 2017-12-09 21:31:34 +03:00
tophf
a6fdb49503 content script may run before documentElement is present 2017-12-09 21:29:49 +03:00
tophf
2fe4c0793c countStylesInHash when skipping styleReplaceAll 2017-12-09 21:16:41 +03:00
tophf
cb32b9debf skip styleReplaceAll if same; add some safety checks 2017-12-09 20:37:08 +03:00
tophf
491fcef08b also move style element when it's the first child
see #295
2017-12-09 19:37:31 +03:00
tophf
57e335abb8 raise style restoration limit; don't count own changes 2017-12-09 18:41:05 +03:00
tophf
a71d2fa226 ...even less eager 2017-12-07 11:10:32 +03:00
tophf
6e1a6d1ad6 don't be too eager at restoring style elements to prevent deadlocks 2017-12-07 10:49:47 +03:00
tophf
6d4689e559 ensure own style elements dominance over other style elements 2017-12-07 10:12:01 +03:00
tophf
2b22494f3f move style elements after head/body regardless of prior stuff
fixes #284
2017-12-05 08:50:07 +03:00
tophf
3bf0f7e2f8 FF: ensure styles are ordered correctly in background tabs
should probably help #284
2017-12-05 06:27:51 +03:00
tophf
fb3554a351 simplify orphanCheck; use IIFE; fix comm issues 2017-11-26 04:24:23 +03:00
tophf
2495ded507 fixup c8b6672d: restore deleted elements 2017-11-25 23:47:39 +03:00
tophf
c8b6672d79 always sort applied style elements by id 2017-11-24 13:19:13 +03:00
tophf
24c60b7e8a fixup 8a1908b7: don't protect disabled elements 2017-11-21 10:59:14 +03:00
tophf
8a1908b760 protect own style elements (100 times max to avoid deadlocks)
fixes #252
2017-11-21 09:45:44 +03:00
tophf
ac8331e6ae FF: use tabs API for XML viewer 2017-11-14 09:52:51 +03:00
tophf
b6703e7b15 fix disableAll in XML documents: tag names are case-sensitive in XML 2017-11-13 20:25:07 +03:00
tophf
8efe4b806b revert 3cf32048: Chrome 49+ XML viewer works with styles under <html> 2017-11-13 20:09:19 +03:00
tophf
e9a7640a3f apply: recognize moz-extension:// 2017-10-20 02:13:01 +03:00
tophf
5064ca1d4e prevent DOM id confusion
DOM elements with an id are propagated as global variables
https://stackoverflow.com/q/6381425
2017-10-18 21:30:17 +03:00
tophf
054528edde apply: SVG className workaround 2017-09-17 10:56:03 +03:00