stylus/manage/manage.js

760 lines
24 KiB
JavaScript
Raw Normal View History

/* global
$
$$
$create
animateElement
API
checkUpdate
CHROME
Refactor the entire storage system and the section editor (#518) * Squashed commit of the following: commit d84c4dc3fe29a87d0c49a109762d8dd5b3e39aa8 Author: eight <eight04@gmail.com> Date: Sun Oct 14 19:13:29 2018 +0800 Fix: remove unused comment commit 46027120ec4a3785f1674933a165fa0c226bc38d Author: eight <eight04@gmail.com> Date: Sun Oct 14 19:09:06 2018 +0800 Add: handle styleUpdated message commit f85d4de39b3ee2636c44ca46b3ee92045e43696a Author: eight <eight04@gmail.com> Date: Sun Oct 14 18:59:29 2018 +0800 Fix: handle styleAdded message in popup commit 81f3e69574bee2eeffd9d0a5bbb0811f49436520 Author: eight <eight04@gmail.com> Date: Sun Oct 14 18:50:54 2018 +0800 Change: getStylesInfoByUrl -> getStylesByUrl commit f9dc04558f7dd3c077259bbe762569940b035403 Author: eight <eight04@gmail.com> Date: Sun Oct 14 18:48:20 2018 +0800 Fix: drop getStylesInfo commit fea04d591fb79633112bfc605e552495b4cc41ef Author: eight <eight04@gmail.com> Date: Sun Oct 14 18:39:28 2018 +0800 Fix: remove unused ignoreChromeError commit 2aff14e2133fece25b136226961bd97d2d3e1ca2 Author: eight <eight04@gmail.com> Date: Sun Oct 14 18:09:53 2018 +0800 Fix: don't dup promisify in prefs commit d4ddfcc7137e3f14d4dcd72ea8353e0b6fdd8fb0 Author: eight <eight04@gmail.com> Date: Sun Oct 14 17:56:16 2018 +0800 Change: drop .last and .rotate commit 85e70491e413aca8fc8599e88f2e09ea5dde281d Author: eight <eight04@gmail.com> Date: Sun Oct 14 17:36:00 2018 +0800 Fix: unused renderIndex commit 7acb131642648767ea162ffd689ad4ca55d8724e Author: eight <eight04@gmail.com> Date: Sun Oct 14 17:32:49 2018 +0800 Fix: update title on input commit a39405ac4c32d5d38f4b70abd2ea54929d51eae2 Author: eight <eight04@gmail.com> Date: Sun Oct 14 17:17:20 2018 +0800 Fix: remove unused messages commit 14c2fdbb5886ee96f14367e660736e2a8ed3edb9 Author: eight <eight04@gmail.com> Date: Sun Oct 14 16:36:12 2018 +0800 Fix: dirty state for new added applies commit fb1b49b8bb7c0b4cd089d9a3b22dd744dea35f05 Author: eight <eight04@gmail.com> Date: Sun Oct 14 16:27:17 2018 +0800 Fix: minor commit 2c2d849fa46d3bdb83a191564b399dfb963083f1 Author: eight <eight04@gmail.com> Date: Sun Oct 14 16:20:14 2018 +0800 Fix: drop unused getCode commit f133c3e67a9ff969677f73b72267c34968c74190 Author: eight <eight04@gmail.com> Date: Sun Oct 14 16:18:14 2018 +0800 Fix: drop unused lastActive commit 05a6208f5c66e82827d692906d5a3f49dae66471 Author: eight <eight04@gmail.com> Date: Sun Oct 14 16:17:45 2018 +0800 Fix: minor commit 05a87ed00f650f4e92a31a655f471c7f3580ad71 Author: eight <eight04@gmail.com> Date: Sun Oct 14 15:58:33 2018 +0800 Fix: minor commit 576f73f3336e5f68aab2adad3ad79c7920f4ae8c Author: eight <eight04@gmail.com> Date: Sun Oct 14 03:03:35 2018 +0800 Fix: always register listeners commit e93819deb4515f9f2d9116cfea6b21aa05c8dd72 Author: eight <eight04@gmail.com> Date: Sun Oct 14 02:58:49 2018 +0800 Fix: unused statement commit 39b11685b494bd90c6cfd64ff85d9a4c6d9f5bef Author: eight <eight04@gmail.com> Date: Sun Oct 14 02:54:29 2018 +0800 Fix: minor commit 9dd3cd43c166e9e98389f06db25775e2c7355cfe Author: eight <eight04@gmail.com> Date: Sun Oct 14 02:49:22 2018 +0800 Fix: don't reorder options commit 90aadfd7283ed86ac359fbd4b300d548db8b298e Author: eight <eight04@gmail.com> Date: Sun Oct 14 02:43:52 2018 +0800 Fix: drop __ERROR__ commit 838c21e3b335ce0944321d16bf3617b983e1b156 Author: eight <eight04@gmail.com> Date: Sun Oct 14 02:36:20 2018 +0800 Fix: use findStyle API commit 93a4cdf595785690a830759a1b06138dec08d73a Author: eight <eight04@gmail.com> Date: Sun Oct 14 02:34:05 2018 +0800 Add: findStyle API commit 8e75871b9bf1b6c360e6f1dece9262d4510e6cb8 Author: eight <eight04@gmail.com> Date: Sun Oct 14 02:19:01 2018 +0800 Breaking: drop getStylesFallback commit ad06551440290ae43e86eca7ed78b824431daf1d Author: eight <eight04@gmail.com> Date: Sun Oct 14 02:16:48 2018 +0800 Fix: use dataurl to inject page script commit cb5cbb4d10c85624f03c0d6d3bd8f35c55318722 Author: eight <eight04@gmail.com> Date: Sun Oct 14 01:39:50 2018 +0800 Fix: various commit 53efd78b894bf73babae28f8ef9595dac4b79f7a Author: eight <eight04@gmail.com> Date: Sun Oct 14 01:12:57 2018 +0800 Update doc commit 7d005f3eaa35ea5328ecf608429de85b77dab34d Author: eight <eight04@gmail.com> Date: Sun Oct 14 01:09:22 2018 +0800 Change: kill style.reason commit fc53bed3de2ff3704609a40d8e736de7b8de6d18 Author: eight <eight04@gmail.com> Date: Sun Oct 14 00:56:04 2018 +0800 Fix: doo many indents commit 14e321d2582cef0c3e97e2723bc60ecc1d682ba8 Author: eight <eight04@gmail.com> Date: Sun Oct 14 00:40:23 2018 +0800 Fix: don't update icon for popup and options commit 01bdd529bc51b8dd780fcb500a4898115bc92b1d Author: eight <eight04@gmail.com> Date: Sun Oct 14 00:39:17 2018 +0800 Fix: updateCount commit b9968830d3f866688eaff4824d0ce47647265de0 Author: eight <eight04@gmail.com> Date: Sun Oct 14 00:38:49 2018 +0800 Fix: don't send null value commit ff3bf6f52d89f3b2e6f74b37b4a47dff5fd6cdfc Author: eight <eight04@gmail.com> Date: Sun Oct 14 00:03:34 2018 +0800 Add: styleViaAPI updateCount commit 39d21c3d29ad3507281e258d4539dfe4ef4ba124 Author: eight <eight04@gmail.com> Date: Sat Oct 13 23:57:45 2018 +0800 Fix: broadcastError -> ignoreError commit ecb622c93cf11fbfc47b8381a1c869ca9151582e Author: eight <eight04@gmail.com> Date: Sat Oct 13 21:29:06 2018 +0800 Fix: implement styleViaAPI commit 7c3d49c0051dc1d5a7be71acd9f08f8b3b09b901 Author: eight <eight04@gmail.com> Date: Sat Oct 13 17:50:28 2018 +0800 Fix: ROOT may change in XML pages commit 3fd8d937f31d643a5976406bc17e47d137ada890 Author: eight <eight04@gmail.com> Date: Sat Oct 13 16:49:43 2018 +0800 Fix: various commit 859afc8ee9c2d964e1cb9c9dbac7c1613cefef64 Author: eight <eight04@gmail.com> Date: Sat Oct 13 16:39:54 2018 +0800 Enhance: don't cache enabled state commit fbe77a8d15330cfd0d340c13eaf77a4c48d3c49f Author: eight <eight04@gmail.com> Date: Sat Oct 13 16:15:07 2018 +0800 Fix: various commit a4fc3e91622e7b9537a661490af92c6f6ee06398 Author: eight <eight04@gmail.com> Date: Sat Oct 13 16:11:38 2018 +0800 Fix: various commit 7e0eddeb8f03c42fb93db9bef633944dd1c82e57 Author: eight <eight04@gmail.com> Date: Sat Oct 13 15:58:31 2018 +0800 Fix: various commit 8b4ab47d897f5baee15f584a0dd289d38e5dc218 Author: eight <eight04@gmail.com> Date: Sat Oct 13 15:20:10 2018 +0800 Add: some type hint commit 7d340d62dcb7a25a1ccdc6648ab0683afbda917d Author: eight <eight04@gmail.com> Date: Sat Oct 13 15:13:11 2018 +0800 Change: drop storage.js, some functions are moved to sections-util commit d286997d6a64cd8601ed96e204514a5d532d5afd Author: eight <eight04@gmail.com> Date: Sat Oct 13 15:12:00 2018 +0800 Fix: minor commit d60db9dbef06baf4430aaea627406dc36b06debb Author: eight <eight04@gmail.com> Date: Sat Oct 13 15:03:10 2018 +0800 Fix: minor commit 43afa31fa0c47967ae695c9eb2492e5ddc33f85b Author: eight <eight04@gmail.com> Date: Sat Oct 13 14:50:31 2018 +0800 Fix: update tab icon on forward/backward commit f08faea149de3d63e1bcb404cb3e6cfa655dc24b Author: eight <eight04@gmail.com> Date: Sat Oct 13 13:50:03 2018 +0800 Fix: parallel import commit 4d064354869360b2bc011803bd229ec1e640a760 Author: eight <eight04@gmail.com> Date: Fri Oct 12 23:32:03 2018 +0800 Add: importStyle API commit c55675912e276139735037fc1968866eecd94a3f Author: eight <eight04@gmail.com> Date: Fri Oct 12 23:14:46 2018 +0800 Fix: refactor import-export commit 86ea846a89549b683711202799a53536e6e9dec2 Author: eight <eight04@gmail.com> Date: Fri Oct 12 17:34:36 2018 +0800 Fix: search db is broken commit 831ca07c2d770271bc069d599eaee47d9705cffe Author: eight <eight04@gmail.com> Date: Fri Oct 12 17:29:35 2018 +0800 fixup! Add: implement sloppy regexp indicator commit e67b7f4f36856ba26e08e37f91d9631aa77ec469 Author: eight <eight04@gmail.com> Date: Fri Oct 12 17:27:19 2018 +0800 Add: implement sloppy regexp indicator commit 36e13f88f00a3b01074ad4f41a1d1e056ee9c561 Author: eight <eight04@gmail.com> Date: Fri Oct 12 16:59:23 2018 +0800 Add: return excluded/sloppy state in getStylesInfoByUrl commit f6ce78f55b3012923e5a2f4315c642b5f9ab9f57 Author: eight <eight04@gmail.com> Date: Fri Oct 12 16:39:47 2018 +0800 Fix: dead object commit 5ae95a1ad95c95bb95073bc259d12f1329dc9c31 Author: eight <eight04@gmail.com> Date: Fri Oct 12 16:27:54 2018 +0800 Fix: don't reinit all editors on save commit 1a5a206fe62270c70239e5dce692f6f49578589c Author: eight <eight04@gmail.com> Date: Fri Oct 12 16:18:40 2018 +0800 Refactor: pull out sections editor section commit 8016346035b109214e974935d74831ca9cd4ff7d Author: eight <eight04@gmail.com> Date: Fri Oct 12 15:30:35 2018 +0800 Fix: replaceStyle make style name undefined commit fa080d191311a02f8b080e4e7cf28e2305c4c540 Author: eight <eight04@gmail.com> Date: Fri Oct 12 15:21:36 2018 +0800 Fix: catch csp error commit e0b064115dd26daf1e728e790761983b59db10fc Author: eight <eight04@gmail.com> Date: Fri Oct 12 15:03:00 2018 +0800 Fix: use a simple eval to execute page scripts commit 405b7f8f06968b1f588a6bdb45dfbaeb0b07305b Author: eight <eight04@gmail.com> Date: Fri Oct 12 03:48:13 2018 +0800 Fix: removed unused API commit 1b2c88f92635f8039dd7cc99fcae13ed0e4f8f4f Author: eight <eight04@gmail.com> Date: Fri Oct 12 03:46:51 2018 +0800 Fix: no need to access db commit a8131fc9c522577d0721798cd0f69c26d68165d3 Author: eight <eight04@gmail.com> Date: Fri Oct 12 03:43:31 2018 +0800 Fix: remove unused methods commit 3ae0c4dd134955055c12e18163c2e8b77999cfd8 Author: eight <eight04@gmail.com> Date: Fri Oct 12 03:10:26 2018 +0800 Enhance: allow matcher to return verbose info commit 0ea7ada48febd59a207f0eee24fbcbb03ae943b6 Author: eight <eight04@gmail.com> Date: Fri Oct 12 02:02:14 2018 +0800 Fix: content script may load before the background is ready commit 04c2d6bbf6d52b78b0fab046ddbacf9cb73ca248 Author: eight <eight04@gmail.com> Date: Fri Oct 12 01:49:52 2018 +0800 Fix: throw receiving end doesn't exist message commit f0c0bc4d6a5a720abfdc91fc92ef5973783c600f Author: eight <eight04@gmail.com> Date: Fri Oct 12 01:11:17 2018 +0800 Fix: unwrap error commit 4d42765d6ca989e04a39696c066e6e12b8f1197d Author: eight <eight04@gmail.com> Date: Thu Oct 11 23:55:16 2018 +0800 fixup! Fix: match subdomain commit 99626e4a48a008e0ddb6f90144965e88a65d2a79 Author: eight <eight04@gmail.com> Date: Thu Oct 11 23:54:58 2018 +0800 Fix: match subdomain commit a57b3b27160cb11b01db2c54e052cbabf6a7ab49 Author: eight <eight04@gmail.com> Date: Thu Oct 11 23:39:11 2018 +0800 Fix: firefox commit 5cfea3933f920822b638683ea234d4aa6866e2f4 Author: eight <eight04@gmail.com> Date: Thu Oct 11 22:46:34 2018 +0800 Add some comment to db.js commit 25fd3a1c2b52ace576a3e0ccfed39ff0393f5141 Author: eight <eight04@gmail.com> Date: Thu Oct 11 22:14:56 2018 +0800 Fix: remove unused prop commit bdae1c3697c698a84417886b0bfaaa54c975f5d4 Author: eight <eight04@gmail.com> Date: Thu Oct 11 20:00:25 2018 +0800 Change: simpler styleCodeEmpty commit bd4a453f458c7c5a782b53145a899e899beb1ae3 Merge: c1bf9f5 9058c06 Author: eight <eight04@gmail.com> Date: Thu Oct 11 19:49:37 2018 +0800 Merge branch 'dev-usercss-meta' into dev-exclusions commit c1bf9f57e908c33ab71ecef44d40c9c7471c036f Author: eight <eight04@gmail.com> Date: Thu Oct 11 19:29:17 2018 +0800 Fix: minor commit fd5eeb4b812b48fb19859d391bfc9658f265113a Author: eight <eight04@gmail.com> Date: Thu Oct 11 19:00:05 2018 +0800 Add: refresh on view commit 3e38810a495b6ba0e10f686f7691fd6dc94be3be Author: eight <eight04@gmail.com> Date: Thu Oct 11 18:13:24 2018 +0800 Fix: make sure icons are refreshed at startup commit c657d7e55c6b48fb5d8649f2488eeef04a936d40 Author: eight <eight04@gmail.com> Date: Thu Oct 11 17:32:27 2018 +0800 Add: implement bug 461 commit 7ed39ab6ef76efd412af42387aec4c24287f3dc7 Author: eight <eight04@gmail.com> Date: Thu Oct 11 15:42:44 2018 +0800 fixup! Add: icon-util commit 30e494eda9ba8167d9528c6d3e24b8446a12e4b8 Author: eight <eight04@gmail.com> Date: Thu Oct 11 15:42:23 2018 +0800 Add: icon-util commit 510a886e1445bcd5b2d72c01438a14a31cb230bd Author: eight <eight04@gmail.com> Date: Thu Oct 11 03:21:38 2018 +0800 Fix: exposeIframes commit c7f81662c43d2aaae0105a754236b96b1225d2ec Author: eight <eight04@gmail.com> Date: Thu Oct 11 02:19:14 2018 +0800 Fix: autoCloseBrackets is true by default commit f3a103645d777f0d8c191a8a74893b3548ecbb00 Author: eight <eight04@gmail.com> Date: Thu Oct 11 02:11:14 2018 +0800 Fix: various commit d4436cde2014fc3a63512da74866aaeb99f7c782 Author: eight <eight04@gmail.com> Date: Thu Oct 11 01:39:10 2018 +0800 Add: implement exposeIframe commit 43db875fd80ec851f1d72ad5589e39126a8d6391 Author: eight <eight04@gmail.com> Date: Thu Oct 11 01:26:24 2018 +0800 Kill more globals commit dc491e9be3ecdf8da516e6653df0030cab104fb9 Author: eight <eight04@gmail.com> Date: Thu Oct 11 01:22:13 2018 +0800 Kill old storage, storage-dummy commit ba64b95575349fdbba2b4592f81c709df1ed0262 Author: eight <eight04@gmail.com> Date: Thu Oct 11 00:54:38 2018 +0800 WIP: kill cachedStyles commit 7eba890a213f204da8f79afaccd07f37d2078096 Merge: d2b36a1 81e4823 Author: eight <eight04@gmail.com> Date: Wed Oct 10 23:15:14 2018 +0800 Merge branch 'dev-private-prefs' into dev-exclusions commit d2b36a168e967dcf48a11574af67bff997df9b6b Author: eight <eight04@gmail.com> Date: Wed Oct 10 23:05:20 2018 +0800 Kill hidden globals commit 22d4767511fb63e77f8f46e9361a998b7803b7fd Author: eight <eight04@gmail.com> Date: Wed Oct 10 19:23:34 2018 +0800 Fix: margin for deleted sections commit 00687983f0a6f277f2bcb2f60ea35575aaa3f734 Author: eight <eight04@gmail.com> Date: Wed Oct 10 18:21:07 2018 +0800 Fix: default value commit ff6fd8cad3dced164673e335ca1b5a6a9e477b94 Author: eight <eight04@gmail.com> Date: Wed Oct 10 18:02:51 2018 +0800 Fix: default options commit c23f315c52f658b7bf33f7a748f6287a710bd64b Author: eight <eight04@gmail.com> Date: Wed Oct 10 17:40:07 2018 +0800 Refactor: use CodeMirror.defineOption commit 4419c5dc1e584f420a3acd204b85fd0661442b27 Author: eight <eight04@gmail.com> Date: Wed Oct 10 16:32:39 2018 +0800 Change: kill editors, styleId commit 6494985b50c36add1569b71020285eb4eeb1a943 Author: eight <eight04@gmail.com> Date: Wed Oct 10 16:14:51 2018 +0800 Fix: various commit 37e1f43f75fe252c32b18fa91e83790860267f10 Author: eight <eight04@gmail.com> Date: Wed Oct 10 15:04:03 2018 +0800 Fix: minor commit d26ce3238e9beea602b4b47c4fd0184107712ce6 Author: eight <eight04@gmail.com> Date: Wed Oct 10 14:49:37 2018 +0800 Add: codemirror-factory commit 15a1f552f6f23ffedb7d22bed6ab306d4cc8ab27 Author: eight <eight04@gmail.com> Date: Wed Oct 10 12:08:35 2018 +0800 WIP: kill getSection commit ba6159e0677ca9da393cda68f6a72d00ab723a3b Author: eight <eight04@gmail.com> Date: Wed Oct 10 02:43:09 2018 +0800 WIP: edit page commit fd9ab5d6e50ef85cc6525c84aba4d5bb50b13f02 Author: eight <eight04@gmail.com> Date: Wed Oct 10 00:41:07 2018 +0800 Fix: switch to editor commit 06e22d0d186cc52dd7260173083406a6895a07c6 Author: eight <eight04@gmail.com> Date: Tue Oct 9 23:38:29 2018 +0800 Change: add sections-editor commit 30e86629468ecd02724c6aae076605b36495b33c Author: eight <eight04@gmail.com> Date: Mon Oct 8 20:12:39 2018 +0800 Add: preview error commit 47b2b4fc49dd0d6296ac4159410e84e19acfc226 Author: eight <eight04@gmail.com> Date: Mon Oct 8 18:38:01 2018 +0800 Add: livePreview.show commit 7b5e7c96d59df10531bbf81fe3bb682f9593aabf Author: eight <eight04@gmail.com> Date: Mon Oct 8 18:16:45 2018 +0800 Hook up live preview commit 15efafff3c55fbd5e08693849b370a1f8fa1ac38 Author: eight <eight04@gmail.com> Date: Mon Oct 8 17:49:57 2018 +0800 Add: live preview commit a38558ef786fccb7cbf46327be3036b608e286b1 Author: eight <eight04@gmail.com> Date: Mon Oct 8 15:30:39 2018 +0800 WIP: make notifyAllTabs a noop commit 582e9078af834a719b1ce04db09c63741b446380 Author: eight <eight04@gmail.com> Date: Mon Oct 8 14:39:08 2018 +0800 Fix: inject all scripts commit f4651da8d8fbf972d1124f695116c07e25cbd0b5 Author: eight <eight04@gmail.com> Date: Sun Oct 7 23:41:46 2018 +0800 Drop deleteStyle commit 0489fb3b2f2243ed99becc7c8fbe0da2e1424d97 Author: eight <eight04@gmail.com> Date: Sun Oct 7 23:33:51 2018 +0800 Drop saveStyle commit 02f471f07758db8753beed09c40aaba921940b77 Author: eight <eight04@gmail.com> Date: Sun Oct 7 23:28:41 2018 +0800 Fix: usercss API commit 057111b171ad414c9cd152bac03711b83073da68 Author: eight <eight04@gmail.com> Date: Sun Oct 7 22:59:31 2018 +0800 Update usercss API commit 69cae02381fc8f1f3e0b33cbda587f4705acdf1d Author: eight <eight04@gmail.com> Date: Sun Oct 7 21:40:29 2018 +0800 Drop getStyles commit c5d41529d9bae8d7f66f49afbedab8362079f66a Author: eight <eight04@gmail.com> Date: Sun Oct 7 21:28:51 2018 +0800 Minor fixes commit 5b3b4e680ff45331db1aa726c5d765b6e8cfc026 Author: eight <eight04@gmail.com> Date: Sun Oct 7 21:20:39 2018 +0800 Add: navigator-util commit b5107b78a5a02df2705771c9ee1fe0f2a6db5a5e Author: eight <eight04@gmail.com> Date: Sun Oct 7 01:42:43 2018 +0800 Add: broadcast messages with reasons commit e7ef4948cd4426bf592230b1670ddc6c50e336ca Author: eight <eight04@gmail.com> Date: Sat Oct 6 18:10:47 2018 +0800 Fix: observer is unavailable? commit 1c635b5bc1e8b5347c1171cb01a32852030c0a91 Author: eight <eight04@gmail.com> Date: Sat Oct 6 17:47:43 2018 +0800 Drop requestStyles commit 75f25611545d7d0735ecd5d84835a956b017ce48 Author: eight <eight04@gmail.com> Date: Sat Oct 6 16:38:04 2018 +0800 Fix: don't recreate element when style update in popup commit 583ca31d973e844ecb7287b1ae8fa9aeb94a0a67 Author: eight <eight04@gmail.com> Date: Sat Oct 6 15:40:07 2018 +0800 fixup! Add: isCodeEmpty commit 1cf6008514f9d402e8f12e7b58a92434243e0d25 Author: eight <eight04@gmail.com> Date: Sat Oct 6 15:33:18 2018 +0800 Add: isCodeEmpty commit 450cd60aeb28c3c99d69c8b37043554a840077bb Author: eight <eight04@gmail.com> Date: Sat Oct 6 15:22:04 2018 +0800 Fix: ignore comment block commit 196b6aac638664e8d7816d9558404fcfa10b2653 Author: eight <eight04@gmail.com> Date: Sat Oct 6 15:16:00 2018 +0800 Fix: the return value of getSectionsByUrl is changed commit 3122d28c1ada62e31fcc7076ec5487e4811cef1d Author: eight <eight04@gmail.com> Date: Sat Oct 6 15:14:05 2018 +0800 Fix: always use promise in API call commit e594b8ccb1d3c9f6f4dee06cb084c392423e6a37 Author: eight <eight04@gmail.com> Date: Sat Oct 6 15:11:01 2018 +0800 Cache enabled state commit 1f18b13a9241f848d68ffc622c3a6f816436fd1c Author: eight <eight04@gmail.com> Date: Sat Oct 6 13:48:46 2018 +0800 Add: match global sections commit fedf844ddd57d8c7bd9bc18ee6bc15359ff4123d Author: eight <eight04@gmail.com> Date: Sat Oct 6 13:45:37 2018 +0800 Add: getStylesInfoByUrl commit 095998f07c0e6ffa6c4552e88a3becf2450051c7 Author: eight <eight04@gmail.com> Date: Sat Oct 6 13:27:58 2018 +0800 Change: switch to msg.js commit fa3127d988b8aa09b059adb4aade25a502636ecf Author: eight <eight04@gmail.com> Date: Sat Oct 6 13:02:45 2018 +0800 Change: switch to msg.js commit 05d582c726642c5222cc2f039f39e1e5f1848499 Author: eight <eight04@gmail.com> Date: Sat Oct 6 11:43:42 2018 +0800 Add: msg.sendBg commit 171339f7109b5f795f37ec2af3a06c14e203b7ec Author: eight <eight04@gmail.com> Date: Sat Oct 6 04:39:48 2018 +0800 WIP: drop api.js commit 3a618aca2a0d19216cd655d66a4d7a4c5b1be07e Author: eight <eight04@gmail.com> Date: Sat Oct 6 03:19:51 2018 +0800 WIP: use deepCopy commit bb1cb580240c042bc3c16e5421810f25611dcd96 Author: eight <eight04@gmail.com> Date: Sat Oct 6 03:10:04 2018 +0800 WIP: msg.js commit 2472e91f5775f4246e9d8695a2c4c8b55cff4acc Author: eight <eight04@gmail.com> Date: Fri Oct 5 21:28:19 2018 +0800 WIP: emitChangesToTabs commit 34497ebe1669bb5811e26044dc4a544b79a497ee Author: eight <eight04@gmail.com> Date: Fri Oct 5 18:47:52 2018 +0800 WIP: switch to API commit f1639cc33ebd68d2e596963c5f8846fe478d9b27 Author: eight <eight04@gmail.com> Date: Fri Oct 5 01:03:40 2018 +0800 WIP: broadcastMessage commit 81e4823f4602226eaeb5126deca93b0618b7c153 Author: eight <eight04@gmail.com> Date: Thu Oct 4 19:39:59 2018 +0800 Debounce updateAllTabsIcon commit dc5f3e209fdc37136b947145ef0f808946de0780 Author: eight <eight04@gmail.com> Date: Thu Oct 4 19:34:36 2018 +0800 Fix: settings could be empty on the first install commit 2328cf623a06581edee5272ed0113c0a37d4f9c7 Author: eight <eight04@gmail.com> Date: Thu Oct 4 19:34:22 2018 +0800 Change: start-firefox -> start commit 7be6a1cba904252eedbfe178627ac41cca7ea785 Author: eight <eight04@gmail.com> Date: Thu Oct 4 19:24:35 2018 +0800 Add: applications commit 630725196f7fe042b954070d45733a0e0f24b3b1 Author: eight <eight04@gmail.com> Date: Thu Oct 4 19:22:44 2018 +0800 fixup! Fix: update all icons when some prefs changed commit 0d0e1b4dc07f2768ac98805a1f34b70bb18caa83 Author: eight <eight04@gmail.com> Date: Thu Oct 4 19:20:36 2018 +0800 Fix: update all icons when some prefs changed commit 5c0288e9baf6cb0ba2f0dbc535cfe41244aeeb6c Author: eight <eight04@gmail.com> Date: Thu Oct 4 19:20:11 2018 +0800 fixup! Remove unused FIREFOX_NO_DOM_STORAGE commit 56b737b65a61c38c4904a931de311d0fc8c7fd73 Author: eight <eight04@gmail.com> Date: Thu Oct 4 18:14:57 2018 +0800 Remove unused FIREFOX_NO_DOM_STORAGE commit 829a134ed101ae0e69c755862941987a2c894e6f Author: eight <eight04@gmail.com> Date: Thu Oct 4 18:10:53 2018 +0800 Fix: this -> prefs commit d35f92250e52c5347e49c2be10ac52d6379e789f Author: eight <eight04@gmail.com> Date: Thu Oct 4 18:08:19 2018 +0800 Fixme: styleViaAPI commit 8a6e8ac03a53746c838803addfcb619f67f4b832 Author: eight <eight04@gmail.com> Date: Thu Oct 4 18:05:41 2018 +0800 Change: drop prefChanged, use prefs service commit 10f9449144b87ac5733886bc03f53c7710629175 Author: eight <eight04@gmail.com> Date: Thu Oct 4 17:46:45 2018 +0800 Change: move setupLivePrefs to dom.js. Remove prefs.js dependencies commit dd2b8ed0918fcdece1a37b28d4f6351723bf83f9 Author: eight <eight04@gmail.com> Date: Thu Oct 4 17:18:38 2018 +0800 Fix: type error commit 3af310c3412d7f2f1e565d354191ea814731effa Author: eight <eight04@gmail.com> Date: Thu Oct 4 17:09:26 2018 +0800 Fix: open-manager has no default value commit 874a2da33e42f32d02f9d5e61ddbb3e6b1b0044e Author: eight <eight04@gmail.com> Date: Thu Oct 4 17:04:23 2018 +0800 Enhance: make prefs use storage.sync commit c01f93f62c0010faf9a884a3d2497ea56b002faf Author: eight <eight04@gmail.com> Date: Thu Oct 4 15:57:02 2018 +0800 WIP commit 6d32ffb76b267a939f1a0f5826d08339ff790939 Author: eight <eight04@gmail.com> Date: Thu Oct 4 12:46:19 2018 +0800 WIP commit 0f148eac32c759f4bdae3e2f69f38495f1a5a446 Author: eight <eight04@gmail.com> Date: Thu Oct 4 03:35:07 2018 +0800 WIP commit 282bdf77067a75f2959082152e913a84414a0625 Author: eight <eight04@gmail.com> Date: Wed Oct 3 20:24:06 2018 +0800 Fix: numbers are not compared correctly commit 24b1eea8a4a79b2a116658f375b60363ec429e70 Merge: 8a6011d 5cbe8a8 Author: eight <eight04@gmail.com> Date: Wed Oct 3 15:00:07 2018 +0800 Merge branch 'master' of https://github.com/openstyles/stylus into dev-exclusions commit 5cbe8a8d780a6eb9fce11d5846e92bf244c3a3f3 Author: eight <eight04@gmail.com> Date: Tue Oct 2 20:22:18 2018 +0800 Add: fetch style object from DB directly in the editor (#507) commit 9058c06c547203ab466785bc5a54ab94fc338e27 Author: eight <eight04@gmail.com> Date: Mon Oct 1 23:24:29 2018 +0800 Fix: bad API commit 1f2d116aae15b61212fa059eee356d94951ca6aa Author: eight <eight04@gmail.com> Date: Mon Oct 1 23:14:56 2018 +0800 Fix: use meta parser commit 918e47b1ed0f4ee0e4b075dd20c4b9704a2fef56 Author: eight <eight04@gmail.com> Date: Mon Oct 1 23:01:21 2018 +0800 Fix: emit update event if no fatal errors commit 81a7bb9ac925061586f458a5608400b8ad92006f Author: eight <eight04@gmail.com> Date: Mon Oct 1 22:56:25 2018 +0800 Add: editorWorker.metalint commit f47d57aea84af25f68a664e377a090eba949d472 Author: eight <eight04@gmail.com> Date: Mon Oct 1 22:49:16 2018 +0800 Change: use editorWorker.metalint commit 5778d5c8582cbb3c26e241b2ebcd3186af53dfa4 Author: eight <eight04@gmail.com> Date: Mon Oct 1 22:39:01 2018 +0800 Change: editor-worker-body -> editor-worker commit 268e1716b4bba9456d7fba7b742ce03ca1e93941 Author: eight <eight04@gmail.com> Date: Mon Oct 1 22:38:06 2018 +0800 Change: switch to worker-util commit cc2980b647547696f591cbd8731ab880275ede94 Author: eight <eight04@gmail.com> Date: Mon Oct 1 22:30:16 2018 +0800 Drop: parserlib-loader commit 08adcb60f2a4bc9b5e3f15c5ef533a3420851a5a Merge: 6909c73 2fd531e Author: eight <eight04@gmail.com> Date: Mon Oct 1 22:29:39 2018 +0800 Merge branch 'master' into dev-usercss-meta commit e4135ce35de2b264d7560b37ca2344f6f206db59 Author: eight <eight04@gmail.com> Date: Fri Sep 28 11:57:34 2018 +0800 Fix: remove unused function commit 39a6d1909f4fa7af53c7f5c00dbd5b8c2e083df9 Author: eight <eight04@gmail.com> Date: Fri Sep 28 00:26:29 2018 +0800 Fix: prefs doesn't work in FF's private windows. Add web-ext. Drop prefs.readOnlyValues commit 6909c73c698a81d4897af3a54cd73663ac012559 Author: eight <eight04@gmail.com> Date: Wed Sep 26 12:16:33 2018 +0800 Fix: minor commit 79833d8bba5994f30398d32d238fbe98854714d9 Author: eight <eight04@gmail.com> Date: Wed Sep 26 11:40:04 2018 +0800 Fix: a better way to draw list? commit a849fd6ddabf81ebde74d7c16dcd240249fbe289 Author: eight <eight04@gmail.com> Date: Wed Sep 26 11:39:53 2018 +0800 Fix: missing placeholders commit d5ee31a0801607fe548ba74a5c1f646e14f3cbb6 Author: eight <eight04@gmail.com> Date: Wed Sep 26 11:37:50 2018 +0800 Fix: a better way to draw character list? commit 7b959af3e36492c3b5ec129cade0823e2c05af4b Author: eight <eight04@gmail.com> Date: Wed Sep 26 11:30:10 2018 +0800 Update usercss-meta commit fefa987c4dfb9660d76d3ae26968209204570171 Author: eight <eight04@gmail.com> Date: Wed Sep 26 10:37:28 2018 +0800 Change: sections-equal -> sections-util commit 2abbf670d875b3249b6963115d03285aca3d44f9 Author: eight <eight04@gmail.com> Date: Wed Sep 26 10:37:14 2018 +0800 Fix: check err.code commit 1fe0586b2958b91c39cb1f486955cdcdc072ed78 Author: eight <eight04@gmail.com> Date: Wed Sep 26 10:33:02 2018 +0800 Add: i18n error message commit ab0ef239cf234fd4b6cefc2eed6e8fb442478069 Author: eight <eight04@gmail.com> Date: Wed Sep 26 09:34:57 2018 +0800 Change: move styleCodeEmpty to sections-util, load colorConverter in background worker commit d5ade807f0c7fc22ec331f9476b31efc63e90773 Author: eight <eight04@gmail.com> Date: Wed Sep 26 09:27:30 2018 +0800 Fix: display error message commit 4f5337e51dba0b0644348d67c02b9a90918b14e8 Author: eight <eight04@gmail.com> Date: Wed Sep 26 09:26:55 2018 +0800 Fix: remove unused colorconverter commit 29b8f512926b1f772fad26182748c4471cc19f7d Author: eight <eight04@gmail.com> Date: Tue Sep 25 23:21:44 2018 +0800 Fix: vars could be undefined commit a7cfeb22e45e5fb69a06d41ac133262c85ef08a5 Author: eight <eight04@gmail.com> Date: Tue Sep 25 22:54:40 2018 +0800 Fix: window is undefined commit 9713c6a3beedc1da8d0d111214e295e745d19956 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:56:38 2018 +0800 Fix: throw an error for unparsable color commit 3c30bc3eb014a9936d605425facbee4011ce4244 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:55:55 2018 +0800 Fix: try to get error message commit 3d32b0428bee83b04bc4f813e1f4a49efc2ca488 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:38:40 2018 +0800 Fix: vars might be empty commit 7d75dd87541925b738b1eb2bc5a6e1c5b38002ac Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:18:39 2018 +0800 Add: meta-parser commit a4df641b96d6d14fadeaeab3021d401c8c01d417 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:18:18 2018 +0800 Enhance: set flag in parserlib so we don't need another loader commit 8028a3529f212dd36c9cbb87967105ec25164ab9 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:17:40 2018 +0800 Include util, worker-util in background commit ba5d6cc31a7d6dbbd9e278c809ec17009c155bf8 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:16:59 2018 +0800 Fix: use spread syntax in loadScript commit b853be13f8f9eb182a127addade7570661d82171 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:14:46 2018 +0800 Enhance: swith to usercss-meta (in worker) commit a3e79151995283ba3dd68cd939e8066c5c48cbd8 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:11:54 2018 +0800 Fix: use promise API commit 5d07a8cd4e4789fb5352afe81a86081a71cb95de Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:11:09 2018 +0800 Fix: buildMeta now returns a promise commit a004bc3c7d462b6571e08ec80d72ed6aa1d8efd1 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:10:35 2018 +0800 Move styleCodeEmpty to util commit 41ac66a1378b92ca3da1d5c189f678a31438ff9c Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:09:40 2018 +0800 Add: background worker commit ffb13bf1db4b2dbd6d68183f16a9397ddd587b44 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:09:04 2018 +0800 Enhance: move moz-parser/meta-parser/usercss compiler to worker commit 42e97ef1532a4937e545ea7e0b7c5325066af62a Author: eight <eight04@gmail.com> Date: Tue Sep 25 20:45:07 2018 +0800 Fix: display error on install page commit 64aa9fcf538e31367a9443418c20aed1817b707a Author: eight <eight04@gmail.com> Date: Tue Sep 25 17:34:54 2018 +0800 Add: background worker commit b0e407e98fe4893be0b29cae21df6622c09d4e5f Author: eight <eight04@gmail.com> Date: Tue Sep 25 14:52:35 2018 +0800 Add: worker util commit 7a24547e09984327fdee20426412d0744150413a Author: eight <eight04@gmail.com> Date: Tue Sep 25 00:01:18 2018 +0800 Add: usercss-meta commit 8a6011de8cb75dc898ca765399493eeebc67fe22 Author: Rob Garrison <wowmotty@gmail.com> Date: Sun Jul 22 09:15:09 2018 -0500 Attempt to update icon count commit 4fcb1a88d7ee3fc43743eac25db363a7dcbc1ab9 Author: Rob Garrison <wowmotty@gmail.com> Date: Sun Jul 15 13:44:29 2018 -0500 Fix empty exclusion storage error commit bfe54ab4c4f167890ac4e64e2031991770ae813e Author: Rob Garrison <wowmotty@gmail.com> Date: Sun Jul 15 12:59:51 2018 -0500 Add tab communication commit 983a7bc219409c8feadf5e52cbcd8813f7b416ed Author: Rob Garrison <wowmotty@gmail.com> Date: Sun Jul 15 10:51:11 2018 -0500 Fix escaped regex example commit 3950482f3485a3c61892ccda4608fa7a2ff12421 Author: Rob Garrison <wowmotty@gmail.com> Date: Wed Apr 25 18:11:37 2018 -0500 Fix undefined error commit e94c7edb38c218d87c11f18c81e9f2446f564359 Author: Rob Garrison <wowmotty@gmail.com> Date: Wed Apr 25 17:09:45 2018 -0500 Attempt to fix popup exclusion issues commit 2b4a1a5635c8ea2f3df3981be166ba722b8bc411 Author: Rob Garrison <wowmotty@gmail.com> Date: Thu Apr 19 13:00:27 2018 -0500 Modify input method commit 9f75b69cd899f93f61dbd38a8ec9d2d094bdafd8 Author: Rob Garrison <wowmotty@gmail.com> Date: Wed Mar 7 11:54:05 2018 -0600 Include iframe urls in exclusion popup commit 68dfa0153cdaa72a522b617313bc90c32bf249b2 Author: Rob Garrison <wowmotty@gmail.com> Date: Wed Jan 24 19:42:02 2018 -0600 Add style exclusions. Closes #113 * Revert: exclusions * Fix: pass eslint * Fix: the style is injected twice * Fix: don't load script async * Fix: styleCodeEmpty returns true for empty string * Fix: drop array selection * Fix: the config dialog is broken * Fix: popup doesn't use getStyle/getStylesByUrl correctly * Fix: keep disabled state in setStyleContent * Fix: allow live-preview to assign newest vars * Fix: transition fix is broken because setStyleContent becomes async * Fix: typo, TypeError in styleExists * Fix: use new API * Fix: pass linter * Fix: LICENCE -> LICENSE * Fix: remove unused distroy function
2018-11-07 06:09:29 +00:00
configDialog
debounce
filterAndAppend
getOwnTab
getStyleWithNoCode
handleUpdateInstalled
messageBox
msg
objectDiff
openURL
prefs
router
scrollElementIntoView
sessionStore
setupLivePrefs
showFiltersStats
sorter
t
VIVALDI
2018-01-01 17:02:49 +00:00
*/
'use strict';
2015-01-30 17:31:20 +00:00
/** @type {HTMLElement} */
let installed;
const ENTRY_ID_PREFIX_RAW = 'style-';
const ENTRY_ID_PREFIX = '#' + ENTRY_ID_PREFIX_RAW;
const REVEAL_DATES_FOR = 'h2.style-name, [data-type=age]';
const BULK_THROTTLE_MS = 100;
2020-10-15 10:55:27 +00:00
const bulkChangeQueue = [];
bulkChangeQueue.time = 0;
// define pref-mapped ids separately
const newUI = {
enabled: null, // the global option should come first
favicons: null,
faviconsGray: null,
targets: null,
};
// ...add utility functions
Object.assign(newUI, {
ids: Object.keys(newUI),
prefGroup: 'manage.newUI',
prefKeyForId: id => id === 'enabled' ? newUI.prefGroup : `${newUI.prefGroup}.${id}`,
renderClass: () => document.documentElement.classList.toggle('newUI', newUI.enabled),
});
// ...read the actual values
for (const id of newUI.ids) {
newUI[id] = prefs.get(newUI.prefKeyForId(id));
}
newUI.renderClass();
const TARGET_TYPES = ['domains', 'urls', 'urlPrefixes', 'regexps'];
const GET_FAVICON_URL = 'https://www.google.com/s2/favicons?domain=';
const OWN_ICON = chrome.runtime.getManifest().icons['16'];
const AGES = [
[24, 'h', t('dateAbbrHour', '\x01')],
[30, 'd', t('dateAbbrDay', '\x01')],
[12, 'm', t('dateAbbrMonth', '\x01')],
[Infinity, 'y', t('dateAbbrYear', '\x01')],
];
const handleEvent = {};
(async () => {
const query = router.getSearch('search');
const [styles, ids, el] = await Promise.all([
API.getAllStyles(),
query && API.searchDB({query, mode: router.getSearch('searchMode')}),
waitForSelector('#installed'), // needed to avoid flicker due to an extra frame and layout shift
prefs.initializing,
]);
2020-10-15 10:55:27 +00:00
installed = el;
installed.onclick = handleEvent.entryClicked;
$('#manage-options-button').onclick = () => router.updateHash('#stylus-options');
$('#sync-styles').onclick = () => router.updateHash('#stylus-options');
$$('#header a[href^="http"]').forEach(a => (a.onclick = handleEvent.external));
2017-12-23 00:11:46 +00:00
// show date installed & last update on hover
installed.addEventListener('mouseover', handleEvent.lazyAddEntryTitle, {passive: true});
installed.addEventListener('mouseout', handleEvent.lazyAddEntryTitle, {passive: true});
document.addEventListener('visibilitychange', onVisibilityChange);
// N.B. triggers existing onchange listeners
setupLivePrefs();
2017-12-23 00:11:46 +00:00
sorter.init();
prefs.subscribe(newUI.ids.map(newUI.prefKeyForId), () => switchUI());
switchUI({styleOnly: true});
// translate CSS manually
document.styleSheets[0].insertRule(
`:root {${[
'updateAllCheckSucceededSomeEdited',
'filteredStylesAllHidden',
].map(id => `--${id}:"${CSS.escape(t(id))}";`).join('')
}}`);
2020-10-15 10:55:27 +00:00
if (!VIVALDI) {
$$('.filter-selection select').forEach(el => el.adjustWidth());
2020-10-15 10:55:27 +00:00
}
if (CHROME >= 80 && CHROME <= 88) {
// Wrong checkboxes are randomly checked after going back in history, https://crbug.com/1138598
addEventListener('pagehide', () => {
$$('input[type=checkbox]').forEach((el, i) => (el.name = `bug${i}`));
});
}
showStyles(styles, ids);
})();
2020-10-15 10:55:27 +00:00
msg.onExtension(onRuntimeMessage);
router.watch({hash: '#stylus-options'}, state => (state ? embedOptions : unembedOptions)());
window.addEventListener('closeOptions', () => router.updateHash(''));
2020-10-15 10:55:27 +00:00
function onRuntimeMessage(msg) {
switch (msg.method) {
case 'styleUpdated':
case 'styleAdded':
case 'styleDeleted':
bulkChangeQueue.push(msg);
if (performance.now() - bulkChangeQueue.time < BULK_THROTTLE_MS) {
debounce(handleBulkChange, BULK_THROTTLE_MS);
} else {
handleBulkChange();
}
break;
case 'styleApply':
case 'styleReplaceAll':
break;
default:
return;
}
setTimeout(sorter.updateStripes, 0, {onlyWhenColumnsChanged: true});
2015-01-30 17:31:20 +00:00
}
2018-01-01 17:02:49 +00:00
function showStyles(styles = [], matchUrlIds) {
2017-12-23 00:11:46 +00:00
const sorted = sorter.sort({
styles: styles.map(style => {
const name = style.customName || style.name || '';
return {
style,
// sort case-insensitively the whole list then sort dupes like `Foo` and `foo` case-sensitively
name: name.toLocaleLowerCase() + '\n' + name,
};
}),
2017-12-23 00:11:46 +00:00
});
let index = 0;
let firstRun = true;
2017-12-23 00:11:46 +00:00
installed.dataset.total = styles.length;
const scrollY = (history.state || {}).scrollY;
const shouldRenderAll = scrollY > window.innerHeight || sessionStore.justEditedStyleId;
const renderBin = document.createDocumentFragment();
if (scrollY) {
renderStyles();
} else {
requestAnimationFrame(renderStyles);
}
function renderStyles() {
const t0 = performance.now();
while (index < sorted.length && (shouldRenderAll || performance.now() - t0 < 20)) {
2018-01-01 17:02:49 +00:00
const info = sorted[index++];
const entry = createStyleElement(info);
if (matchUrlIds && !matchUrlIds.includes(info.style.id)) {
entry.classList.add('not-matching');
}
renderBin.appendChild(entry);
}
filterAndAppend({container: renderBin}).then(sorter.updateStripes);
if (index < sorted.length) {
requestAnimationFrame(renderStyles);
if (firstRun) setTimeout(getFaviconImgSrc);
firstRun = false;
return;
}
setTimeout(getFaviconImgSrc);
if (sessionStore.justEditedStyleId) {
highlightEditedStyle();
} else if ('scrollY' in (history.state || {})) {
setTimeout(window.scrollTo, 0, 0, history.state.scrollY);
}
}
2015-01-30 17:31:20 +00:00
}
function createStyleElement({style, name: nameLC}) {
// query the sub-elements just once, then reuse the references
if ((createStyleElement.parts || {}).newUI !== newUI.enabled) {
const entry = t.template[newUI.enabled ? 'styleNewUI' : 'style'];
createStyleElement.parts = {
newUI: newUI.enabled,
entry,
entryClassBase: entry.className,
checker: $('.checker', entry) || {},
nameLink: $('.style-name-link', entry),
editLink: $('.style-edit-link', entry) || {},
editHrefBase: 'edit.html?id=',
homepage: $('.homepage', entry),
homepageIcon: t.template[`homepageIcon${newUI.enabled ? 'Small' : 'Big'}`],
infoAge: $('[data-type=age]', entry),
infoVer: $('[data-type=version]', entry),
appliesTo: $('.applies-to', entry),
targets: $('.targets', entry),
expander: $('.expander', entry),
decorations: {
urlPrefixesAfter: '*',
regexpsBefore: '/',
regexpsAfter: '/',
},
2018-01-04 19:35:12 +00:00
oldConfigure: !newUI.enabled && $('.configure-usercss', entry),
oldCheckUpdate: !newUI.enabled && $('.check-update', entry),
oldUpdate: !newUI.enabled && $('.update', entry),
};
}
const parts = createStyleElement.parts;
const ud = style.usercssData;
const configurable = ud && ud.vars && Object.keys(ud.vars).length > 0;
const name = style.customName || style.name;
parts.checker.checked = style.enabled;
parts.nameLink.firstChild.textContent = t.breakWord(name);
parts.nameLink.href = parts.editLink.href = parts.editHrefBase + style.id;
parts.homepage.href = parts.homepage.title = style.url || '';
parts.infoVer.textContent = ud ? ud.version : '';
parts.infoVer.dataset.value = ud ? ud.version : '';
if (newUI.enabled) {
createAgeText(parts.infoAge, style);
} else {
2018-01-04 19:35:12 +00:00
parts.oldConfigure.classList.toggle('hidden', !configurable);
parts.oldCheckUpdate.classList.toggle('hidden', !style.updateUrl);
parts.oldUpdate.classList.toggle('hidden', !style.updateUrl);
}
// clear the code to free up some memory
// (note, style is already a deep copy)
style.sourceCode = null;
style.sections.forEach(section => (section.code = null));
const entry = parts.entry.cloneNode(true);
entry.id = ENTRY_ID_PREFIX_RAW + style.id;
entry.styleId = style.id;
entry.styleNameLowerCase = nameLC || name.toLocaleLowerCase() + '\n' + name;
entry.styleMeta = style;
entry.className = parts.entryClassBase + ' ' +
(style.enabled ? 'enabled' : 'disabled') +
(style.updateUrl ? ' updatable' : '') +
(ud ? ' usercss' : '');
2017-09-01 10:24:32 +00:00
if (style.url) {
$('.homepage', entry).appendChild(parts.homepageIcon.cloneNode(true));
}
if (style.updateUrl && newUI.enabled) {
$('.actions', entry).appendChild(t.template.updaterIcons.cloneNode(true));
}
2018-01-04 19:35:12 +00:00
if (configurable && newUI.enabled) {
$('.actions', entry).appendChild(t.template.configureIcon.cloneNode(true));
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-05 16:49:25 +00:00
}
createStyleTargetsElement({entry, style});
return entry;
}
function createStyleTargetsElement({entry, expanded, style = entry.styleMeta}) {
const parts = createStyleElement.parts;
const entryTargets = $('.targets', entry);
const expanderCls = $('.applies-to', entry).classList;
const targets = parts.targets.cloneNode(true);
let container = targets;
let el = entryTargets.firstElementChild;
let numTargets = 0;
let allTargetsRendered = true;
const maxTargets = expanded ? 1000 : newUI.enabled ? newUI.targets : 10;
const displayed = new Set();
for (const type of TARGET_TYPES) {
for (const section of style.sections) {
for (const targetValue of section[type] || []) {
if (displayed.has(targetValue)) {
continue;
}
if (++numTargets > maxTargets) {
allTargetsRendered = expanded;
break;
}
displayed.add(targetValue);
const text =
(parts.decorations[type + 'Before'] || '') +
targetValue +
(parts.decorations[type + 'After'] || '');
if (el && el.dataset.type === type && el.lastChild.textContent === text) {
const next = el.nextElementSibling;
container.appendChild(el);
el = next;
continue;
}
const element = t.template.appliesToTarget.cloneNode(true);
if (!newUI.enabled) {
if (numTargets === maxTargets) {
container = container.appendChild(t.template.extraAppliesTo.cloneNode(true));
} else if (numTargets > 1) {
container.appendChild(t.template.appliesToSeparator.cloneNode(true));
}
}
element.dataset.type = type;
element.appendChild(document.createTextNode(text));
container.appendChild(element);
}
}
}
if (newUI.enabled && numTargets > newUI.targets) {
expanderCls.add('has-more');
}
if (numTargets) {
entryTargets.parentElement.replaceChild(targets, entryTargets);
} else if (!entry.classList.contains('global') ||
!entryTargets.firstElementChild) {
if (entryTargets.firstElementChild) {
entryTargets.textContent = '';
}
entryTargets.appendChild(t.template.appliesToEverything.cloneNode(true));
}
entry.classList.toggle('global', !numTargets);
entry._allTargetsRendered = allTargetsRendered;
entry._numTargets = numTargets;
2015-01-30 17:31:20 +00:00
}
function createAgeText(el, style) {
let val = style.updateDate || style.installDate;
if (val) {
val = (Date.now() - val) / 3600e3; // age in hours
for (const [max, unit, text] of AGES) {
const rounded = Math.round(val);
if (rounded < max) {
el.textContent = text.replace('\x01', rounded);
el.dataset.value = padLeft(Math.round(rounded), 2) + unit;
break;
}
val /= max;
}
} else if (el.firstChild) {
el.textContent = '';
delete el.dataset.value;
}
}
/** Adding spaces so CSS can detect "bigness" of a value via amount of spaces at the beginning */
function padLeft(val, width) {
val = `${val}`;
return ' '.repeat(Math.max(0, width - val.length)) + val;
}
2018-01-11 21:53:22 +00:00
function getFaviconImgSrc(container = installed) {
if (!newUI.enabled || !newUI.favicons) return;
const regexpRemoveNegativeLookAhead = /(\?!([^)]+\))|\(\?![\w(]+[^)]+[\w|)]+)/g;
// replace extra characters & all but the first group entry "(abc|def|ghi)xyz" => abcxyz
const regexpReplaceExtraCharacters = /[\\(]|((\|\w+)+\))/g;
2018-07-28 18:05:20 +00:00
const regexpMatchRegExp = /[\w-]+[.(]+(com|org|co|net|im|io|edu|gov|biz|info|de|cn|uk|nl|eu|ru)\b/g;
const regexpMatchDomain = /^.*?:\/\/([^/]+)/;
2018-07-28 18:05:20 +00:00
for (const target of $$('.target', container)) {
const type = target.dataset.type;
const targetValue = target.textContent;
2018-07-28 18:04:29 +00:00
if (!targetValue) continue;
let favicon = '';
if (type === 'domains') {
favicon = GET_FAVICON_URL + targetValue;
} else if (targetValue.includes('chrome-extension:') || targetValue.includes('moz-extension:')) {
favicon = OWN_ICON;
} else if (type === 'regexps') {
favicon = targetValue
.replace(regexpRemoveNegativeLookAhead, '')
.replace(regexpReplaceExtraCharacters, '')
.match(regexpMatchRegExp);
favicon = favicon ? GET_FAVICON_URL + favicon.shift() : '';
} else {
favicon = targetValue.includes('://') && targetValue.match(regexpMatchDomain);
favicon = favicon ? GET_FAVICON_URL + favicon[1] : '';
}
if (favicon) {
const img = target.children[0];
if (!img || img.localName !== 'img') {
target.insertAdjacentElement('afterbegin', document.createElement('img'))
.dataset.src = favicon;
} else if ((img.dataset.src || img.src) !== favicon) {
img.src = '';
img.dataset.src = favicon;
}
}
}
handleEvent.loadFavicons();
}
Object.assign(handleEvent, {
ENTRY_ROUTES: {
'.checker, .enable, .disable': 'toggle',
'.style-name': 'name',
'.homepage': 'external',
'.check-update': 'check',
'.update': 'update',
'.delete': 'delete',
'.applies-to .expander': 'expandTargets',
'.configure-usercss': 'config',
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-05 16:49:25 +00:00
},
entryClicked(event) {
const target = event.target;
const entry = target.closest('.entry');
for (const selector in handleEvent.ENTRY_ROUTES) {
2017-07-16 18:02:00 +00:00
for (let el = target; el && el !== entry; el = el.parentElement) {
if (el.matches(selector)) {
const handler = handleEvent.ENTRY_ROUTES[selector];
return handleEvent[handler].call(el, event, entry);
}
}
}
},
name(event, entry) {
if (newUI.enabled) handleEvent.edit(event, entry);
},
async edit(event, entry) {
if (event.altKey) {
return;
}
event.preventDefault();
event.stopPropagation();
const key = `${event.shiftKey ? 's' : ''}${event.ctrlKey ? 'c' : ''}${'LMR'[event.button]}`;
const url = $('[href]', entry).href;
const ownTab = await getOwnTab();
if (key === 'L') {
sessionStore['manageStylesHistory' + ownTab.id] = url;
location.href = url;
} else if (chrome.windows && key === 'sL') {
API.openEditor({id: entry.styleId});
} else {
openURL({
url,
index: ownTab.index + 1,
active: key === 'sM' || key === 'scL',
});
}
},
toggle(event, entry) {
Refactor the entire storage system and the section editor (#518) * Squashed commit of the following: commit d84c4dc3fe29a87d0c49a109762d8dd5b3e39aa8 Author: eight <eight04@gmail.com> Date: Sun Oct 14 19:13:29 2018 +0800 Fix: remove unused comment commit 46027120ec4a3785f1674933a165fa0c226bc38d Author: eight <eight04@gmail.com> Date: Sun Oct 14 19:09:06 2018 +0800 Add: handle styleUpdated message commit f85d4de39b3ee2636c44ca46b3ee92045e43696a Author: eight <eight04@gmail.com> Date: Sun Oct 14 18:59:29 2018 +0800 Fix: handle styleAdded message in popup commit 81f3e69574bee2eeffd9d0a5bbb0811f49436520 Author: eight <eight04@gmail.com> Date: Sun Oct 14 18:50:54 2018 +0800 Change: getStylesInfoByUrl -> getStylesByUrl commit f9dc04558f7dd3c077259bbe762569940b035403 Author: eight <eight04@gmail.com> Date: Sun Oct 14 18:48:20 2018 +0800 Fix: drop getStylesInfo commit fea04d591fb79633112bfc605e552495b4cc41ef Author: eight <eight04@gmail.com> Date: Sun Oct 14 18:39:28 2018 +0800 Fix: remove unused ignoreChromeError commit 2aff14e2133fece25b136226961bd97d2d3e1ca2 Author: eight <eight04@gmail.com> Date: Sun Oct 14 18:09:53 2018 +0800 Fix: don't dup promisify in prefs commit d4ddfcc7137e3f14d4dcd72ea8353e0b6fdd8fb0 Author: eight <eight04@gmail.com> Date: Sun Oct 14 17:56:16 2018 +0800 Change: drop .last and .rotate commit 85e70491e413aca8fc8599e88f2e09ea5dde281d Author: eight <eight04@gmail.com> Date: Sun Oct 14 17:36:00 2018 +0800 Fix: unused renderIndex commit 7acb131642648767ea162ffd689ad4ca55d8724e Author: eight <eight04@gmail.com> Date: Sun Oct 14 17:32:49 2018 +0800 Fix: update title on input commit a39405ac4c32d5d38f4b70abd2ea54929d51eae2 Author: eight <eight04@gmail.com> Date: Sun Oct 14 17:17:20 2018 +0800 Fix: remove unused messages commit 14c2fdbb5886ee96f14367e660736e2a8ed3edb9 Author: eight <eight04@gmail.com> Date: Sun Oct 14 16:36:12 2018 +0800 Fix: dirty state for new added applies commit fb1b49b8bb7c0b4cd089d9a3b22dd744dea35f05 Author: eight <eight04@gmail.com> Date: Sun Oct 14 16:27:17 2018 +0800 Fix: minor commit 2c2d849fa46d3bdb83a191564b399dfb963083f1 Author: eight <eight04@gmail.com> Date: Sun Oct 14 16:20:14 2018 +0800 Fix: drop unused getCode commit f133c3e67a9ff969677f73b72267c34968c74190 Author: eight <eight04@gmail.com> Date: Sun Oct 14 16:18:14 2018 +0800 Fix: drop unused lastActive commit 05a6208f5c66e82827d692906d5a3f49dae66471 Author: eight <eight04@gmail.com> Date: Sun Oct 14 16:17:45 2018 +0800 Fix: minor commit 05a87ed00f650f4e92a31a655f471c7f3580ad71 Author: eight <eight04@gmail.com> Date: Sun Oct 14 15:58:33 2018 +0800 Fix: minor commit 576f73f3336e5f68aab2adad3ad79c7920f4ae8c Author: eight <eight04@gmail.com> Date: Sun Oct 14 03:03:35 2018 +0800 Fix: always register listeners commit e93819deb4515f9f2d9116cfea6b21aa05c8dd72 Author: eight <eight04@gmail.com> Date: Sun Oct 14 02:58:49 2018 +0800 Fix: unused statement commit 39b11685b494bd90c6cfd64ff85d9a4c6d9f5bef Author: eight <eight04@gmail.com> Date: Sun Oct 14 02:54:29 2018 +0800 Fix: minor commit 9dd3cd43c166e9e98389f06db25775e2c7355cfe Author: eight <eight04@gmail.com> Date: Sun Oct 14 02:49:22 2018 +0800 Fix: don't reorder options commit 90aadfd7283ed86ac359fbd4b300d548db8b298e Author: eight <eight04@gmail.com> Date: Sun Oct 14 02:43:52 2018 +0800 Fix: drop __ERROR__ commit 838c21e3b335ce0944321d16bf3617b983e1b156 Author: eight <eight04@gmail.com> Date: Sun Oct 14 02:36:20 2018 +0800 Fix: use findStyle API commit 93a4cdf595785690a830759a1b06138dec08d73a Author: eight <eight04@gmail.com> Date: Sun Oct 14 02:34:05 2018 +0800 Add: findStyle API commit 8e75871b9bf1b6c360e6f1dece9262d4510e6cb8 Author: eight <eight04@gmail.com> Date: Sun Oct 14 02:19:01 2018 +0800 Breaking: drop getStylesFallback commit ad06551440290ae43e86eca7ed78b824431daf1d Author: eight <eight04@gmail.com> Date: Sun Oct 14 02:16:48 2018 +0800 Fix: use dataurl to inject page script commit cb5cbb4d10c85624f03c0d6d3bd8f35c55318722 Author: eight <eight04@gmail.com> Date: Sun Oct 14 01:39:50 2018 +0800 Fix: various commit 53efd78b894bf73babae28f8ef9595dac4b79f7a Author: eight <eight04@gmail.com> Date: Sun Oct 14 01:12:57 2018 +0800 Update doc commit 7d005f3eaa35ea5328ecf608429de85b77dab34d Author: eight <eight04@gmail.com> Date: Sun Oct 14 01:09:22 2018 +0800 Change: kill style.reason commit fc53bed3de2ff3704609a40d8e736de7b8de6d18 Author: eight <eight04@gmail.com> Date: Sun Oct 14 00:56:04 2018 +0800 Fix: doo many indents commit 14e321d2582cef0c3e97e2723bc60ecc1d682ba8 Author: eight <eight04@gmail.com> Date: Sun Oct 14 00:40:23 2018 +0800 Fix: don't update icon for popup and options commit 01bdd529bc51b8dd780fcb500a4898115bc92b1d Author: eight <eight04@gmail.com> Date: Sun Oct 14 00:39:17 2018 +0800 Fix: updateCount commit b9968830d3f866688eaff4824d0ce47647265de0 Author: eight <eight04@gmail.com> Date: Sun Oct 14 00:38:49 2018 +0800 Fix: don't send null value commit ff3bf6f52d89f3b2e6f74b37b4a47dff5fd6cdfc Author: eight <eight04@gmail.com> Date: Sun Oct 14 00:03:34 2018 +0800 Add: styleViaAPI updateCount commit 39d21c3d29ad3507281e258d4539dfe4ef4ba124 Author: eight <eight04@gmail.com> Date: Sat Oct 13 23:57:45 2018 +0800 Fix: broadcastError -> ignoreError commit ecb622c93cf11fbfc47b8381a1c869ca9151582e Author: eight <eight04@gmail.com> Date: Sat Oct 13 21:29:06 2018 +0800 Fix: implement styleViaAPI commit 7c3d49c0051dc1d5a7be71acd9f08f8b3b09b901 Author: eight <eight04@gmail.com> Date: Sat Oct 13 17:50:28 2018 +0800 Fix: ROOT may change in XML pages commit 3fd8d937f31d643a5976406bc17e47d137ada890 Author: eight <eight04@gmail.com> Date: Sat Oct 13 16:49:43 2018 +0800 Fix: various commit 859afc8ee9c2d964e1cb9c9dbac7c1613cefef64 Author: eight <eight04@gmail.com> Date: Sat Oct 13 16:39:54 2018 +0800 Enhance: don't cache enabled state commit fbe77a8d15330cfd0d340c13eaf77a4c48d3c49f Author: eight <eight04@gmail.com> Date: Sat Oct 13 16:15:07 2018 +0800 Fix: various commit a4fc3e91622e7b9537a661490af92c6f6ee06398 Author: eight <eight04@gmail.com> Date: Sat Oct 13 16:11:38 2018 +0800 Fix: various commit 7e0eddeb8f03c42fb93db9bef633944dd1c82e57 Author: eight <eight04@gmail.com> Date: Sat Oct 13 15:58:31 2018 +0800 Fix: various commit 8b4ab47d897f5baee15f584a0dd289d38e5dc218 Author: eight <eight04@gmail.com> Date: Sat Oct 13 15:20:10 2018 +0800 Add: some type hint commit 7d340d62dcb7a25a1ccdc6648ab0683afbda917d Author: eight <eight04@gmail.com> Date: Sat Oct 13 15:13:11 2018 +0800 Change: drop storage.js, some functions are moved to sections-util commit d286997d6a64cd8601ed96e204514a5d532d5afd Author: eight <eight04@gmail.com> Date: Sat Oct 13 15:12:00 2018 +0800 Fix: minor commit d60db9dbef06baf4430aaea627406dc36b06debb Author: eight <eight04@gmail.com> Date: Sat Oct 13 15:03:10 2018 +0800 Fix: minor commit 43afa31fa0c47967ae695c9eb2492e5ddc33f85b Author: eight <eight04@gmail.com> Date: Sat Oct 13 14:50:31 2018 +0800 Fix: update tab icon on forward/backward commit f08faea149de3d63e1bcb404cb3e6cfa655dc24b Author: eight <eight04@gmail.com> Date: Sat Oct 13 13:50:03 2018 +0800 Fix: parallel import commit 4d064354869360b2bc011803bd229ec1e640a760 Author: eight <eight04@gmail.com> Date: Fri Oct 12 23:32:03 2018 +0800 Add: importStyle API commit c55675912e276139735037fc1968866eecd94a3f Author: eight <eight04@gmail.com> Date: Fri Oct 12 23:14:46 2018 +0800 Fix: refactor import-export commit 86ea846a89549b683711202799a53536e6e9dec2 Author: eight <eight04@gmail.com> Date: Fri Oct 12 17:34:36 2018 +0800 Fix: search db is broken commit 831ca07c2d770271bc069d599eaee47d9705cffe Author: eight <eight04@gmail.com> Date: Fri Oct 12 17:29:35 2018 +0800 fixup! Add: implement sloppy regexp indicator commit e67b7f4f36856ba26e08e37f91d9631aa77ec469 Author: eight <eight04@gmail.com> Date: Fri Oct 12 17:27:19 2018 +0800 Add: implement sloppy regexp indicator commit 36e13f88f00a3b01074ad4f41a1d1e056ee9c561 Author: eight <eight04@gmail.com> Date: Fri Oct 12 16:59:23 2018 +0800 Add: return excluded/sloppy state in getStylesInfoByUrl commit f6ce78f55b3012923e5a2f4315c642b5f9ab9f57 Author: eight <eight04@gmail.com> Date: Fri Oct 12 16:39:47 2018 +0800 Fix: dead object commit 5ae95a1ad95c95bb95073bc259d12f1329dc9c31 Author: eight <eight04@gmail.com> Date: Fri Oct 12 16:27:54 2018 +0800 Fix: don't reinit all editors on save commit 1a5a206fe62270c70239e5dce692f6f49578589c Author: eight <eight04@gmail.com> Date: Fri Oct 12 16:18:40 2018 +0800 Refactor: pull out sections editor section commit 8016346035b109214e974935d74831ca9cd4ff7d Author: eight <eight04@gmail.com> Date: Fri Oct 12 15:30:35 2018 +0800 Fix: replaceStyle make style name undefined commit fa080d191311a02f8b080e4e7cf28e2305c4c540 Author: eight <eight04@gmail.com> Date: Fri Oct 12 15:21:36 2018 +0800 Fix: catch csp error commit e0b064115dd26daf1e728e790761983b59db10fc Author: eight <eight04@gmail.com> Date: Fri Oct 12 15:03:00 2018 +0800 Fix: use a simple eval to execute page scripts commit 405b7f8f06968b1f588a6bdb45dfbaeb0b07305b Author: eight <eight04@gmail.com> Date: Fri Oct 12 03:48:13 2018 +0800 Fix: removed unused API commit 1b2c88f92635f8039dd7cc99fcae13ed0e4f8f4f Author: eight <eight04@gmail.com> Date: Fri Oct 12 03:46:51 2018 +0800 Fix: no need to access db commit a8131fc9c522577d0721798cd0f69c26d68165d3 Author: eight <eight04@gmail.com> Date: Fri Oct 12 03:43:31 2018 +0800 Fix: remove unused methods commit 3ae0c4dd134955055c12e18163c2e8b77999cfd8 Author: eight <eight04@gmail.com> Date: Fri Oct 12 03:10:26 2018 +0800 Enhance: allow matcher to return verbose info commit 0ea7ada48febd59a207f0eee24fbcbb03ae943b6 Author: eight <eight04@gmail.com> Date: Fri Oct 12 02:02:14 2018 +0800 Fix: content script may load before the background is ready commit 04c2d6bbf6d52b78b0fab046ddbacf9cb73ca248 Author: eight <eight04@gmail.com> Date: Fri Oct 12 01:49:52 2018 +0800 Fix: throw receiving end doesn't exist message commit f0c0bc4d6a5a720abfdc91fc92ef5973783c600f Author: eight <eight04@gmail.com> Date: Fri Oct 12 01:11:17 2018 +0800 Fix: unwrap error commit 4d42765d6ca989e04a39696c066e6e12b8f1197d Author: eight <eight04@gmail.com> Date: Thu Oct 11 23:55:16 2018 +0800 fixup! Fix: match subdomain commit 99626e4a48a008e0ddb6f90144965e88a65d2a79 Author: eight <eight04@gmail.com> Date: Thu Oct 11 23:54:58 2018 +0800 Fix: match subdomain commit a57b3b27160cb11b01db2c54e052cbabf6a7ab49 Author: eight <eight04@gmail.com> Date: Thu Oct 11 23:39:11 2018 +0800 Fix: firefox commit 5cfea3933f920822b638683ea234d4aa6866e2f4 Author: eight <eight04@gmail.com> Date: Thu Oct 11 22:46:34 2018 +0800 Add some comment to db.js commit 25fd3a1c2b52ace576a3e0ccfed39ff0393f5141 Author: eight <eight04@gmail.com> Date: Thu Oct 11 22:14:56 2018 +0800 Fix: remove unused prop commit bdae1c3697c698a84417886b0bfaaa54c975f5d4 Author: eight <eight04@gmail.com> Date: Thu Oct 11 20:00:25 2018 +0800 Change: simpler styleCodeEmpty commit bd4a453f458c7c5a782b53145a899e899beb1ae3 Merge: c1bf9f5 9058c06 Author: eight <eight04@gmail.com> Date: Thu Oct 11 19:49:37 2018 +0800 Merge branch 'dev-usercss-meta' into dev-exclusions commit c1bf9f57e908c33ab71ecef44d40c9c7471c036f Author: eight <eight04@gmail.com> Date: Thu Oct 11 19:29:17 2018 +0800 Fix: minor commit fd5eeb4b812b48fb19859d391bfc9658f265113a Author: eight <eight04@gmail.com> Date: Thu Oct 11 19:00:05 2018 +0800 Add: refresh on view commit 3e38810a495b6ba0e10f686f7691fd6dc94be3be Author: eight <eight04@gmail.com> Date: Thu Oct 11 18:13:24 2018 +0800 Fix: make sure icons are refreshed at startup commit c657d7e55c6b48fb5d8649f2488eeef04a936d40 Author: eight <eight04@gmail.com> Date: Thu Oct 11 17:32:27 2018 +0800 Add: implement bug 461 commit 7ed39ab6ef76efd412af42387aec4c24287f3dc7 Author: eight <eight04@gmail.com> Date: Thu Oct 11 15:42:44 2018 +0800 fixup! Add: icon-util commit 30e494eda9ba8167d9528c6d3e24b8446a12e4b8 Author: eight <eight04@gmail.com> Date: Thu Oct 11 15:42:23 2018 +0800 Add: icon-util commit 510a886e1445bcd5b2d72c01438a14a31cb230bd Author: eight <eight04@gmail.com> Date: Thu Oct 11 03:21:38 2018 +0800 Fix: exposeIframes commit c7f81662c43d2aaae0105a754236b96b1225d2ec Author: eight <eight04@gmail.com> Date: Thu Oct 11 02:19:14 2018 +0800 Fix: autoCloseBrackets is true by default commit f3a103645d777f0d8c191a8a74893b3548ecbb00 Author: eight <eight04@gmail.com> Date: Thu Oct 11 02:11:14 2018 +0800 Fix: various commit d4436cde2014fc3a63512da74866aaeb99f7c782 Author: eight <eight04@gmail.com> Date: Thu Oct 11 01:39:10 2018 +0800 Add: implement exposeIframe commit 43db875fd80ec851f1d72ad5589e39126a8d6391 Author: eight <eight04@gmail.com> Date: Thu Oct 11 01:26:24 2018 +0800 Kill more globals commit dc491e9be3ecdf8da516e6653df0030cab104fb9 Author: eight <eight04@gmail.com> Date: Thu Oct 11 01:22:13 2018 +0800 Kill old storage, storage-dummy commit ba64b95575349fdbba2b4592f81c709df1ed0262 Author: eight <eight04@gmail.com> Date: Thu Oct 11 00:54:38 2018 +0800 WIP: kill cachedStyles commit 7eba890a213f204da8f79afaccd07f37d2078096 Merge: d2b36a1 81e4823 Author: eight <eight04@gmail.com> Date: Wed Oct 10 23:15:14 2018 +0800 Merge branch 'dev-private-prefs' into dev-exclusions commit d2b36a168e967dcf48a11574af67bff997df9b6b Author: eight <eight04@gmail.com> Date: Wed Oct 10 23:05:20 2018 +0800 Kill hidden globals commit 22d4767511fb63e77f8f46e9361a998b7803b7fd Author: eight <eight04@gmail.com> Date: Wed Oct 10 19:23:34 2018 +0800 Fix: margin for deleted sections commit 00687983f0a6f277f2bcb2f60ea35575aaa3f734 Author: eight <eight04@gmail.com> Date: Wed Oct 10 18:21:07 2018 +0800 Fix: default value commit ff6fd8cad3dced164673e335ca1b5a6a9e477b94 Author: eight <eight04@gmail.com> Date: Wed Oct 10 18:02:51 2018 +0800 Fix: default options commit c23f315c52f658b7bf33f7a748f6287a710bd64b Author: eight <eight04@gmail.com> Date: Wed Oct 10 17:40:07 2018 +0800 Refactor: use CodeMirror.defineOption commit 4419c5dc1e584f420a3acd204b85fd0661442b27 Author: eight <eight04@gmail.com> Date: Wed Oct 10 16:32:39 2018 +0800 Change: kill editors, styleId commit 6494985b50c36add1569b71020285eb4eeb1a943 Author: eight <eight04@gmail.com> Date: Wed Oct 10 16:14:51 2018 +0800 Fix: various commit 37e1f43f75fe252c32b18fa91e83790860267f10 Author: eight <eight04@gmail.com> Date: Wed Oct 10 15:04:03 2018 +0800 Fix: minor commit d26ce3238e9beea602b4b47c4fd0184107712ce6 Author: eight <eight04@gmail.com> Date: Wed Oct 10 14:49:37 2018 +0800 Add: codemirror-factory commit 15a1f552f6f23ffedb7d22bed6ab306d4cc8ab27 Author: eight <eight04@gmail.com> Date: Wed Oct 10 12:08:35 2018 +0800 WIP: kill getSection commit ba6159e0677ca9da393cda68f6a72d00ab723a3b Author: eight <eight04@gmail.com> Date: Wed Oct 10 02:43:09 2018 +0800 WIP: edit page commit fd9ab5d6e50ef85cc6525c84aba4d5bb50b13f02 Author: eight <eight04@gmail.com> Date: Wed Oct 10 00:41:07 2018 +0800 Fix: switch to editor commit 06e22d0d186cc52dd7260173083406a6895a07c6 Author: eight <eight04@gmail.com> Date: Tue Oct 9 23:38:29 2018 +0800 Change: add sections-editor commit 30e86629468ecd02724c6aae076605b36495b33c Author: eight <eight04@gmail.com> Date: Mon Oct 8 20:12:39 2018 +0800 Add: preview error commit 47b2b4fc49dd0d6296ac4159410e84e19acfc226 Author: eight <eight04@gmail.com> Date: Mon Oct 8 18:38:01 2018 +0800 Add: livePreview.show commit 7b5e7c96d59df10531bbf81fe3bb682f9593aabf Author: eight <eight04@gmail.com> Date: Mon Oct 8 18:16:45 2018 +0800 Hook up live preview commit 15efafff3c55fbd5e08693849b370a1f8fa1ac38 Author: eight <eight04@gmail.com> Date: Mon Oct 8 17:49:57 2018 +0800 Add: live preview commit a38558ef786fccb7cbf46327be3036b608e286b1 Author: eight <eight04@gmail.com> Date: Mon Oct 8 15:30:39 2018 +0800 WIP: make notifyAllTabs a noop commit 582e9078af834a719b1ce04db09c63741b446380 Author: eight <eight04@gmail.com> Date: Mon Oct 8 14:39:08 2018 +0800 Fix: inject all scripts commit f4651da8d8fbf972d1124f695116c07e25cbd0b5 Author: eight <eight04@gmail.com> Date: Sun Oct 7 23:41:46 2018 +0800 Drop deleteStyle commit 0489fb3b2f2243ed99becc7c8fbe0da2e1424d97 Author: eight <eight04@gmail.com> Date: Sun Oct 7 23:33:51 2018 +0800 Drop saveStyle commit 02f471f07758db8753beed09c40aaba921940b77 Author: eight <eight04@gmail.com> Date: Sun Oct 7 23:28:41 2018 +0800 Fix: usercss API commit 057111b171ad414c9cd152bac03711b83073da68 Author: eight <eight04@gmail.com> Date: Sun Oct 7 22:59:31 2018 +0800 Update usercss API commit 69cae02381fc8f1f3e0b33cbda587f4705acdf1d Author: eight <eight04@gmail.com> Date: Sun Oct 7 21:40:29 2018 +0800 Drop getStyles commit c5d41529d9bae8d7f66f49afbedab8362079f66a Author: eight <eight04@gmail.com> Date: Sun Oct 7 21:28:51 2018 +0800 Minor fixes commit 5b3b4e680ff45331db1aa726c5d765b6e8cfc026 Author: eight <eight04@gmail.com> Date: Sun Oct 7 21:20:39 2018 +0800 Add: navigator-util commit b5107b78a5a02df2705771c9ee1fe0f2a6db5a5e Author: eight <eight04@gmail.com> Date: Sun Oct 7 01:42:43 2018 +0800 Add: broadcast messages with reasons commit e7ef4948cd4426bf592230b1670ddc6c50e336ca Author: eight <eight04@gmail.com> Date: Sat Oct 6 18:10:47 2018 +0800 Fix: observer is unavailable? commit 1c635b5bc1e8b5347c1171cb01a32852030c0a91 Author: eight <eight04@gmail.com> Date: Sat Oct 6 17:47:43 2018 +0800 Drop requestStyles commit 75f25611545d7d0735ecd5d84835a956b017ce48 Author: eight <eight04@gmail.com> Date: Sat Oct 6 16:38:04 2018 +0800 Fix: don't recreate element when style update in popup commit 583ca31d973e844ecb7287b1ae8fa9aeb94a0a67 Author: eight <eight04@gmail.com> Date: Sat Oct 6 15:40:07 2018 +0800 fixup! Add: isCodeEmpty commit 1cf6008514f9d402e8f12e7b58a92434243e0d25 Author: eight <eight04@gmail.com> Date: Sat Oct 6 15:33:18 2018 +0800 Add: isCodeEmpty commit 450cd60aeb28c3c99d69c8b37043554a840077bb Author: eight <eight04@gmail.com> Date: Sat Oct 6 15:22:04 2018 +0800 Fix: ignore comment block commit 196b6aac638664e8d7816d9558404fcfa10b2653 Author: eight <eight04@gmail.com> Date: Sat Oct 6 15:16:00 2018 +0800 Fix: the return value of getSectionsByUrl is changed commit 3122d28c1ada62e31fcc7076ec5487e4811cef1d Author: eight <eight04@gmail.com> Date: Sat Oct 6 15:14:05 2018 +0800 Fix: always use promise in API call commit e594b8ccb1d3c9f6f4dee06cb084c392423e6a37 Author: eight <eight04@gmail.com> Date: Sat Oct 6 15:11:01 2018 +0800 Cache enabled state commit 1f18b13a9241f848d68ffc622c3a6f816436fd1c Author: eight <eight04@gmail.com> Date: Sat Oct 6 13:48:46 2018 +0800 Add: match global sections commit fedf844ddd57d8c7bd9bc18ee6bc15359ff4123d Author: eight <eight04@gmail.com> Date: Sat Oct 6 13:45:37 2018 +0800 Add: getStylesInfoByUrl commit 095998f07c0e6ffa6c4552e88a3becf2450051c7 Author: eight <eight04@gmail.com> Date: Sat Oct 6 13:27:58 2018 +0800 Change: switch to msg.js commit fa3127d988b8aa09b059adb4aade25a502636ecf Author: eight <eight04@gmail.com> Date: Sat Oct 6 13:02:45 2018 +0800 Change: switch to msg.js commit 05d582c726642c5222cc2f039f39e1e5f1848499 Author: eight <eight04@gmail.com> Date: Sat Oct 6 11:43:42 2018 +0800 Add: msg.sendBg commit 171339f7109b5f795f37ec2af3a06c14e203b7ec Author: eight <eight04@gmail.com> Date: Sat Oct 6 04:39:48 2018 +0800 WIP: drop api.js commit 3a618aca2a0d19216cd655d66a4d7a4c5b1be07e Author: eight <eight04@gmail.com> Date: Sat Oct 6 03:19:51 2018 +0800 WIP: use deepCopy commit bb1cb580240c042bc3c16e5421810f25611dcd96 Author: eight <eight04@gmail.com> Date: Sat Oct 6 03:10:04 2018 +0800 WIP: msg.js commit 2472e91f5775f4246e9d8695a2c4c8b55cff4acc Author: eight <eight04@gmail.com> Date: Fri Oct 5 21:28:19 2018 +0800 WIP: emitChangesToTabs commit 34497ebe1669bb5811e26044dc4a544b79a497ee Author: eight <eight04@gmail.com> Date: Fri Oct 5 18:47:52 2018 +0800 WIP: switch to API commit f1639cc33ebd68d2e596963c5f8846fe478d9b27 Author: eight <eight04@gmail.com> Date: Fri Oct 5 01:03:40 2018 +0800 WIP: broadcastMessage commit 81e4823f4602226eaeb5126deca93b0618b7c153 Author: eight <eight04@gmail.com> Date: Thu Oct 4 19:39:59 2018 +0800 Debounce updateAllTabsIcon commit dc5f3e209fdc37136b947145ef0f808946de0780 Author: eight <eight04@gmail.com> Date: Thu Oct 4 19:34:36 2018 +0800 Fix: settings could be empty on the first install commit 2328cf623a06581edee5272ed0113c0a37d4f9c7 Author: eight <eight04@gmail.com> Date: Thu Oct 4 19:34:22 2018 +0800 Change: start-firefox -> start commit 7be6a1cba904252eedbfe178627ac41cca7ea785 Author: eight <eight04@gmail.com> Date: Thu Oct 4 19:24:35 2018 +0800 Add: applications commit 630725196f7fe042b954070d45733a0e0f24b3b1 Author: eight <eight04@gmail.com> Date: Thu Oct 4 19:22:44 2018 +0800 fixup! Fix: update all icons when some prefs changed commit 0d0e1b4dc07f2768ac98805a1f34b70bb18caa83 Author: eight <eight04@gmail.com> Date: Thu Oct 4 19:20:36 2018 +0800 Fix: update all icons when some prefs changed commit 5c0288e9baf6cb0ba2f0dbc535cfe41244aeeb6c Author: eight <eight04@gmail.com> Date: Thu Oct 4 19:20:11 2018 +0800 fixup! Remove unused FIREFOX_NO_DOM_STORAGE commit 56b737b65a61c38c4904a931de311d0fc8c7fd73 Author: eight <eight04@gmail.com> Date: Thu Oct 4 18:14:57 2018 +0800 Remove unused FIREFOX_NO_DOM_STORAGE commit 829a134ed101ae0e69c755862941987a2c894e6f Author: eight <eight04@gmail.com> Date: Thu Oct 4 18:10:53 2018 +0800 Fix: this -> prefs commit d35f92250e52c5347e49c2be10ac52d6379e789f Author: eight <eight04@gmail.com> Date: Thu Oct 4 18:08:19 2018 +0800 Fixme: styleViaAPI commit 8a6e8ac03a53746c838803addfcb619f67f4b832 Author: eight <eight04@gmail.com> Date: Thu Oct 4 18:05:41 2018 +0800 Change: drop prefChanged, use prefs service commit 10f9449144b87ac5733886bc03f53c7710629175 Author: eight <eight04@gmail.com> Date: Thu Oct 4 17:46:45 2018 +0800 Change: move setupLivePrefs to dom.js. Remove prefs.js dependencies commit dd2b8ed0918fcdece1a37b28d4f6351723bf83f9 Author: eight <eight04@gmail.com> Date: Thu Oct 4 17:18:38 2018 +0800 Fix: type error commit 3af310c3412d7f2f1e565d354191ea814731effa Author: eight <eight04@gmail.com> Date: Thu Oct 4 17:09:26 2018 +0800 Fix: open-manager has no default value commit 874a2da33e42f32d02f9d5e61ddbb3e6b1b0044e Author: eight <eight04@gmail.com> Date: Thu Oct 4 17:04:23 2018 +0800 Enhance: make prefs use storage.sync commit c01f93f62c0010faf9a884a3d2497ea56b002faf Author: eight <eight04@gmail.com> Date: Thu Oct 4 15:57:02 2018 +0800 WIP commit 6d32ffb76b267a939f1a0f5826d08339ff790939 Author: eight <eight04@gmail.com> Date: Thu Oct 4 12:46:19 2018 +0800 WIP commit 0f148eac32c759f4bdae3e2f69f38495f1a5a446 Author: eight <eight04@gmail.com> Date: Thu Oct 4 03:35:07 2018 +0800 WIP commit 282bdf77067a75f2959082152e913a84414a0625 Author: eight <eight04@gmail.com> Date: Wed Oct 3 20:24:06 2018 +0800 Fix: numbers are not compared correctly commit 24b1eea8a4a79b2a116658f375b60363ec429e70 Merge: 8a6011d 5cbe8a8 Author: eight <eight04@gmail.com> Date: Wed Oct 3 15:00:07 2018 +0800 Merge branch 'master' of https://github.com/openstyles/stylus into dev-exclusions commit 5cbe8a8d780a6eb9fce11d5846e92bf244c3a3f3 Author: eight <eight04@gmail.com> Date: Tue Oct 2 20:22:18 2018 +0800 Add: fetch style object from DB directly in the editor (#507) commit 9058c06c547203ab466785bc5a54ab94fc338e27 Author: eight <eight04@gmail.com> Date: Mon Oct 1 23:24:29 2018 +0800 Fix: bad API commit 1f2d116aae15b61212fa059eee356d94951ca6aa Author: eight <eight04@gmail.com> Date: Mon Oct 1 23:14:56 2018 +0800 Fix: use meta parser commit 918e47b1ed0f4ee0e4b075dd20c4b9704a2fef56 Author: eight <eight04@gmail.com> Date: Mon Oct 1 23:01:21 2018 +0800 Fix: emit update event if no fatal errors commit 81a7bb9ac925061586f458a5608400b8ad92006f Author: eight <eight04@gmail.com> Date: Mon Oct 1 22:56:25 2018 +0800 Add: editorWorker.metalint commit f47d57aea84af25f68a664e377a090eba949d472 Author: eight <eight04@gmail.com> Date: Mon Oct 1 22:49:16 2018 +0800 Change: use editorWorker.metalint commit 5778d5c8582cbb3c26e241b2ebcd3186af53dfa4 Author: eight <eight04@gmail.com> Date: Mon Oct 1 22:39:01 2018 +0800 Change: editor-worker-body -> editor-worker commit 268e1716b4bba9456d7fba7b742ce03ca1e93941 Author: eight <eight04@gmail.com> Date: Mon Oct 1 22:38:06 2018 +0800 Change: switch to worker-util commit cc2980b647547696f591cbd8731ab880275ede94 Author: eight <eight04@gmail.com> Date: Mon Oct 1 22:30:16 2018 +0800 Drop: parserlib-loader commit 08adcb60f2a4bc9b5e3f15c5ef533a3420851a5a Merge: 6909c73 2fd531e Author: eight <eight04@gmail.com> Date: Mon Oct 1 22:29:39 2018 +0800 Merge branch 'master' into dev-usercss-meta commit e4135ce35de2b264d7560b37ca2344f6f206db59 Author: eight <eight04@gmail.com> Date: Fri Sep 28 11:57:34 2018 +0800 Fix: remove unused function commit 39a6d1909f4fa7af53c7f5c00dbd5b8c2e083df9 Author: eight <eight04@gmail.com> Date: Fri Sep 28 00:26:29 2018 +0800 Fix: prefs doesn't work in FF's private windows. Add web-ext. Drop prefs.readOnlyValues commit 6909c73c698a81d4897af3a54cd73663ac012559 Author: eight <eight04@gmail.com> Date: Wed Sep 26 12:16:33 2018 +0800 Fix: minor commit 79833d8bba5994f30398d32d238fbe98854714d9 Author: eight <eight04@gmail.com> Date: Wed Sep 26 11:40:04 2018 +0800 Fix: a better way to draw list? commit a849fd6ddabf81ebde74d7c16dcd240249fbe289 Author: eight <eight04@gmail.com> Date: Wed Sep 26 11:39:53 2018 +0800 Fix: missing placeholders commit d5ee31a0801607fe548ba74a5c1f646e14f3cbb6 Author: eight <eight04@gmail.com> Date: Wed Sep 26 11:37:50 2018 +0800 Fix: a better way to draw character list? commit 7b959af3e36492c3b5ec129cade0823e2c05af4b Author: eight <eight04@gmail.com> Date: Wed Sep 26 11:30:10 2018 +0800 Update usercss-meta commit fefa987c4dfb9660d76d3ae26968209204570171 Author: eight <eight04@gmail.com> Date: Wed Sep 26 10:37:28 2018 +0800 Change: sections-equal -> sections-util commit 2abbf670d875b3249b6963115d03285aca3d44f9 Author: eight <eight04@gmail.com> Date: Wed Sep 26 10:37:14 2018 +0800 Fix: check err.code commit 1fe0586b2958b91c39cb1f486955cdcdc072ed78 Author: eight <eight04@gmail.com> Date: Wed Sep 26 10:33:02 2018 +0800 Add: i18n error message commit ab0ef239cf234fd4b6cefc2eed6e8fb442478069 Author: eight <eight04@gmail.com> Date: Wed Sep 26 09:34:57 2018 +0800 Change: move styleCodeEmpty to sections-util, load colorConverter in background worker commit d5ade807f0c7fc22ec331f9476b31efc63e90773 Author: eight <eight04@gmail.com> Date: Wed Sep 26 09:27:30 2018 +0800 Fix: display error message commit 4f5337e51dba0b0644348d67c02b9a90918b14e8 Author: eight <eight04@gmail.com> Date: Wed Sep 26 09:26:55 2018 +0800 Fix: remove unused colorconverter commit 29b8f512926b1f772fad26182748c4471cc19f7d Author: eight <eight04@gmail.com> Date: Tue Sep 25 23:21:44 2018 +0800 Fix: vars could be undefined commit a7cfeb22e45e5fb69a06d41ac133262c85ef08a5 Author: eight <eight04@gmail.com> Date: Tue Sep 25 22:54:40 2018 +0800 Fix: window is undefined commit 9713c6a3beedc1da8d0d111214e295e745d19956 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:56:38 2018 +0800 Fix: throw an error for unparsable color commit 3c30bc3eb014a9936d605425facbee4011ce4244 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:55:55 2018 +0800 Fix: try to get error message commit 3d32b0428bee83b04bc4f813e1f4a49efc2ca488 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:38:40 2018 +0800 Fix: vars might be empty commit 7d75dd87541925b738b1eb2bc5a6e1c5b38002ac Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:18:39 2018 +0800 Add: meta-parser commit a4df641b96d6d14fadeaeab3021d401c8c01d417 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:18:18 2018 +0800 Enhance: set flag in parserlib so we don't need another loader commit 8028a3529f212dd36c9cbb87967105ec25164ab9 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:17:40 2018 +0800 Include util, worker-util in background commit ba5d6cc31a7d6dbbd9e278c809ec17009c155bf8 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:16:59 2018 +0800 Fix: use spread syntax in loadScript commit b853be13f8f9eb182a127addade7570661d82171 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:14:46 2018 +0800 Enhance: swith to usercss-meta (in worker) commit a3e79151995283ba3dd68cd939e8066c5c48cbd8 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:11:54 2018 +0800 Fix: use promise API commit 5d07a8cd4e4789fb5352afe81a86081a71cb95de Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:11:09 2018 +0800 Fix: buildMeta now returns a promise commit a004bc3c7d462b6571e08ec80d72ed6aa1d8efd1 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:10:35 2018 +0800 Move styleCodeEmpty to util commit 41ac66a1378b92ca3da1d5c189f678a31438ff9c Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:09:40 2018 +0800 Add: background worker commit ffb13bf1db4b2dbd6d68183f16a9397ddd587b44 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:09:04 2018 +0800 Enhance: move moz-parser/meta-parser/usercss compiler to worker commit 42e97ef1532a4937e545ea7e0b7c5325066af62a Author: eight <eight04@gmail.com> Date: Tue Sep 25 20:45:07 2018 +0800 Fix: display error on install page commit 64aa9fcf538e31367a9443418c20aed1817b707a Author: eight <eight04@gmail.com> Date: Tue Sep 25 17:34:54 2018 +0800 Add: background worker commit b0e407e98fe4893be0b29cae21df6622c09d4e5f Author: eight <eight04@gmail.com> Date: Tue Sep 25 14:52:35 2018 +0800 Add: worker util commit 7a24547e09984327fdee20426412d0744150413a Author: eight <eight04@gmail.com> Date: Tue Sep 25 00:01:18 2018 +0800 Add: usercss-meta commit 8a6011de8cb75dc898ca765399493eeebc67fe22 Author: Rob Garrison <wowmotty@gmail.com> Date: Sun Jul 22 09:15:09 2018 -0500 Attempt to update icon count commit 4fcb1a88d7ee3fc43743eac25db363a7dcbc1ab9 Author: Rob Garrison <wowmotty@gmail.com> Date: Sun Jul 15 13:44:29 2018 -0500 Fix empty exclusion storage error commit bfe54ab4c4f167890ac4e64e2031991770ae813e Author: Rob Garrison <wowmotty@gmail.com> Date: Sun Jul 15 12:59:51 2018 -0500 Add tab communication commit 983a7bc219409c8feadf5e52cbcd8813f7b416ed Author: Rob Garrison <wowmotty@gmail.com> Date: Sun Jul 15 10:51:11 2018 -0500 Fix escaped regex example commit 3950482f3485a3c61892ccda4608fa7a2ff12421 Author: Rob Garrison <wowmotty@gmail.com> Date: Wed Apr 25 18:11:37 2018 -0500 Fix undefined error commit e94c7edb38c218d87c11f18c81e9f2446f564359 Author: Rob Garrison <wowmotty@gmail.com> Date: Wed Apr 25 17:09:45 2018 -0500 Attempt to fix popup exclusion issues commit 2b4a1a5635c8ea2f3df3981be166ba722b8bc411 Author: Rob Garrison <wowmotty@gmail.com> Date: Thu Apr 19 13:00:27 2018 -0500 Modify input method commit 9f75b69cd899f93f61dbd38a8ec9d2d094bdafd8 Author: Rob Garrison <wowmotty@gmail.com> Date: Wed Mar 7 11:54:05 2018 -0600 Include iframe urls in exclusion popup commit 68dfa0153cdaa72a522b617313bc90c32bf249b2 Author: Rob Garrison <wowmotty@gmail.com> Date: Wed Jan 24 19:42:02 2018 -0600 Add style exclusions. Closes #113 * Revert: exclusions * Fix: pass eslint * Fix: the style is injected twice * Fix: don't load script async * Fix: styleCodeEmpty returns true for empty string * Fix: drop array selection * Fix: the config dialog is broken * Fix: popup doesn't use getStyle/getStylesByUrl correctly * Fix: keep disabled state in setStyleContent * Fix: allow live-preview to assign newest vars * Fix: transition fix is broken because setStyleContent becomes async * Fix: typo, TypeError in styleExists * Fix: use new API * Fix: pass linter * Fix: LICENCE -> LICENSE * Fix: remove unused distroy function
2018-11-07 06:09:29 +00:00
API.toggleStyle(entry.styleId, this.matches('.enable') || this.checked);
},
check(event, entry) {
event.preventDefault();
2018-01-01 17:02:49 +00:00
checkUpdate(entry, {single: true});
},
update(event, entry) {
event.preventDefault();
2018-01-01 17:02:49 +00:00
const json = entry.updatedCode;
json.id = entry.styleId;
Refactor the entire storage system and the section editor (#518) * Squashed commit of the following: commit d84c4dc3fe29a87d0c49a109762d8dd5b3e39aa8 Author: eight <eight04@gmail.com> Date: Sun Oct 14 19:13:29 2018 +0800 Fix: remove unused comment commit 46027120ec4a3785f1674933a165fa0c226bc38d Author: eight <eight04@gmail.com> Date: Sun Oct 14 19:09:06 2018 +0800 Add: handle styleUpdated message commit f85d4de39b3ee2636c44ca46b3ee92045e43696a Author: eight <eight04@gmail.com> Date: Sun Oct 14 18:59:29 2018 +0800 Fix: handle styleAdded message in popup commit 81f3e69574bee2eeffd9d0a5bbb0811f49436520 Author: eight <eight04@gmail.com> Date: Sun Oct 14 18:50:54 2018 +0800 Change: getStylesInfoByUrl -> getStylesByUrl commit f9dc04558f7dd3c077259bbe762569940b035403 Author: eight <eight04@gmail.com> Date: Sun Oct 14 18:48:20 2018 +0800 Fix: drop getStylesInfo commit fea04d591fb79633112bfc605e552495b4cc41ef Author: eight <eight04@gmail.com> Date: Sun Oct 14 18:39:28 2018 +0800 Fix: remove unused ignoreChromeError commit 2aff14e2133fece25b136226961bd97d2d3e1ca2 Author: eight <eight04@gmail.com> Date: Sun Oct 14 18:09:53 2018 +0800 Fix: don't dup promisify in prefs commit d4ddfcc7137e3f14d4dcd72ea8353e0b6fdd8fb0 Author: eight <eight04@gmail.com> Date: Sun Oct 14 17:56:16 2018 +0800 Change: drop .last and .rotate commit 85e70491e413aca8fc8599e88f2e09ea5dde281d Author: eight <eight04@gmail.com> Date: Sun Oct 14 17:36:00 2018 +0800 Fix: unused renderIndex commit 7acb131642648767ea162ffd689ad4ca55d8724e Author: eight <eight04@gmail.com> Date: Sun Oct 14 17:32:49 2018 +0800 Fix: update title on input commit a39405ac4c32d5d38f4b70abd2ea54929d51eae2 Author: eight <eight04@gmail.com> Date: Sun Oct 14 17:17:20 2018 +0800 Fix: remove unused messages commit 14c2fdbb5886ee96f14367e660736e2a8ed3edb9 Author: eight <eight04@gmail.com> Date: Sun Oct 14 16:36:12 2018 +0800 Fix: dirty state for new added applies commit fb1b49b8bb7c0b4cd089d9a3b22dd744dea35f05 Author: eight <eight04@gmail.com> Date: Sun Oct 14 16:27:17 2018 +0800 Fix: minor commit 2c2d849fa46d3bdb83a191564b399dfb963083f1 Author: eight <eight04@gmail.com> Date: Sun Oct 14 16:20:14 2018 +0800 Fix: drop unused getCode commit f133c3e67a9ff969677f73b72267c34968c74190 Author: eight <eight04@gmail.com> Date: Sun Oct 14 16:18:14 2018 +0800 Fix: drop unused lastActive commit 05a6208f5c66e82827d692906d5a3f49dae66471 Author: eight <eight04@gmail.com> Date: Sun Oct 14 16:17:45 2018 +0800 Fix: minor commit 05a87ed00f650f4e92a31a655f471c7f3580ad71 Author: eight <eight04@gmail.com> Date: Sun Oct 14 15:58:33 2018 +0800 Fix: minor commit 576f73f3336e5f68aab2adad3ad79c7920f4ae8c Author: eight <eight04@gmail.com> Date: Sun Oct 14 03:03:35 2018 +0800 Fix: always register listeners commit e93819deb4515f9f2d9116cfea6b21aa05c8dd72 Author: eight <eight04@gmail.com> Date: Sun Oct 14 02:58:49 2018 +0800 Fix: unused statement commit 39b11685b494bd90c6cfd64ff85d9a4c6d9f5bef Author: eight <eight04@gmail.com> Date: Sun Oct 14 02:54:29 2018 +0800 Fix: minor commit 9dd3cd43c166e9e98389f06db25775e2c7355cfe Author: eight <eight04@gmail.com> Date: Sun Oct 14 02:49:22 2018 +0800 Fix: don't reorder options commit 90aadfd7283ed86ac359fbd4b300d548db8b298e Author: eight <eight04@gmail.com> Date: Sun Oct 14 02:43:52 2018 +0800 Fix: drop __ERROR__ commit 838c21e3b335ce0944321d16bf3617b983e1b156 Author: eight <eight04@gmail.com> Date: Sun Oct 14 02:36:20 2018 +0800 Fix: use findStyle API commit 93a4cdf595785690a830759a1b06138dec08d73a Author: eight <eight04@gmail.com> Date: Sun Oct 14 02:34:05 2018 +0800 Add: findStyle API commit 8e75871b9bf1b6c360e6f1dece9262d4510e6cb8 Author: eight <eight04@gmail.com> Date: Sun Oct 14 02:19:01 2018 +0800 Breaking: drop getStylesFallback commit ad06551440290ae43e86eca7ed78b824431daf1d Author: eight <eight04@gmail.com> Date: Sun Oct 14 02:16:48 2018 +0800 Fix: use dataurl to inject page script commit cb5cbb4d10c85624f03c0d6d3bd8f35c55318722 Author: eight <eight04@gmail.com> Date: Sun Oct 14 01:39:50 2018 +0800 Fix: various commit 53efd78b894bf73babae28f8ef9595dac4b79f7a Author: eight <eight04@gmail.com> Date: Sun Oct 14 01:12:57 2018 +0800 Update doc commit 7d005f3eaa35ea5328ecf608429de85b77dab34d Author: eight <eight04@gmail.com> Date: Sun Oct 14 01:09:22 2018 +0800 Change: kill style.reason commit fc53bed3de2ff3704609a40d8e736de7b8de6d18 Author: eight <eight04@gmail.com> Date: Sun Oct 14 00:56:04 2018 +0800 Fix: doo many indents commit 14e321d2582cef0c3e97e2723bc60ecc1d682ba8 Author: eight <eight04@gmail.com> Date: Sun Oct 14 00:40:23 2018 +0800 Fix: don't update icon for popup and options commit 01bdd529bc51b8dd780fcb500a4898115bc92b1d Author: eight <eight04@gmail.com> Date: Sun Oct 14 00:39:17 2018 +0800 Fix: updateCount commit b9968830d3f866688eaff4824d0ce47647265de0 Author: eight <eight04@gmail.com> Date: Sun Oct 14 00:38:49 2018 +0800 Fix: don't send null value commit ff3bf6f52d89f3b2e6f74b37b4a47dff5fd6cdfc Author: eight <eight04@gmail.com> Date: Sun Oct 14 00:03:34 2018 +0800 Add: styleViaAPI updateCount commit 39d21c3d29ad3507281e258d4539dfe4ef4ba124 Author: eight <eight04@gmail.com> Date: Sat Oct 13 23:57:45 2018 +0800 Fix: broadcastError -> ignoreError commit ecb622c93cf11fbfc47b8381a1c869ca9151582e Author: eight <eight04@gmail.com> Date: Sat Oct 13 21:29:06 2018 +0800 Fix: implement styleViaAPI commit 7c3d49c0051dc1d5a7be71acd9f08f8b3b09b901 Author: eight <eight04@gmail.com> Date: Sat Oct 13 17:50:28 2018 +0800 Fix: ROOT may change in XML pages commit 3fd8d937f31d643a5976406bc17e47d137ada890 Author: eight <eight04@gmail.com> Date: Sat Oct 13 16:49:43 2018 +0800 Fix: various commit 859afc8ee9c2d964e1cb9c9dbac7c1613cefef64 Author: eight <eight04@gmail.com> Date: Sat Oct 13 16:39:54 2018 +0800 Enhance: don't cache enabled state commit fbe77a8d15330cfd0d340c13eaf77a4c48d3c49f Author: eight <eight04@gmail.com> Date: Sat Oct 13 16:15:07 2018 +0800 Fix: various commit a4fc3e91622e7b9537a661490af92c6f6ee06398 Author: eight <eight04@gmail.com> Date: Sat Oct 13 16:11:38 2018 +0800 Fix: various commit 7e0eddeb8f03c42fb93db9bef633944dd1c82e57 Author: eight <eight04@gmail.com> Date: Sat Oct 13 15:58:31 2018 +0800 Fix: various commit 8b4ab47d897f5baee15f584a0dd289d38e5dc218 Author: eight <eight04@gmail.com> Date: Sat Oct 13 15:20:10 2018 +0800 Add: some type hint commit 7d340d62dcb7a25a1ccdc6648ab0683afbda917d Author: eight <eight04@gmail.com> Date: Sat Oct 13 15:13:11 2018 +0800 Change: drop storage.js, some functions are moved to sections-util commit d286997d6a64cd8601ed96e204514a5d532d5afd Author: eight <eight04@gmail.com> Date: Sat Oct 13 15:12:00 2018 +0800 Fix: minor commit d60db9dbef06baf4430aaea627406dc36b06debb Author: eight <eight04@gmail.com> Date: Sat Oct 13 15:03:10 2018 +0800 Fix: minor commit 43afa31fa0c47967ae695c9eb2492e5ddc33f85b Author: eight <eight04@gmail.com> Date: Sat Oct 13 14:50:31 2018 +0800 Fix: update tab icon on forward/backward commit f08faea149de3d63e1bcb404cb3e6cfa655dc24b Author: eight <eight04@gmail.com> Date: Sat Oct 13 13:50:03 2018 +0800 Fix: parallel import commit 4d064354869360b2bc011803bd229ec1e640a760 Author: eight <eight04@gmail.com> Date: Fri Oct 12 23:32:03 2018 +0800 Add: importStyle API commit c55675912e276139735037fc1968866eecd94a3f Author: eight <eight04@gmail.com> Date: Fri Oct 12 23:14:46 2018 +0800 Fix: refactor import-export commit 86ea846a89549b683711202799a53536e6e9dec2 Author: eight <eight04@gmail.com> Date: Fri Oct 12 17:34:36 2018 +0800 Fix: search db is broken commit 831ca07c2d770271bc069d599eaee47d9705cffe Author: eight <eight04@gmail.com> Date: Fri Oct 12 17:29:35 2018 +0800 fixup! Add: implement sloppy regexp indicator commit e67b7f4f36856ba26e08e37f91d9631aa77ec469 Author: eight <eight04@gmail.com> Date: Fri Oct 12 17:27:19 2018 +0800 Add: implement sloppy regexp indicator commit 36e13f88f00a3b01074ad4f41a1d1e056ee9c561 Author: eight <eight04@gmail.com> Date: Fri Oct 12 16:59:23 2018 +0800 Add: return excluded/sloppy state in getStylesInfoByUrl commit f6ce78f55b3012923e5a2f4315c642b5f9ab9f57 Author: eight <eight04@gmail.com> Date: Fri Oct 12 16:39:47 2018 +0800 Fix: dead object commit 5ae95a1ad95c95bb95073bc259d12f1329dc9c31 Author: eight <eight04@gmail.com> Date: Fri Oct 12 16:27:54 2018 +0800 Fix: don't reinit all editors on save commit 1a5a206fe62270c70239e5dce692f6f49578589c Author: eight <eight04@gmail.com> Date: Fri Oct 12 16:18:40 2018 +0800 Refactor: pull out sections editor section commit 8016346035b109214e974935d74831ca9cd4ff7d Author: eight <eight04@gmail.com> Date: Fri Oct 12 15:30:35 2018 +0800 Fix: replaceStyle make style name undefined commit fa080d191311a02f8b080e4e7cf28e2305c4c540 Author: eight <eight04@gmail.com> Date: Fri Oct 12 15:21:36 2018 +0800 Fix: catch csp error commit e0b064115dd26daf1e728e790761983b59db10fc Author: eight <eight04@gmail.com> Date: Fri Oct 12 15:03:00 2018 +0800 Fix: use a simple eval to execute page scripts commit 405b7f8f06968b1f588a6bdb45dfbaeb0b07305b Author: eight <eight04@gmail.com> Date: Fri Oct 12 03:48:13 2018 +0800 Fix: removed unused API commit 1b2c88f92635f8039dd7cc99fcae13ed0e4f8f4f Author: eight <eight04@gmail.com> Date: Fri Oct 12 03:46:51 2018 +0800 Fix: no need to access db commit a8131fc9c522577d0721798cd0f69c26d68165d3 Author: eight <eight04@gmail.com> Date: Fri Oct 12 03:43:31 2018 +0800 Fix: remove unused methods commit 3ae0c4dd134955055c12e18163c2e8b77999cfd8 Author: eight <eight04@gmail.com> Date: Fri Oct 12 03:10:26 2018 +0800 Enhance: allow matcher to return verbose info commit 0ea7ada48febd59a207f0eee24fbcbb03ae943b6 Author: eight <eight04@gmail.com> Date: Fri Oct 12 02:02:14 2018 +0800 Fix: content script may load before the background is ready commit 04c2d6bbf6d52b78b0fab046ddbacf9cb73ca248 Author: eight <eight04@gmail.com> Date: Fri Oct 12 01:49:52 2018 +0800 Fix: throw receiving end doesn't exist message commit f0c0bc4d6a5a720abfdc91fc92ef5973783c600f Author: eight <eight04@gmail.com> Date: Fri Oct 12 01:11:17 2018 +0800 Fix: unwrap error commit 4d42765d6ca989e04a39696c066e6e12b8f1197d Author: eight <eight04@gmail.com> Date: Thu Oct 11 23:55:16 2018 +0800 fixup! Fix: match subdomain commit 99626e4a48a008e0ddb6f90144965e88a65d2a79 Author: eight <eight04@gmail.com> Date: Thu Oct 11 23:54:58 2018 +0800 Fix: match subdomain commit a57b3b27160cb11b01db2c54e052cbabf6a7ab49 Author: eight <eight04@gmail.com> Date: Thu Oct 11 23:39:11 2018 +0800 Fix: firefox commit 5cfea3933f920822b638683ea234d4aa6866e2f4 Author: eight <eight04@gmail.com> Date: Thu Oct 11 22:46:34 2018 +0800 Add some comment to db.js commit 25fd3a1c2b52ace576a3e0ccfed39ff0393f5141 Author: eight <eight04@gmail.com> Date: Thu Oct 11 22:14:56 2018 +0800 Fix: remove unused prop commit bdae1c3697c698a84417886b0bfaaa54c975f5d4 Author: eight <eight04@gmail.com> Date: Thu Oct 11 20:00:25 2018 +0800 Change: simpler styleCodeEmpty commit bd4a453f458c7c5a782b53145a899e899beb1ae3 Merge: c1bf9f5 9058c06 Author: eight <eight04@gmail.com> Date: Thu Oct 11 19:49:37 2018 +0800 Merge branch 'dev-usercss-meta' into dev-exclusions commit c1bf9f57e908c33ab71ecef44d40c9c7471c036f Author: eight <eight04@gmail.com> Date: Thu Oct 11 19:29:17 2018 +0800 Fix: minor commit fd5eeb4b812b48fb19859d391bfc9658f265113a Author: eight <eight04@gmail.com> Date: Thu Oct 11 19:00:05 2018 +0800 Add: refresh on view commit 3e38810a495b6ba0e10f686f7691fd6dc94be3be Author: eight <eight04@gmail.com> Date: Thu Oct 11 18:13:24 2018 +0800 Fix: make sure icons are refreshed at startup commit c657d7e55c6b48fb5d8649f2488eeef04a936d40 Author: eight <eight04@gmail.com> Date: Thu Oct 11 17:32:27 2018 +0800 Add: implement bug 461 commit 7ed39ab6ef76efd412af42387aec4c24287f3dc7 Author: eight <eight04@gmail.com> Date: Thu Oct 11 15:42:44 2018 +0800 fixup! Add: icon-util commit 30e494eda9ba8167d9528c6d3e24b8446a12e4b8 Author: eight <eight04@gmail.com> Date: Thu Oct 11 15:42:23 2018 +0800 Add: icon-util commit 510a886e1445bcd5b2d72c01438a14a31cb230bd Author: eight <eight04@gmail.com> Date: Thu Oct 11 03:21:38 2018 +0800 Fix: exposeIframes commit c7f81662c43d2aaae0105a754236b96b1225d2ec Author: eight <eight04@gmail.com> Date: Thu Oct 11 02:19:14 2018 +0800 Fix: autoCloseBrackets is true by default commit f3a103645d777f0d8c191a8a74893b3548ecbb00 Author: eight <eight04@gmail.com> Date: Thu Oct 11 02:11:14 2018 +0800 Fix: various commit d4436cde2014fc3a63512da74866aaeb99f7c782 Author: eight <eight04@gmail.com> Date: Thu Oct 11 01:39:10 2018 +0800 Add: implement exposeIframe commit 43db875fd80ec851f1d72ad5589e39126a8d6391 Author: eight <eight04@gmail.com> Date: Thu Oct 11 01:26:24 2018 +0800 Kill more globals commit dc491e9be3ecdf8da516e6653df0030cab104fb9 Author: eight <eight04@gmail.com> Date: Thu Oct 11 01:22:13 2018 +0800 Kill old storage, storage-dummy commit ba64b95575349fdbba2b4592f81c709df1ed0262 Author: eight <eight04@gmail.com> Date: Thu Oct 11 00:54:38 2018 +0800 WIP: kill cachedStyles commit 7eba890a213f204da8f79afaccd07f37d2078096 Merge: d2b36a1 81e4823 Author: eight <eight04@gmail.com> Date: Wed Oct 10 23:15:14 2018 +0800 Merge branch 'dev-private-prefs' into dev-exclusions commit d2b36a168e967dcf48a11574af67bff997df9b6b Author: eight <eight04@gmail.com> Date: Wed Oct 10 23:05:20 2018 +0800 Kill hidden globals commit 22d4767511fb63e77f8f46e9361a998b7803b7fd Author: eight <eight04@gmail.com> Date: Wed Oct 10 19:23:34 2018 +0800 Fix: margin for deleted sections commit 00687983f0a6f277f2bcb2f60ea35575aaa3f734 Author: eight <eight04@gmail.com> Date: Wed Oct 10 18:21:07 2018 +0800 Fix: default value commit ff6fd8cad3dced164673e335ca1b5a6a9e477b94 Author: eight <eight04@gmail.com> Date: Wed Oct 10 18:02:51 2018 +0800 Fix: default options commit c23f315c52f658b7bf33f7a748f6287a710bd64b Author: eight <eight04@gmail.com> Date: Wed Oct 10 17:40:07 2018 +0800 Refactor: use CodeMirror.defineOption commit 4419c5dc1e584f420a3acd204b85fd0661442b27 Author: eight <eight04@gmail.com> Date: Wed Oct 10 16:32:39 2018 +0800 Change: kill editors, styleId commit 6494985b50c36add1569b71020285eb4eeb1a943 Author: eight <eight04@gmail.com> Date: Wed Oct 10 16:14:51 2018 +0800 Fix: various commit 37e1f43f75fe252c32b18fa91e83790860267f10 Author: eight <eight04@gmail.com> Date: Wed Oct 10 15:04:03 2018 +0800 Fix: minor commit d26ce3238e9beea602b4b47c4fd0184107712ce6 Author: eight <eight04@gmail.com> Date: Wed Oct 10 14:49:37 2018 +0800 Add: codemirror-factory commit 15a1f552f6f23ffedb7d22bed6ab306d4cc8ab27 Author: eight <eight04@gmail.com> Date: Wed Oct 10 12:08:35 2018 +0800 WIP: kill getSection commit ba6159e0677ca9da393cda68f6a72d00ab723a3b Author: eight <eight04@gmail.com> Date: Wed Oct 10 02:43:09 2018 +0800 WIP: edit page commit fd9ab5d6e50ef85cc6525c84aba4d5bb50b13f02 Author: eight <eight04@gmail.com> Date: Wed Oct 10 00:41:07 2018 +0800 Fix: switch to editor commit 06e22d0d186cc52dd7260173083406a6895a07c6 Author: eight <eight04@gmail.com> Date: Tue Oct 9 23:38:29 2018 +0800 Change: add sections-editor commit 30e86629468ecd02724c6aae076605b36495b33c Author: eight <eight04@gmail.com> Date: Mon Oct 8 20:12:39 2018 +0800 Add: preview error commit 47b2b4fc49dd0d6296ac4159410e84e19acfc226 Author: eight <eight04@gmail.com> Date: Mon Oct 8 18:38:01 2018 +0800 Add: livePreview.show commit 7b5e7c96d59df10531bbf81fe3bb682f9593aabf Author: eight <eight04@gmail.com> Date: Mon Oct 8 18:16:45 2018 +0800 Hook up live preview commit 15efafff3c55fbd5e08693849b370a1f8fa1ac38 Author: eight <eight04@gmail.com> Date: Mon Oct 8 17:49:57 2018 +0800 Add: live preview commit a38558ef786fccb7cbf46327be3036b608e286b1 Author: eight <eight04@gmail.com> Date: Mon Oct 8 15:30:39 2018 +0800 WIP: make notifyAllTabs a noop commit 582e9078af834a719b1ce04db09c63741b446380 Author: eight <eight04@gmail.com> Date: Mon Oct 8 14:39:08 2018 +0800 Fix: inject all scripts commit f4651da8d8fbf972d1124f695116c07e25cbd0b5 Author: eight <eight04@gmail.com> Date: Sun Oct 7 23:41:46 2018 +0800 Drop deleteStyle commit 0489fb3b2f2243ed99becc7c8fbe0da2e1424d97 Author: eight <eight04@gmail.com> Date: Sun Oct 7 23:33:51 2018 +0800 Drop saveStyle commit 02f471f07758db8753beed09c40aaba921940b77 Author: eight <eight04@gmail.com> Date: Sun Oct 7 23:28:41 2018 +0800 Fix: usercss API commit 057111b171ad414c9cd152bac03711b83073da68 Author: eight <eight04@gmail.com> Date: Sun Oct 7 22:59:31 2018 +0800 Update usercss API commit 69cae02381fc8f1f3e0b33cbda587f4705acdf1d Author: eight <eight04@gmail.com> Date: Sun Oct 7 21:40:29 2018 +0800 Drop getStyles commit c5d41529d9bae8d7f66f49afbedab8362079f66a Author: eight <eight04@gmail.com> Date: Sun Oct 7 21:28:51 2018 +0800 Minor fixes commit 5b3b4e680ff45331db1aa726c5d765b6e8cfc026 Author: eight <eight04@gmail.com> Date: Sun Oct 7 21:20:39 2018 +0800 Add: navigator-util commit b5107b78a5a02df2705771c9ee1fe0f2a6db5a5e Author: eight <eight04@gmail.com> Date: Sun Oct 7 01:42:43 2018 +0800 Add: broadcast messages with reasons commit e7ef4948cd4426bf592230b1670ddc6c50e336ca Author: eight <eight04@gmail.com> Date: Sat Oct 6 18:10:47 2018 +0800 Fix: observer is unavailable? commit 1c635b5bc1e8b5347c1171cb01a32852030c0a91 Author: eight <eight04@gmail.com> Date: Sat Oct 6 17:47:43 2018 +0800 Drop requestStyles commit 75f25611545d7d0735ecd5d84835a956b017ce48 Author: eight <eight04@gmail.com> Date: Sat Oct 6 16:38:04 2018 +0800 Fix: don't recreate element when style update in popup commit 583ca31d973e844ecb7287b1ae8fa9aeb94a0a67 Author: eight <eight04@gmail.com> Date: Sat Oct 6 15:40:07 2018 +0800 fixup! Add: isCodeEmpty commit 1cf6008514f9d402e8f12e7b58a92434243e0d25 Author: eight <eight04@gmail.com> Date: Sat Oct 6 15:33:18 2018 +0800 Add: isCodeEmpty commit 450cd60aeb28c3c99d69c8b37043554a840077bb Author: eight <eight04@gmail.com> Date: Sat Oct 6 15:22:04 2018 +0800 Fix: ignore comment block commit 196b6aac638664e8d7816d9558404fcfa10b2653 Author: eight <eight04@gmail.com> Date: Sat Oct 6 15:16:00 2018 +0800 Fix: the return value of getSectionsByUrl is changed commit 3122d28c1ada62e31fcc7076ec5487e4811cef1d Author: eight <eight04@gmail.com> Date: Sat Oct 6 15:14:05 2018 +0800 Fix: always use promise in API call commit e594b8ccb1d3c9f6f4dee06cb084c392423e6a37 Author: eight <eight04@gmail.com> Date: Sat Oct 6 15:11:01 2018 +0800 Cache enabled state commit 1f18b13a9241f848d68ffc622c3a6f816436fd1c Author: eight <eight04@gmail.com> Date: Sat Oct 6 13:48:46 2018 +0800 Add: match global sections commit fedf844ddd57d8c7bd9bc18ee6bc15359ff4123d Author: eight <eight04@gmail.com> Date: Sat Oct 6 13:45:37 2018 +0800 Add: getStylesInfoByUrl commit 095998f07c0e6ffa6c4552e88a3becf2450051c7 Author: eight <eight04@gmail.com> Date: Sat Oct 6 13:27:58 2018 +0800 Change: switch to msg.js commit fa3127d988b8aa09b059adb4aade25a502636ecf Author: eight <eight04@gmail.com> Date: Sat Oct 6 13:02:45 2018 +0800 Change: switch to msg.js commit 05d582c726642c5222cc2f039f39e1e5f1848499 Author: eight <eight04@gmail.com> Date: Sat Oct 6 11:43:42 2018 +0800 Add: msg.sendBg commit 171339f7109b5f795f37ec2af3a06c14e203b7ec Author: eight <eight04@gmail.com> Date: Sat Oct 6 04:39:48 2018 +0800 WIP: drop api.js commit 3a618aca2a0d19216cd655d66a4d7a4c5b1be07e Author: eight <eight04@gmail.com> Date: Sat Oct 6 03:19:51 2018 +0800 WIP: use deepCopy commit bb1cb580240c042bc3c16e5421810f25611dcd96 Author: eight <eight04@gmail.com> Date: Sat Oct 6 03:10:04 2018 +0800 WIP: msg.js commit 2472e91f5775f4246e9d8695a2c4c8b55cff4acc Author: eight <eight04@gmail.com> Date: Fri Oct 5 21:28:19 2018 +0800 WIP: emitChangesToTabs commit 34497ebe1669bb5811e26044dc4a544b79a497ee Author: eight <eight04@gmail.com> Date: Fri Oct 5 18:47:52 2018 +0800 WIP: switch to API commit f1639cc33ebd68d2e596963c5f8846fe478d9b27 Author: eight <eight04@gmail.com> Date: Fri Oct 5 01:03:40 2018 +0800 WIP: broadcastMessage commit 81e4823f4602226eaeb5126deca93b0618b7c153 Author: eight <eight04@gmail.com> Date: Thu Oct 4 19:39:59 2018 +0800 Debounce updateAllTabsIcon commit dc5f3e209fdc37136b947145ef0f808946de0780 Author: eight <eight04@gmail.com> Date: Thu Oct 4 19:34:36 2018 +0800 Fix: settings could be empty on the first install commit 2328cf623a06581edee5272ed0113c0a37d4f9c7 Author: eight <eight04@gmail.com> Date: Thu Oct 4 19:34:22 2018 +0800 Change: start-firefox -> start commit 7be6a1cba904252eedbfe178627ac41cca7ea785 Author: eight <eight04@gmail.com> Date: Thu Oct 4 19:24:35 2018 +0800 Add: applications commit 630725196f7fe042b954070d45733a0e0f24b3b1 Author: eight <eight04@gmail.com> Date: Thu Oct 4 19:22:44 2018 +0800 fixup! Fix: update all icons when some prefs changed commit 0d0e1b4dc07f2768ac98805a1f34b70bb18caa83 Author: eight <eight04@gmail.com> Date: Thu Oct 4 19:20:36 2018 +0800 Fix: update all icons when some prefs changed commit 5c0288e9baf6cb0ba2f0dbc535cfe41244aeeb6c Author: eight <eight04@gmail.com> Date: Thu Oct 4 19:20:11 2018 +0800 fixup! Remove unused FIREFOX_NO_DOM_STORAGE commit 56b737b65a61c38c4904a931de311d0fc8c7fd73 Author: eight <eight04@gmail.com> Date: Thu Oct 4 18:14:57 2018 +0800 Remove unused FIREFOX_NO_DOM_STORAGE commit 829a134ed101ae0e69c755862941987a2c894e6f Author: eight <eight04@gmail.com> Date: Thu Oct 4 18:10:53 2018 +0800 Fix: this -> prefs commit d35f92250e52c5347e49c2be10ac52d6379e789f Author: eight <eight04@gmail.com> Date: Thu Oct 4 18:08:19 2018 +0800 Fixme: styleViaAPI commit 8a6e8ac03a53746c838803addfcb619f67f4b832 Author: eight <eight04@gmail.com> Date: Thu Oct 4 18:05:41 2018 +0800 Change: drop prefChanged, use prefs service commit 10f9449144b87ac5733886bc03f53c7710629175 Author: eight <eight04@gmail.com> Date: Thu Oct 4 17:46:45 2018 +0800 Change: move setupLivePrefs to dom.js. Remove prefs.js dependencies commit dd2b8ed0918fcdece1a37b28d4f6351723bf83f9 Author: eight <eight04@gmail.com> Date: Thu Oct 4 17:18:38 2018 +0800 Fix: type error commit 3af310c3412d7f2f1e565d354191ea814731effa Author: eight <eight04@gmail.com> Date: Thu Oct 4 17:09:26 2018 +0800 Fix: open-manager has no default value commit 874a2da33e42f32d02f9d5e61ddbb3e6b1b0044e Author: eight <eight04@gmail.com> Date: Thu Oct 4 17:04:23 2018 +0800 Enhance: make prefs use storage.sync commit c01f93f62c0010faf9a884a3d2497ea56b002faf Author: eight <eight04@gmail.com> Date: Thu Oct 4 15:57:02 2018 +0800 WIP commit 6d32ffb76b267a939f1a0f5826d08339ff790939 Author: eight <eight04@gmail.com> Date: Thu Oct 4 12:46:19 2018 +0800 WIP commit 0f148eac32c759f4bdae3e2f69f38495f1a5a446 Author: eight <eight04@gmail.com> Date: Thu Oct 4 03:35:07 2018 +0800 WIP commit 282bdf77067a75f2959082152e913a84414a0625 Author: eight <eight04@gmail.com> Date: Wed Oct 3 20:24:06 2018 +0800 Fix: numbers are not compared correctly commit 24b1eea8a4a79b2a116658f375b60363ec429e70 Merge: 8a6011d 5cbe8a8 Author: eight <eight04@gmail.com> Date: Wed Oct 3 15:00:07 2018 +0800 Merge branch 'master' of https://github.com/openstyles/stylus into dev-exclusions commit 5cbe8a8d780a6eb9fce11d5846e92bf244c3a3f3 Author: eight <eight04@gmail.com> Date: Tue Oct 2 20:22:18 2018 +0800 Add: fetch style object from DB directly in the editor (#507) commit 9058c06c547203ab466785bc5a54ab94fc338e27 Author: eight <eight04@gmail.com> Date: Mon Oct 1 23:24:29 2018 +0800 Fix: bad API commit 1f2d116aae15b61212fa059eee356d94951ca6aa Author: eight <eight04@gmail.com> Date: Mon Oct 1 23:14:56 2018 +0800 Fix: use meta parser commit 918e47b1ed0f4ee0e4b075dd20c4b9704a2fef56 Author: eight <eight04@gmail.com> Date: Mon Oct 1 23:01:21 2018 +0800 Fix: emit update event if no fatal errors commit 81a7bb9ac925061586f458a5608400b8ad92006f Author: eight <eight04@gmail.com> Date: Mon Oct 1 22:56:25 2018 +0800 Add: editorWorker.metalint commit f47d57aea84af25f68a664e377a090eba949d472 Author: eight <eight04@gmail.com> Date: Mon Oct 1 22:49:16 2018 +0800 Change: use editorWorker.metalint commit 5778d5c8582cbb3c26e241b2ebcd3186af53dfa4 Author: eight <eight04@gmail.com> Date: Mon Oct 1 22:39:01 2018 +0800 Change: editor-worker-body -> editor-worker commit 268e1716b4bba9456d7fba7b742ce03ca1e93941 Author: eight <eight04@gmail.com> Date: Mon Oct 1 22:38:06 2018 +0800 Change: switch to worker-util commit cc2980b647547696f591cbd8731ab880275ede94 Author: eight <eight04@gmail.com> Date: Mon Oct 1 22:30:16 2018 +0800 Drop: parserlib-loader commit 08adcb60f2a4bc9b5e3f15c5ef533a3420851a5a Merge: 6909c73 2fd531e Author: eight <eight04@gmail.com> Date: Mon Oct 1 22:29:39 2018 +0800 Merge branch 'master' into dev-usercss-meta commit e4135ce35de2b264d7560b37ca2344f6f206db59 Author: eight <eight04@gmail.com> Date: Fri Sep 28 11:57:34 2018 +0800 Fix: remove unused function commit 39a6d1909f4fa7af53c7f5c00dbd5b8c2e083df9 Author: eight <eight04@gmail.com> Date: Fri Sep 28 00:26:29 2018 +0800 Fix: prefs doesn't work in FF's private windows. Add web-ext. Drop prefs.readOnlyValues commit 6909c73c698a81d4897af3a54cd73663ac012559 Author: eight <eight04@gmail.com> Date: Wed Sep 26 12:16:33 2018 +0800 Fix: minor commit 79833d8bba5994f30398d32d238fbe98854714d9 Author: eight <eight04@gmail.com> Date: Wed Sep 26 11:40:04 2018 +0800 Fix: a better way to draw list? commit a849fd6ddabf81ebde74d7c16dcd240249fbe289 Author: eight <eight04@gmail.com> Date: Wed Sep 26 11:39:53 2018 +0800 Fix: missing placeholders commit d5ee31a0801607fe548ba74a5c1f646e14f3cbb6 Author: eight <eight04@gmail.com> Date: Wed Sep 26 11:37:50 2018 +0800 Fix: a better way to draw character list? commit 7b959af3e36492c3b5ec129cade0823e2c05af4b Author: eight <eight04@gmail.com> Date: Wed Sep 26 11:30:10 2018 +0800 Update usercss-meta commit fefa987c4dfb9660d76d3ae26968209204570171 Author: eight <eight04@gmail.com> Date: Wed Sep 26 10:37:28 2018 +0800 Change: sections-equal -> sections-util commit 2abbf670d875b3249b6963115d03285aca3d44f9 Author: eight <eight04@gmail.com> Date: Wed Sep 26 10:37:14 2018 +0800 Fix: check err.code commit 1fe0586b2958b91c39cb1f486955cdcdc072ed78 Author: eight <eight04@gmail.com> Date: Wed Sep 26 10:33:02 2018 +0800 Add: i18n error message commit ab0ef239cf234fd4b6cefc2eed6e8fb442478069 Author: eight <eight04@gmail.com> Date: Wed Sep 26 09:34:57 2018 +0800 Change: move styleCodeEmpty to sections-util, load colorConverter in background worker commit d5ade807f0c7fc22ec331f9476b31efc63e90773 Author: eight <eight04@gmail.com> Date: Wed Sep 26 09:27:30 2018 +0800 Fix: display error message commit 4f5337e51dba0b0644348d67c02b9a90918b14e8 Author: eight <eight04@gmail.com> Date: Wed Sep 26 09:26:55 2018 +0800 Fix: remove unused colorconverter commit 29b8f512926b1f772fad26182748c4471cc19f7d Author: eight <eight04@gmail.com> Date: Tue Sep 25 23:21:44 2018 +0800 Fix: vars could be undefined commit a7cfeb22e45e5fb69a06d41ac133262c85ef08a5 Author: eight <eight04@gmail.com> Date: Tue Sep 25 22:54:40 2018 +0800 Fix: window is undefined commit 9713c6a3beedc1da8d0d111214e295e745d19956 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:56:38 2018 +0800 Fix: throw an error for unparsable color commit 3c30bc3eb014a9936d605425facbee4011ce4244 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:55:55 2018 +0800 Fix: try to get error message commit 3d32b0428bee83b04bc4f813e1f4a49efc2ca488 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:38:40 2018 +0800 Fix: vars might be empty commit 7d75dd87541925b738b1eb2bc5a6e1c5b38002ac Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:18:39 2018 +0800 Add: meta-parser commit a4df641b96d6d14fadeaeab3021d401c8c01d417 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:18:18 2018 +0800 Enhance: set flag in parserlib so we don't need another loader commit 8028a3529f212dd36c9cbb87967105ec25164ab9 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:17:40 2018 +0800 Include util, worker-util in background commit ba5d6cc31a7d6dbbd9e278c809ec17009c155bf8 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:16:59 2018 +0800 Fix: use spread syntax in loadScript commit b853be13f8f9eb182a127addade7570661d82171 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:14:46 2018 +0800 Enhance: swith to usercss-meta (in worker) commit a3e79151995283ba3dd68cd939e8066c5c48cbd8 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:11:54 2018 +0800 Fix: use promise API commit 5d07a8cd4e4789fb5352afe81a86081a71cb95de Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:11:09 2018 +0800 Fix: buildMeta now returns a promise commit a004bc3c7d462b6571e08ec80d72ed6aa1d8efd1 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:10:35 2018 +0800 Move styleCodeEmpty to util commit 41ac66a1378b92ca3da1d5c189f678a31438ff9c Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:09:40 2018 +0800 Add: background worker commit ffb13bf1db4b2dbd6d68183f16a9397ddd587b44 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:09:04 2018 +0800 Enhance: move moz-parser/meta-parser/usercss compiler to worker commit 42e97ef1532a4937e545ea7e0b7c5325066af62a Author: eight <eight04@gmail.com> Date: Tue Sep 25 20:45:07 2018 +0800 Fix: display error on install page commit 64aa9fcf538e31367a9443418c20aed1817b707a Author: eight <eight04@gmail.com> Date: Tue Sep 25 17:34:54 2018 +0800 Add: background worker commit b0e407e98fe4893be0b29cae21df6622c09d4e5f Author: eight <eight04@gmail.com> Date: Tue Sep 25 14:52:35 2018 +0800 Add: worker util commit 7a24547e09984327fdee20426412d0744150413a Author: eight <eight04@gmail.com> Date: Tue Sep 25 00:01:18 2018 +0800 Add: usercss-meta commit 8a6011de8cb75dc898ca765399493eeebc67fe22 Author: Rob Garrison <wowmotty@gmail.com> Date: Sun Jul 22 09:15:09 2018 -0500 Attempt to update icon count commit 4fcb1a88d7ee3fc43743eac25db363a7dcbc1ab9 Author: Rob Garrison <wowmotty@gmail.com> Date: Sun Jul 15 13:44:29 2018 -0500 Fix empty exclusion storage error commit bfe54ab4c4f167890ac4e64e2031991770ae813e Author: Rob Garrison <wowmotty@gmail.com> Date: Sun Jul 15 12:59:51 2018 -0500 Add tab communication commit 983a7bc219409c8feadf5e52cbcd8813f7b416ed Author: Rob Garrison <wowmotty@gmail.com> Date: Sun Jul 15 10:51:11 2018 -0500 Fix escaped regex example commit 3950482f3485a3c61892ccda4608fa7a2ff12421 Author: Rob Garrison <wowmotty@gmail.com> Date: Wed Apr 25 18:11:37 2018 -0500 Fix undefined error commit e94c7edb38c218d87c11f18c81e9f2446f564359 Author: Rob Garrison <wowmotty@gmail.com> Date: Wed Apr 25 17:09:45 2018 -0500 Attempt to fix popup exclusion issues commit 2b4a1a5635c8ea2f3df3981be166ba722b8bc411 Author: Rob Garrison <wowmotty@gmail.com> Date: Thu Apr 19 13:00:27 2018 -0500 Modify input method commit 9f75b69cd899f93f61dbd38a8ec9d2d094bdafd8 Author: Rob Garrison <wowmotty@gmail.com> Date: Wed Mar 7 11:54:05 2018 -0600 Include iframe urls in exclusion popup commit 68dfa0153cdaa72a522b617313bc90c32bf249b2 Author: Rob Garrison <wowmotty@gmail.com> Date: Wed Jan 24 19:42:02 2018 -0600 Add style exclusions. Closes #113 * Revert: exclusions * Fix: pass eslint * Fix: the style is injected twice * Fix: don't load script async * Fix: styleCodeEmpty returns true for empty string * Fix: drop array selection * Fix: the config dialog is broken * Fix: popup doesn't use getStyle/getStylesByUrl correctly * Fix: keep disabled state in setStyleContent * Fix: allow live-preview to assign newest vars * Fix: transition fix is broken because setStyleContent becomes async * Fix: typo, TypeError in styleExists * Fix: use new API * Fix: pass linter * Fix: LICENCE -> LICENSE * Fix: remove unused distroy function
2018-11-07 06:09:29 +00:00
API[json.usercssData ? 'installUsercss' : 'installStyle'](json);
},
delete(event, entry) {
event.preventDefault();
const id = entry.styleId;
animateElement(entry);
messageBox({
title: t('deleteStyleConfirm'),
contents: entry.styleMeta.customName || entry.styleMeta.name,
className: 'danger center',
buttons: [t('confirmDelete'), t('confirmCancel')],
})
.then(({button}) => {
if (button === 0) {
Refactor the entire storage system and the section editor (#518) * Squashed commit of the following: commit d84c4dc3fe29a87d0c49a109762d8dd5b3e39aa8 Author: eight <eight04@gmail.com> Date: Sun Oct 14 19:13:29 2018 +0800 Fix: remove unused comment commit 46027120ec4a3785f1674933a165fa0c226bc38d Author: eight <eight04@gmail.com> Date: Sun Oct 14 19:09:06 2018 +0800 Add: handle styleUpdated message commit f85d4de39b3ee2636c44ca46b3ee92045e43696a Author: eight <eight04@gmail.com> Date: Sun Oct 14 18:59:29 2018 +0800 Fix: handle styleAdded message in popup commit 81f3e69574bee2eeffd9d0a5bbb0811f49436520 Author: eight <eight04@gmail.com> Date: Sun Oct 14 18:50:54 2018 +0800 Change: getStylesInfoByUrl -> getStylesByUrl commit f9dc04558f7dd3c077259bbe762569940b035403 Author: eight <eight04@gmail.com> Date: Sun Oct 14 18:48:20 2018 +0800 Fix: drop getStylesInfo commit fea04d591fb79633112bfc605e552495b4cc41ef Author: eight <eight04@gmail.com> Date: Sun Oct 14 18:39:28 2018 +0800 Fix: remove unused ignoreChromeError commit 2aff14e2133fece25b136226961bd97d2d3e1ca2 Author: eight <eight04@gmail.com> Date: Sun Oct 14 18:09:53 2018 +0800 Fix: don't dup promisify in prefs commit d4ddfcc7137e3f14d4dcd72ea8353e0b6fdd8fb0 Author: eight <eight04@gmail.com> Date: Sun Oct 14 17:56:16 2018 +0800 Change: drop .last and .rotate commit 85e70491e413aca8fc8599e88f2e09ea5dde281d Author: eight <eight04@gmail.com> Date: Sun Oct 14 17:36:00 2018 +0800 Fix: unused renderIndex commit 7acb131642648767ea162ffd689ad4ca55d8724e Author: eight <eight04@gmail.com> Date: Sun Oct 14 17:32:49 2018 +0800 Fix: update title on input commit a39405ac4c32d5d38f4b70abd2ea54929d51eae2 Author: eight <eight04@gmail.com> Date: Sun Oct 14 17:17:20 2018 +0800 Fix: remove unused messages commit 14c2fdbb5886ee96f14367e660736e2a8ed3edb9 Author: eight <eight04@gmail.com> Date: Sun Oct 14 16:36:12 2018 +0800 Fix: dirty state for new added applies commit fb1b49b8bb7c0b4cd089d9a3b22dd744dea35f05 Author: eight <eight04@gmail.com> Date: Sun Oct 14 16:27:17 2018 +0800 Fix: minor commit 2c2d849fa46d3bdb83a191564b399dfb963083f1 Author: eight <eight04@gmail.com> Date: Sun Oct 14 16:20:14 2018 +0800 Fix: drop unused getCode commit f133c3e67a9ff969677f73b72267c34968c74190 Author: eight <eight04@gmail.com> Date: Sun Oct 14 16:18:14 2018 +0800 Fix: drop unused lastActive commit 05a6208f5c66e82827d692906d5a3f49dae66471 Author: eight <eight04@gmail.com> Date: Sun Oct 14 16:17:45 2018 +0800 Fix: minor commit 05a87ed00f650f4e92a31a655f471c7f3580ad71 Author: eight <eight04@gmail.com> Date: Sun Oct 14 15:58:33 2018 +0800 Fix: minor commit 576f73f3336e5f68aab2adad3ad79c7920f4ae8c Author: eight <eight04@gmail.com> Date: Sun Oct 14 03:03:35 2018 +0800 Fix: always register listeners commit e93819deb4515f9f2d9116cfea6b21aa05c8dd72 Author: eight <eight04@gmail.com> Date: Sun Oct 14 02:58:49 2018 +0800 Fix: unused statement commit 39b11685b494bd90c6cfd64ff85d9a4c6d9f5bef Author: eight <eight04@gmail.com> Date: Sun Oct 14 02:54:29 2018 +0800 Fix: minor commit 9dd3cd43c166e9e98389f06db25775e2c7355cfe Author: eight <eight04@gmail.com> Date: Sun Oct 14 02:49:22 2018 +0800 Fix: don't reorder options commit 90aadfd7283ed86ac359fbd4b300d548db8b298e Author: eight <eight04@gmail.com> Date: Sun Oct 14 02:43:52 2018 +0800 Fix: drop __ERROR__ commit 838c21e3b335ce0944321d16bf3617b983e1b156 Author: eight <eight04@gmail.com> Date: Sun Oct 14 02:36:20 2018 +0800 Fix: use findStyle API commit 93a4cdf595785690a830759a1b06138dec08d73a Author: eight <eight04@gmail.com> Date: Sun Oct 14 02:34:05 2018 +0800 Add: findStyle API commit 8e75871b9bf1b6c360e6f1dece9262d4510e6cb8 Author: eight <eight04@gmail.com> Date: Sun Oct 14 02:19:01 2018 +0800 Breaking: drop getStylesFallback commit ad06551440290ae43e86eca7ed78b824431daf1d Author: eight <eight04@gmail.com> Date: Sun Oct 14 02:16:48 2018 +0800 Fix: use dataurl to inject page script commit cb5cbb4d10c85624f03c0d6d3bd8f35c55318722 Author: eight <eight04@gmail.com> Date: Sun Oct 14 01:39:50 2018 +0800 Fix: various commit 53efd78b894bf73babae28f8ef9595dac4b79f7a Author: eight <eight04@gmail.com> Date: Sun Oct 14 01:12:57 2018 +0800 Update doc commit 7d005f3eaa35ea5328ecf608429de85b77dab34d Author: eight <eight04@gmail.com> Date: Sun Oct 14 01:09:22 2018 +0800 Change: kill style.reason commit fc53bed3de2ff3704609a40d8e736de7b8de6d18 Author: eight <eight04@gmail.com> Date: Sun Oct 14 00:56:04 2018 +0800 Fix: doo many indents commit 14e321d2582cef0c3e97e2723bc60ecc1d682ba8 Author: eight <eight04@gmail.com> Date: Sun Oct 14 00:40:23 2018 +0800 Fix: don't update icon for popup and options commit 01bdd529bc51b8dd780fcb500a4898115bc92b1d Author: eight <eight04@gmail.com> Date: Sun Oct 14 00:39:17 2018 +0800 Fix: updateCount commit b9968830d3f866688eaff4824d0ce47647265de0 Author: eight <eight04@gmail.com> Date: Sun Oct 14 00:38:49 2018 +0800 Fix: don't send null value commit ff3bf6f52d89f3b2e6f74b37b4a47dff5fd6cdfc Author: eight <eight04@gmail.com> Date: Sun Oct 14 00:03:34 2018 +0800 Add: styleViaAPI updateCount commit 39d21c3d29ad3507281e258d4539dfe4ef4ba124 Author: eight <eight04@gmail.com> Date: Sat Oct 13 23:57:45 2018 +0800 Fix: broadcastError -> ignoreError commit ecb622c93cf11fbfc47b8381a1c869ca9151582e Author: eight <eight04@gmail.com> Date: Sat Oct 13 21:29:06 2018 +0800 Fix: implement styleViaAPI commit 7c3d49c0051dc1d5a7be71acd9f08f8b3b09b901 Author: eight <eight04@gmail.com> Date: Sat Oct 13 17:50:28 2018 +0800 Fix: ROOT may change in XML pages commit 3fd8d937f31d643a5976406bc17e47d137ada890 Author: eight <eight04@gmail.com> Date: Sat Oct 13 16:49:43 2018 +0800 Fix: various commit 859afc8ee9c2d964e1cb9c9dbac7c1613cefef64 Author: eight <eight04@gmail.com> Date: Sat Oct 13 16:39:54 2018 +0800 Enhance: don't cache enabled state commit fbe77a8d15330cfd0d340c13eaf77a4c48d3c49f Author: eight <eight04@gmail.com> Date: Sat Oct 13 16:15:07 2018 +0800 Fix: various commit a4fc3e91622e7b9537a661490af92c6f6ee06398 Author: eight <eight04@gmail.com> Date: Sat Oct 13 16:11:38 2018 +0800 Fix: various commit 7e0eddeb8f03c42fb93db9bef633944dd1c82e57 Author: eight <eight04@gmail.com> Date: Sat Oct 13 15:58:31 2018 +0800 Fix: various commit 8b4ab47d897f5baee15f584a0dd289d38e5dc218 Author: eight <eight04@gmail.com> Date: Sat Oct 13 15:20:10 2018 +0800 Add: some type hint commit 7d340d62dcb7a25a1ccdc6648ab0683afbda917d Author: eight <eight04@gmail.com> Date: Sat Oct 13 15:13:11 2018 +0800 Change: drop storage.js, some functions are moved to sections-util commit d286997d6a64cd8601ed96e204514a5d532d5afd Author: eight <eight04@gmail.com> Date: Sat Oct 13 15:12:00 2018 +0800 Fix: minor commit d60db9dbef06baf4430aaea627406dc36b06debb Author: eight <eight04@gmail.com> Date: Sat Oct 13 15:03:10 2018 +0800 Fix: minor commit 43afa31fa0c47967ae695c9eb2492e5ddc33f85b Author: eight <eight04@gmail.com> Date: Sat Oct 13 14:50:31 2018 +0800 Fix: update tab icon on forward/backward commit f08faea149de3d63e1bcb404cb3e6cfa655dc24b Author: eight <eight04@gmail.com> Date: Sat Oct 13 13:50:03 2018 +0800 Fix: parallel import commit 4d064354869360b2bc011803bd229ec1e640a760 Author: eight <eight04@gmail.com> Date: Fri Oct 12 23:32:03 2018 +0800 Add: importStyle API commit c55675912e276139735037fc1968866eecd94a3f Author: eight <eight04@gmail.com> Date: Fri Oct 12 23:14:46 2018 +0800 Fix: refactor import-export commit 86ea846a89549b683711202799a53536e6e9dec2 Author: eight <eight04@gmail.com> Date: Fri Oct 12 17:34:36 2018 +0800 Fix: search db is broken commit 831ca07c2d770271bc069d599eaee47d9705cffe Author: eight <eight04@gmail.com> Date: Fri Oct 12 17:29:35 2018 +0800 fixup! Add: implement sloppy regexp indicator commit e67b7f4f36856ba26e08e37f91d9631aa77ec469 Author: eight <eight04@gmail.com> Date: Fri Oct 12 17:27:19 2018 +0800 Add: implement sloppy regexp indicator commit 36e13f88f00a3b01074ad4f41a1d1e056ee9c561 Author: eight <eight04@gmail.com> Date: Fri Oct 12 16:59:23 2018 +0800 Add: return excluded/sloppy state in getStylesInfoByUrl commit f6ce78f55b3012923e5a2f4315c642b5f9ab9f57 Author: eight <eight04@gmail.com> Date: Fri Oct 12 16:39:47 2018 +0800 Fix: dead object commit 5ae95a1ad95c95bb95073bc259d12f1329dc9c31 Author: eight <eight04@gmail.com> Date: Fri Oct 12 16:27:54 2018 +0800 Fix: don't reinit all editors on save commit 1a5a206fe62270c70239e5dce692f6f49578589c Author: eight <eight04@gmail.com> Date: Fri Oct 12 16:18:40 2018 +0800 Refactor: pull out sections editor section commit 8016346035b109214e974935d74831ca9cd4ff7d Author: eight <eight04@gmail.com> Date: Fri Oct 12 15:30:35 2018 +0800 Fix: replaceStyle make style name undefined commit fa080d191311a02f8b080e4e7cf28e2305c4c540 Author: eight <eight04@gmail.com> Date: Fri Oct 12 15:21:36 2018 +0800 Fix: catch csp error commit e0b064115dd26daf1e728e790761983b59db10fc Author: eight <eight04@gmail.com> Date: Fri Oct 12 15:03:00 2018 +0800 Fix: use a simple eval to execute page scripts commit 405b7f8f06968b1f588a6bdb45dfbaeb0b07305b Author: eight <eight04@gmail.com> Date: Fri Oct 12 03:48:13 2018 +0800 Fix: removed unused API commit 1b2c88f92635f8039dd7cc99fcae13ed0e4f8f4f Author: eight <eight04@gmail.com> Date: Fri Oct 12 03:46:51 2018 +0800 Fix: no need to access db commit a8131fc9c522577d0721798cd0f69c26d68165d3 Author: eight <eight04@gmail.com> Date: Fri Oct 12 03:43:31 2018 +0800 Fix: remove unused methods commit 3ae0c4dd134955055c12e18163c2e8b77999cfd8 Author: eight <eight04@gmail.com> Date: Fri Oct 12 03:10:26 2018 +0800 Enhance: allow matcher to return verbose info commit 0ea7ada48febd59a207f0eee24fbcbb03ae943b6 Author: eight <eight04@gmail.com> Date: Fri Oct 12 02:02:14 2018 +0800 Fix: content script may load before the background is ready commit 04c2d6bbf6d52b78b0fab046ddbacf9cb73ca248 Author: eight <eight04@gmail.com> Date: Fri Oct 12 01:49:52 2018 +0800 Fix: throw receiving end doesn't exist message commit f0c0bc4d6a5a720abfdc91fc92ef5973783c600f Author: eight <eight04@gmail.com> Date: Fri Oct 12 01:11:17 2018 +0800 Fix: unwrap error commit 4d42765d6ca989e04a39696c066e6e12b8f1197d Author: eight <eight04@gmail.com> Date: Thu Oct 11 23:55:16 2018 +0800 fixup! Fix: match subdomain commit 99626e4a48a008e0ddb6f90144965e88a65d2a79 Author: eight <eight04@gmail.com> Date: Thu Oct 11 23:54:58 2018 +0800 Fix: match subdomain commit a57b3b27160cb11b01db2c54e052cbabf6a7ab49 Author: eight <eight04@gmail.com> Date: Thu Oct 11 23:39:11 2018 +0800 Fix: firefox commit 5cfea3933f920822b638683ea234d4aa6866e2f4 Author: eight <eight04@gmail.com> Date: Thu Oct 11 22:46:34 2018 +0800 Add some comment to db.js commit 25fd3a1c2b52ace576a3e0ccfed39ff0393f5141 Author: eight <eight04@gmail.com> Date: Thu Oct 11 22:14:56 2018 +0800 Fix: remove unused prop commit bdae1c3697c698a84417886b0bfaaa54c975f5d4 Author: eight <eight04@gmail.com> Date: Thu Oct 11 20:00:25 2018 +0800 Change: simpler styleCodeEmpty commit bd4a453f458c7c5a782b53145a899e899beb1ae3 Merge: c1bf9f5 9058c06 Author: eight <eight04@gmail.com> Date: Thu Oct 11 19:49:37 2018 +0800 Merge branch 'dev-usercss-meta' into dev-exclusions commit c1bf9f57e908c33ab71ecef44d40c9c7471c036f Author: eight <eight04@gmail.com> Date: Thu Oct 11 19:29:17 2018 +0800 Fix: minor commit fd5eeb4b812b48fb19859d391bfc9658f265113a Author: eight <eight04@gmail.com> Date: Thu Oct 11 19:00:05 2018 +0800 Add: refresh on view commit 3e38810a495b6ba0e10f686f7691fd6dc94be3be Author: eight <eight04@gmail.com> Date: Thu Oct 11 18:13:24 2018 +0800 Fix: make sure icons are refreshed at startup commit c657d7e55c6b48fb5d8649f2488eeef04a936d40 Author: eight <eight04@gmail.com> Date: Thu Oct 11 17:32:27 2018 +0800 Add: implement bug 461 commit 7ed39ab6ef76efd412af42387aec4c24287f3dc7 Author: eight <eight04@gmail.com> Date: Thu Oct 11 15:42:44 2018 +0800 fixup! Add: icon-util commit 30e494eda9ba8167d9528c6d3e24b8446a12e4b8 Author: eight <eight04@gmail.com> Date: Thu Oct 11 15:42:23 2018 +0800 Add: icon-util commit 510a886e1445bcd5b2d72c01438a14a31cb230bd Author: eight <eight04@gmail.com> Date: Thu Oct 11 03:21:38 2018 +0800 Fix: exposeIframes commit c7f81662c43d2aaae0105a754236b96b1225d2ec Author: eight <eight04@gmail.com> Date: Thu Oct 11 02:19:14 2018 +0800 Fix: autoCloseBrackets is true by default commit f3a103645d777f0d8c191a8a74893b3548ecbb00 Author: eight <eight04@gmail.com> Date: Thu Oct 11 02:11:14 2018 +0800 Fix: various commit d4436cde2014fc3a63512da74866aaeb99f7c782 Author: eight <eight04@gmail.com> Date: Thu Oct 11 01:39:10 2018 +0800 Add: implement exposeIframe commit 43db875fd80ec851f1d72ad5589e39126a8d6391 Author: eight <eight04@gmail.com> Date: Thu Oct 11 01:26:24 2018 +0800 Kill more globals commit dc491e9be3ecdf8da516e6653df0030cab104fb9 Author: eight <eight04@gmail.com> Date: Thu Oct 11 01:22:13 2018 +0800 Kill old storage, storage-dummy commit ba64b95575349fdbba2b4592f81c709df1ed0262 Author: eight <eight04@gmail.com> Date: Thu Oct 11 00:54:38 2018 +0800 WIP: kill cachedStyles commit 7eba890a213f204da8f79afaccd07f37d2078096 Merge: d2b36a1 81e4823 Author: eight <eight04@gmail.com> Date: Wed Oct 10 23:15:14 2018 +0800 Merge branch 'dev-private-prefs' into dev-exclusions commit d2b36a168e967dcf48a11574af67bff997df9b6b Author: eight <eight04@gmail.com> Date: Wed Oct 10 23:05:20 2018 +0800 Kill hidden globals commit 22d4767511fb63e77f8f46e9361a998b7803b7fd Author: eight <eight04@gmail.com> Date: Wed Oct 10 19:23:34 2018 +0800 Fix: margin for deleted sections commit 00687983f0a6f277f2bcb2f60ea35575aaa3f734 Author: eight <eight04@gmail.com> Date: Wed Oct 10 18:21:07 2018 +0800 Fix: default value commit ff6fd8cad3dced164673e335ca1b5a6a9e477b94 Author: eight <eight04@gmail.com> Date: Wed Oct 10 18:02:51 2018 +0800 Fix: default options commit c23f315c52f658b7bf33f7a748f6287a710bd64b Author: eight <eight04@gmail.com> Date: Wed Oct 10 17:40:07 2018 +0800 Refactor: use CodeMirror.defineOption commit 4419c5dc1e584f420a3acd204b85fd0661442b27 Author: eight <eight04@gmail.com> Date: Wed Oct 10 16:32:39 2018 +0800 Change: kill editors, styleId commit 6494985b50c36add1569b71020285eb4eeb1a943 Author: eight <eight04@gmail.com> Date: Wed Oct 10 16:14:51 2018 +0800 Fix: various commit 37e1f43f75fe252c32b18fa91e83790860267f10 Author: eight <eight04@gmail.com> Date: Wed Oct 10 15:04:03 2018 +0800 Fix: minor commit d26ce3238e9beea602b4b47c4fd0184107712ce6 Author: eight <eight04@gmail.com> Date: Wed Oct 10 14:49:37 2018 +0800 Add: codemirror-factory commit 15a1f552f6f23ffedb7d22bed6ab306d4cc8ab27 Author: eight <eight04@gmail.com> Date: Wed Oct 10 12:08:35 2018 +0800 WIP: kill getSection commit ba6159e0677ca9da393cda68f6a72d00ab723a3b Author: eight <eight04@gmail.com> Date: Wed Oct 10 02:43:09 2018 +0800 WIP: edit page commit fd9ab5d6e50ef85cc6525c84aba4d5bb50b13f02 Author: eight <eight04@gmail.com> Date: Wed Oct 10 00:41:07 2018 +0800 Fix: switch to editor commit 06e22d0d186cc52dd7260173083406a6895a07c6 Author: eight <eight04@gmail.com> Date: Tue Oct 9 23:38:29 2018 +0800 Change: add sections-editor commit 30e86629468ecd02724c6aae076605b36495b33c Author: eight <eight04@gmail.com> Date: Mon Oct 8 20:12:39 2018 +0800 Add: preview error commit 47b2b4fc49dd0d6296ac4159410e84e19acfc226 Author: eight <eight04@gmail.com> Date: Mon Oct 8 18:38:01 2018 +0800 Add: livePreview.show commit 7b5e7c96d59df10531bbf81fe3bb682f9593aabf Author: eight <eight04@gmail.com> Date: Mon Oct 8 18:16:45 2018 +0800 Hook up live preview commit 15efafff3c55fbd5e08693849b370a1f8fa1ac38 Author: eight <eight04@gmail.com> Date: Mon Oct 8 17:49:57 2018 +0800 Add: live preview commit a38558ef786fccb7cbf46327be3036b608e286b1 Author: eight <eight04@gmail.com> Date: Mon Oct 8 15:30:39 2018 +0800 WIP: make notifyAllTabs a noop commit 582e9078af834a719b1ce04db09c63741b446380 Author: eight <eight04@gmail.com> Date: Mon Oct 8 14:39:08 2018 +0800 Fix: inject all scripts commit f4651da8d8fbf972d1124f695116c07e25cbd0b5 Author: eight <eight04@gmail.com> Date: Sun Oct 7 23:41:46 2018 +0800 Drop deleteStyle commit 0489fb3b2f2243ed99becc7c8fbe0da2e1424d97 Author: eight <eight04@gmail.com> Date: Sun Oct 7 23:33:51 2018 +0800 Drop saveStyle commit 02f471f07758db8753beed09c40aaba921940b77 Author: eight <eight04@gmail.com> Date: Sun Oct 7 23:28:41 2018 +0800 Fix: usercss API commit 057111b171ad414c9cd152bac03711b83073da68 Author: eight <eight04@gmail.com> Date: Sun Oct 7 22:59:31 2018 +0800 Update usercss API commit 69cae02381fc8f1f3e0b33cbda587f4705acdf1d Author: eight <eight04@gmail.com> Date: Sun Oct 7 21:40:29 2018 +0800 Drop getStyles commit c5d41529d9bae8d7f66f49afbedab8362079f66a Author: eight <eight04@gmail.com> Date: Sun Oct 7 21:28:51 2018 +0800 Minor fixes commit 5b3b4e680ff45331db1aa726c5d765b6e8cfc026 Author: eight <eight04@gmail.com> Date: Sun Oct 7 21:20:39 2018 +0800 Add: navigator-util commit b5107b78a5a02df2705771c9ee1fe0f2a6db5a5e Author: eight <eight04@gmail.com> Date: Sun Oct 7 01:42:43 2018 +0800 Add: broadcast messages with reasons commit e7ef4948cd4426bf592230b1670ddc6c50e336ca Author: eight <eight04@gmail.com> Date: Sat Oct 6 18:10:47 2018 +0800 Fix: observer is unavailable? commit 1c635b5bc1e8b5347c1171cb01a32852030c0a91 Author: eight <eight04@gmail.com> Date: Sat Oct 6 17:47:43 2018 +0800 Drop requestStyles commit 75f25611545d7d0735ecd5d84835a956b017ce48 Author: eight <eight04@gmail.com> Date: Sat Oct 6 16:38:04 2018 +0800 Fix: don't recreate element when style update in popup commit 583ca31d973e844ecb7287b1ae8fa9aeb94a0a67 Author: eight <eight04@gmail.com> Date: Sat Oct 6 15:40:07 2018 +0800 fixup! Add: isCodeEmpty commit 1cf6008514f9d402e8f12e7b58a92434243e0d25 Author: eight <eight04@gmail.com> Date: Sat Oct 6 15:33:18 2018 +0800 Add: isCodeEmpty commit 450cd60aeb28c3c99d69c8b37043554a840077bb Author: eight <eight04@gmail.com> Date: Sat Oct 6 15:22:04 2018 +0800 Fix: ignore comment block commit 196b6aac638664e8d7816d9558404fcfa10b2653 Author: eight <eight04@gmail.com> Date: Sat Oct 6 15:16:00 2018 +0800 Fix: the return value of getSectionsByUrl is changed commit 3122d28c1ada62e31fcc7076ec5487e4811cef1d Author: eight <eight04@gmail.com> Date: Sat Oct 6 15:14:05 2018 +0800 Fix: always use promise in API call commit e594b8ccb1d3c9f6f4dee06cb084c392423e6a37 Author: eight <eight04@gmail.com> Date: Sat Oct 6 15:11:01 2018 +0800 Cache enabled state commit 1f18b13a9241f848d68ffc622c3a6f816436fd1c Author: eight <eight04@gmail.com> Date: Sat Oct 6 13:48:46 2018 +0800 Add: match global sections commit fedf844ddd57d8c7bd9bc18ee6bc15359ff4123d Author: eight <eight04@gmail.com> Date: Sat Oct 6 13:45:37 2018 +0800 Add: getStylesInfoByUrl commit 095998f07c0e6ffa6c4552e88a3becf2450051c7 Author: eight <eight04@gmail.com> Date: Sat Oct 6 13:27:58 2018 +0800 Change: switch to msg.js commit fa3127d988b8aa09b059adb4aade25a502636ecf Author: eight <eight04@gmail.com> Date: Sat Oct 6 13:02:45 2018 +0800 Change: switch to msg.js commit 05d582c726642c5222cc2f039f39e1e5f1848499 Author: eight <eight04@gmail.com> Date: Sat Oct 6 11:43:42 2018 +0800 Add: msg.sendBg commit 171339f7109b5f795f37ec2af3a06c14e203b7ec Author: eight <eight04@gmail.com> Date: Sat Oct 6 04:39:48 2018 +0800 WIP: drop api.js commit 3a618aca2a0d19216cd655d66a4d7a4c5b1be07e Author: eight <eight04@gmail.com> Date: Sat Oct 6 03:19:51 2018 +0800 WIP: use deepCopy commit bb1cb580240c042bc3c16e5421810f25611dcd96 Author: eight <eight04@gmail.com> Date: Sat Oct 6 03:10:04 2018 +0800 WIP: msg.js commit 2472e91f5775f4246e9d8695a2c4c8b55cff4acc Author: eight <eight04@gmail.com> Date: Fri Oct 5 21:28:19 2018 +0800 WIP: emitChangesToTabs commit 34497ebe1669bb5811e26044dc4a544b79a497ee Author: eight <eight04@gmail.com> Date: Fri Oct 5 18:47:52 2018 +0800 WIP: switch to API commit f1639cc33ebd68d2e596963c5f8846fe478d9b27 Author: eight <eight04@gmail.com> Date: Fri Oct 5 01:03:40 2018 +0800 WIP: broadcastMessage commit 81e4823f4602226eaeb5126deca93b0618b7c153 Author: eight <eight04@gmail.com> Date: Thu Oct 4 19:39:59 2018 +0800 Debounce updateAllTabsIcon commit dc5f3e209fdc37136b947145ef0f808946de0780 Author: eight <eight04@gmail.com> Date: Thu Oct 4 19:34:36 2018 +0800 Fix: settings could be empty on the first install commit 2328cf623a06581edee5272ed0113c0a37d4f9c7 Author: eight <eight04@gmail.com> Date: Thu Oct 4 19:34:22 2018 +0800 Change: start-firefox -> start commit 7be6a1cba904252eedbfe178627ac41cca7ea785 Author: eight <eight04@gmail.com> Date: Thu Oct 4 19:24:35 2018 +0800 Add: applications commit 630725196f7fe042b954070d45733a0e0f24b3b1 Author: eight <eight04@gmail.com> Date: Thu Oct 4 19:22:44 2018 +0800 fixup! Fix: update all icons when some prefs changed commit 0d0e1b4dc07f2768ac98805a1f34b70bb18caa83 Author: eight <eight04@gmail.com> Date: Thu Oct 4 19:20:36 2018 +0800 Fix: update all icons when some prefs changed commit 5c0288e9baf6cb0ba2f0dbc535cfe41244aeeb6c Author: eight <eight04@gmail.com> Date: Thu Oct 4 19:20:11 2018 +0800 fixup! Remove unused FIREFOX_NO_DOM_STORAGE commit 56b737b65a61c38c4904a931de311d0fc8c7fd73 Author: eight <eight04@gmail.com> Date: Thu Oct 4 18:14:57 2018 +0800 Remove unused FIREFOX_NO_DOM_STORAGE commit 829a134ed101ae0e69c755862941987a2c894e6f Author: eight <eight04@gmail.com> Date: Thu Oct 4 18:10:53 2018 +0800 Fix: this -> prefs commit d35f92250e52c5347e49c2be10ac52d6379e789f Author: eight <eight04@gmail.com> Date: Thu Oct 4 18:08:19 2018 +0800 Fixme: styleViaAPI commit 8a6e8ac03a53746c838803addfcb619f67f4b832 Author: eight <eight04@gmail.com> Date: Thu Oct 4 18:05:41 2018 +0800 Change: drop prefChanged, use prefs service commit 10f9449144b87ac5733886bc03f53c7710629175 Author: eight <eight04@gmail.com> Date: Thu Oct 4 17:46:45 2018 +0800 Change: move setupLivePrefs to dom.js. Remove prefs.js dependencies commit dd2b8ed0918fcdece1a37b28d4f6351723bf83f9 Author: eight <eight04@gmail.com> Date: Thu Oct 4 17:18:38 2018 +0800 Fix: type error commit 3af310c3412d7f2f1e565d354191ea814731effa Author: eight <eight04@gmail.com> Date: Thu Oct 4 17:09:26 2018 +0800 Fix: open-manager has no default value commit 874a2da33e42f32d02f9d5e61ddbb3e6b1b0044e Author: eight <eight04@gmail.com> Date: Thu Oct 4 17:04:23 2018 +0800 Enhance: make prefs use storage.sync commit c01f93f62c0010faf9a884a3d2497ea56b002faf Author: eight <eight04@gmail.com> Date: Thu Oct 4 15:57:02 2018 +0800 WIP commit 6d32ffb76b267a939f1a0f5826d08339ff790939 Author: eight <eight04@gmail.com> Date: Thu Oct 4 12:46:19 2018 +0800 WIP commit 0f148eac32c759f4bdae3e2f69f38495f1a5a446 Author: eight <eight04@gmail.com> Date: Thu Oct 4 03:35:07 2018 +0800 WIP commit 282bdf77067a75f2959082152e913a84414a0625 Author: eight <eight04@gmail.com> Date: Wed Oct 3 20:24:06 2018 +0800 Fix: numbers are not compared correctly commit 24b1eea8a4a79b2a116658f375b60363ec429e70 Merge: 8a6011d 5cbe8a8 Author: eight <eight04@gmail.com> Date: Wed Oct 3 15:00:07 2018 +0800 Merge branch 'master' of https://github.com/openstyles/stylus into dev-exclusions commit 5cbe8a8d780a6eb9fce11d5846e92bf244c3a3f3 Author: eight <eight04@gmail.com> Date: Tue Oct 2 20:22:18 2018 +0800 Add: fetch style object from DB directly in the editor (#507) commit 9058c06c547203ab466785bc5a54ab94fc338e27 Author: eight <eight04@gmail.com> Date: Mon Oct 1 23:24:29 2018 +0800 Fix: bad API commit 1f2d116aae15b61212fa059eee356d94951ca6aa Author: eight <eight04@gmail.com> Date: Mon Oct 1 23:14:56 2018 +0800 Fix: use meta parser commit 918e47b1ed0f4ee0e4b075dd20c4b9704a2fef56 Author: eight <eight04@gmail.com> Date: Mon Oct 1 23:01:21 2018 +0800 Fix: emit update event if no fatal errors commit 81a7bb9ac925061586f458a5608400b8ad92006f Author: eight <eight04@gmail.com> Date: Mon Oct 1 22:56:25 2018 +0800 Add: editorWorker.metalint commit f47d57aea84af25f68a664e377a090eba949d472 Author: eight <eight04@gmail.com> Date: Mon Oct 1 22:49:16 2018 +0800 Change: use editorWorker.metalint commit 5778d5c8582cbb3c26e241b2ebcd3186af53dfa4 Author: eight <eight04@gmail.com> Date: Mon Oct 1 22:39:01 2018 +0800 Change: editor-worker-body -> editor-worker commit 268e1716b4bba9456d7fba7b742ce03ca1e93941 Author: eight <eight04@gmail.com> Date: Mon Oct 1 22:38:06 2018 +0800 Change: switch to worker-util commit cc2980b647547696f591cbd8731ab880275ede94 Author: eight <eight04@gmail.com> Date: Mon Oct 1 22:30:16 2018 +0800 Drop: parserlib-loader commit 08adcb60f2a4bc9b5e3f15c5ef533a3420851a5a Merge: 6909c73 2fd531e Author: eight <eight04@gmail.com> Date: Mon Oct 1 22:29:39 2018 +0800 Merge branch 'master' into dev-usercss-meta commit e4135ce35de2b264d7560b37ca2344f6f206db59 Author: eight <eight04@gmail.com> Date: Fri Sep 28 11:57:34 2018 +0800 Fix: remove unused function commit 39a6d1909f4fa7af53c7f5c00dbd5b8c2e083df9 Author: eight <eight04@gmail.com> Date: Fri Sep 28 00:26:29 2018 +0800 Fix: prefs doesn't work in FF's private windows. Add web-ext. Drop prefs.readOnlyValues commit 6909c73c698a81d4897af3a54cd73663ac012559 Author: eight <eight04@gmail.com> Date: Wed Sep 26 12:16:33 2018 +0800 Fix: minor commit 79833d8bba5994f30398d32d238fbe98854714d9 Author: eight <eight04@gmail.com> Date: Wed Sep 26 11:40:04 2018 +0800 Fix: a better way to draw list? commit a849fd6ddabf81ebde74d7c16dcd240249fbe289 Author: eight <eight04@gmail.com> Date: Wed Sep 26 11:39:53 2018 +0800 Fix: missing placeholders commit d5ee31a0801607fe548ba74a5c1f646e14f3cbb6 Author: eight <eight04@gmail.com> Date: Wed Sep 26 11:37:50 2018 +0800 Fix: a better way to draw character list? commit 7b959af3e36492c3b5ec129cade0823e2c05af4b Author: eight <eight04@gmail.com> Date: Wed Sep 26 11:30:10 2018 +0800 Update usercss-meta commit fefa987c4dfb9660d76d3ae26968209204570171 Author: eight <eight04@gmail.com> Date: Wed Sep 26 10:37:28 2018 +0800 Change: sections-equal -> sections-util commit 2abbf670d875b3249b6963115d03285aca3d44f9 Author: eight <eight04@gmail.com> Date: Wed Sep 26 10:37:14 2018 +0800 Fix: check err.code commit 1fe0586b2958b91c39cb1f486955cdcdc072ed78 Author: eight <eight04@gmail.com> Date: Wed Sep 26 10:33:02 2018 +0800 Add: i18n error message commit ab0ef239cf234fd4b6cefc2eed6e8fb442478069 Author: eight <eight04@gmail.com> Date: Wed Sep 26 09:34:57 2018 +0800 Change: move styleCodeEmpty to sections-util, load colorConverter in background worker commit d5ade807f0c7fc22ec331f9476b31efc63e90773 Author: eight <eight04@gmail.com> Date: Wed Sep 26 09:27:30 2018 +0800 Fix: display error message commit 4f5337e51dba0b0644348d67c02b9a90918b14e8 Author: eight <eight04@gmail.com> Date: Wed Sep 26 09:26:55 2018 +0800 Fix: remove unused colorconverter commit 29b8f512926b1f772fad26182748c4471cc19f7d Author: eight <eight04@gmail.com> Date: Tue Sep 25 23:21:44 2018 +0800 Fix: vars could be undefined commit a7cfeb22e45e5fb69a06d41ac133262c85ef08a5 Author: eight <eight04@gmail.com> Date: Tue Sep 25 22:54:40 2018 +0800 Fix: window is undefined commit 9713c6a3beedc1da8d0d111214e295e745d19956 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:56:38 2018 +0800 Fix: throw an error for unparsable color commit 3c30bc3eb014a9936d605425facbee4011ce4244 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:55:55 2018 +0800 Fix: try to get error message commit 3d32b0428bee83b04bc4f813e1f4a49efc2ca488 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:38:40 2018 +0800 Fix: vars might be empty commit 7d75dd87541925b738b1eb2bc5a6e1c5b38002ac Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:18:39 2018 +0800 Add: meta-parser commit a4df641b96d6d14fadeaeab3021d401c8c01d417 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:18:18 2018 +0800 Enhance: set flag in parserlib so we don't need another loader commit 8028a3529f212dd36c9cbb87967105ec25164ab9 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:17:40 2018 +0800 Include util, worker-util in background commit ba5d6cc31a7d6dbbd9e278c809ec17009c155bf8 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:16:59 2018 +0800 Fix: use spread syntax in loadScript commit b853be13f8f9eb182a127addade7570661d82171 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:14:46 2018 +0800 Enhance: swith to usercss-meta (in worker) commit a3e79151995283ba3dd68cd939e8066c5c48cbd8 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:11:54 2018 +0800 Fix: use promise API commit 5d07a8cd4e4789fb5352afe81a86081a71cb95de Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:11:09 2018 +0800 Fix: buildMeta now returns a promise commit a004bc3c7d462b6571e08ec80d72ed6aa1d8efd1 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:10:35 2018 +0800 Move styleCodeEmpty to util commit 41ac66a1378b92ca3da1d5c189f678a31438ff9c Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:09:40 2018 +0800 Add: background worker commit ffb13bf1db4b2dbd6d68183f16a9397ddd587b44 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:09:04 2018 +0800 Enhance: move moz-parser/meta-parser/usercss compiler to worker commit 42e97ef1532a4937e545ea7e0b7c5325066af62a Author: eight <eight04@gmail.com> Date: Tue Sep 25 20:45:07 2018 +0800 Fix: display error on install page commit 64aa9fcf538e31367a9443418c20aed1817b707a Author: eight <eight04@gmail.com> Date: Tue Sep 25 17:34:54 2018 +0800 Add: background worker commit b0e407e98fe4893be0b29cae21df6622c09d4e5f Author: eight <eight04@gmail.com> Date: Tue Sep 25 14:52:35 2018 +0800 Add: worker util commit 7a24547e09984327fdee20426412d0744150413a Author: eight <eight04@gmail.com> Date: Tue Sep 25 00:01:18 2018 +0800 Add: usercss-meta commit 8a6011de8cb75dc898ca765399493eeebc67fe22 Author: Rob Garrison <wowmotty@gmail.com> Date: Sun Jul 22 09:15:09 2018 -0500 Attempt to update icon count commit 4fcb1a88d7ee3fc43743eac25db363a7dcbc1ab9 Author: Rob Garrison <wowmotty@gmail.com> Date: Sun Jul 15 13:44:29 2018 -0500 Fix empty exclusion storage error commit bfe54ab4c4f167890ac4e64e2031991770ae813e Author: Rob Garrison <wowmotty@gmail.com> Date: Sun Jul 15 12:59:51 2018 -0500 Add tab communication commit 983a7bc219409c8feadf5e52cbcd8813f7b416ed Author: Rob Garrison <wowmotty@gmail.com> Date: Sun Jul 15 10:51:11 2018 -0500 Fix escaped regex example commit 3950482f3485a3c61892ccda4608fa7a2ff12421 Author: Rob Garrison <wowmotty@gmail.com> Date: Wed Apr 25 18:11:37 2018 -0500 Fix undefined error commit e94c7edb38c218d87c11f18c81e9f2446f564359 Author: Rob Garrison <wowmotty@gmail.com> Date: Wed Apr 25 17:09:45 2018 -0500 Attempt to fix popup exclusion issues commit 2b4a1a5635c8ea2f3df3981be166ba722b8bc411 Author: Rob Garrison <wowmotty@gmail.com> Date: Thu Apr 19 13:00:27 2018 -0500 Modify input method commit 9f75b69cd899f93f61dbd38a8ec9d2d094bdafd8 Author: Rob Garrison <wowmotty@gmail.com> Date: Wed Mar 7 11:54:05 2018 -0600 Include iframe urls in exclusion popup commit 68dfa0153cdaa72a522b617313bc90c32bf249b2 Author: Rob Garrison <wowmotty@gmail.com> Date: Wed Jan 24 19:42:02 2018 -0600 Add style exclusions. Closes #113 * Revert: exclusions * Fix: pass eslint * Fix: the style is injected twice * Fix: don't load script async * Fix: styleCodeEmpty returns true for empty string * Fix: drop array selection * Fix: the config dialog is broken * Fix: popup doesn't use getStyle/getStylesByUrl correctly * Fix: keep disabled state in setStyleContent * Fix: allow live-preview to assign newest vars * Fix: transition fix is broken because setStyleContent becomes async * Fix: typo, TypeError in styleExists * Fix: use new API * Fix: pass linter * Fix: LICENCE -> LICENSE * Fix: remove unused distroy function
2018-11-07 06:09:29 +00:00
API.deleteStyle(id);
}
});
const deleteButton = $('#message-box-buttons > button');
if (deleteButton) deleteButton.removeAttribute('data-focused-via-click');
},
external(event) {
if (event.shiftKey && !event.altKey && !event.ctrlKey && !event.metaKey) {
// Shift-click = the built-in 'open in a new window' action
return;
}
getOwnTab().then(({index}) => {
openURL({
url: event.target.closest('a').href,
index: index + 1,
active: !event.ctrlKey || event.shiftKey,
});
});
event.preventDefault();
},
expandTargets(event, entry) {
event.preventDefault();
if (!entry._allTargetsRendered) {
createStyleTargetsElement({entry, expanded: true});
setTimeout(getFaviconImgSrc, 0, entry);
}
this.closest('.applies-to').classList.toggle('expanded');
},
loadFavicons({all = false} = {}) {
if (!installed.firstElementChild) return;
let favicons = [];
if (all) {
favicons = $$('img[data-src]', installed);
} else {
const {left, top} = installed.firstElementChild.getBoundingClientRect();
const x = Math.max(0, left);
const y = Math.max(0, top);
const first = document.elementFromPoint(x, y);
const lastOffset = first.offsetTop + window.innerHeight;
const numTargets = newUI.targets;
let entry = first && first.closest('.entry') || installed.children[0];
while (entry && entry.offsetTop <= lastOffset) {
favicons.push(...$$('img', entry).slice(0, numTargets).filter(img => img.dataset.src));
entry = entry.nextElementSibling;
}
}
let i = 0;
for (const img of favicons) {
img.src = img.dataset.src;
delete img.dataset.src;
// loading too many icons at once will block the page while the new layout is recalculated
if (++i > 100) break;
}
if ($('img[data-src]', installed)) {
debounce(handleEvent.loadFavicons, 1, {all: true});
}
},
config(event, {styleMeta}) {
event.preventDefault();
configDialog(styleMeta);
},
2017-12-23 00:11:46 +00:00
lazyAddEntryTitle({type, target}) {
const cell = target.closest(REVEAL_DATES_FOR);
2017-12-23 00:11:46 +00:00
if (cell) {
const link = $('.style-name-link', cell) || cell;
2017-12-23 00:11:46 +00:00
if (type === 'mouseover' && !link.title) {
debounce(handleEvent.addEntryTitle, 50, link);
} else {
debounce.unregister(handleEvent.addEntryTitle);
}
}
},
addEntryTitle(link) {
const style = link.closest('.entry').styleMeta;
const ucd = style.usercssData;
link.title =
`${t('dateInstalled')}: ${t.formatDate(style.installDate) || '—'}\n` +
`${t('dateUpdated')}: ${t.formatDate(style.updateDate) || '—'}\n` +
(ucd ? `UserCSS, v.${ucd.version}` : '');
},
});
2015-01-30 17:31:20 +00:00
function handleBulkChange() {
for (const msg of bulkChangeQueue) {
const {id} = msg.style;
if (msg.method === 'styleDeleted') {
handleDelete(id);
2020-10-15 10:55:27 +00:00
bulkChangeQueue.time = performance.now();
} else {
handleUpdateForId(id, msg);
}
}
bulkChangeQueue.length = 0;
}
function handleUpdateForId(id, opts) {
return API.getStyle(id).then(style => {
handleUpdate(style, opts);
2020-10-15 10:55:27 +00:00
bulkChangeQueue.time = performance.now();
});
}
2018-07-21 18:04:47 +00:00
function handleUpdate(style, {reason, method} = {}) {
Refactor the entire storage system and the section editor (#518) * Squashed commit of the following: commit d84c4dc3fe29a87d0c49a109762d8dd5b3e39aa8 Author: eight <eight04@gmail.com> Date: Sun Oct 14 19:13:29 2018 +0800 Fix: remove unused comment commit 46027120ec4a3785f1674933a165fa0c226bc38d Author: eight <eight04@gmail.com> Date: Sun Oct 14 19:09:06 2018 +0800 Add: handle styleUpdated message commit f85d4de39b3ee2636c44ca46b3ee92045e43696a Author: eight <eight04@gmail.com> Date: Sun Oct 14 18:59:29 2018 +0800 Fix: handle styleAdded message in popup commit 81f3e69574bee2eeffd9d0a5bbb0811f49436520 Author: eight <eight04@gmail.com> Date: Sun Oct 14 18:50:54 2018 +0800 Change: getStylesInfoByUrl -> getStylesByUrl commit f9dc04558f7dd3c077259bbe762569940b035403 Author: eight <eight04@gmail.com> Date: Sun Oct 14 18:48:20 2018 +0800 Fix: drop getStylesInfo commit fea04d591fb79633112bfc605e552495b4cc41ef Author: eight <eight04@gmail.com> Date: Sun Oct 14 18:39:28 2018 +0800 Fix: remove unused ignoreChromeError commit 2aff14e2133fece25b136226961bd97d2d3e1ca2 Author: eight <eight04@gmail.com> Date: Sun Oct 14 18:09:53 2018 +0800 Fix: don't dup promisify in prefs commit d4ddfcc7137e3f14d4dcd72ea8353e0b6fdd8fb0 Author: eight <eight04@gmail.com> Date: Sun Oct 14 17:56:16 2018 +0800 Change: drop .last and .rotate commit 85e70491e413aca8fc8599e88f2e09ea5dde281d Author: eight <eight04@gmail.com> Date: Sun Oct 14 17:36:00 2018 +0800 Fix: unused renderIndex commit 7acb131642648767ea162ffd689ad4ca55d8724e Author: eight <eight04@gmail.com> Date: Sun Oct 14 17:32:49 2018 +0800 Fix: update title on input commit a39405ac4c32d5d38f4b70abd2ea54929d51eae2 Author: eight <eight04@gmail.com> Date: Sun Oct 14 17:17:20 2018 +0800 Fix: remove unused messages commit 14c2fdbb5886ee96f14367e660736e2a8ed3edb9 Author: eight <eight04@gmail.com> Date: Sun Oct 14 16:36:12 2018 +0800 Fix: dirty state for new added applies commit fb1b49b8bb7c0b4cd089d9a3b22dd744dea35f05 Author: eight <eight04@gmail.com> Date: Sun Oct 14 16:27:17 2018 +0800 Fix: minor commit 2c2d849fa46d3bdb83a191564b399dfb963083f1 Author: eight <eight04@gmail.com> Date: Sun Oct 14 16:20:14 2018 +0800 Fix: drop unused getCode commit f133c3e67a9ff969677f73b72267c34968c74190 Author: eight <eight04@gmail.com> Date: Sun Oct 14 16:18:14 2018 +0800 Fix: drop unused lastActive commit 05a6208f5c66e82827d692906d5a3f49dae66471 Author: eight <eight04@gmail.com> Date: Sun Oct 14 16:17:45 2018 +0800 Fix: minor commit 05a87ed00f650f4e92a31a655f471c7f3580ad71 Author: eight <eight04@gmail.com> Date: Sun Oct 14 15:58:33 2018 +0800 Fix: minor commit 576f73f3336e5f68aab2adad3ad79c7920f4ae8c Author: eight <eight04@gmail.com> Date: Sun Oct 14 03:03:35 2018 +0800 Fix: always register listeners commit e93819deb4515f9f2d9116cfea6b21aa05c8dd72 Author: eight <eight04@gmail.com> Date: Sun Oct 14 02:58:49 2018 +0800 Fix: unused statement commit 39b11685b494bd90c6cfd64ff85d9a4c6d9f5bef Author: eight <eight04@gmail.com> Date: Sun Oct 14 02:54:29 2018 +0800 Fix: minor commit 9dd3cd43c166e9e98389f06db25775e2c7355cfe Author: eight <eight04@gmail.com> Date: Sun Oct 14 02:49:22 2018 +0800 Fix: don't reorder options commit 90aadfd7283ed86ac359fbd4b300d548db8b298e Author: eight <eight04@gmail.com> Date: Sun Oct 14 02:43:52 2018 +0800 Fix: drop __ERROR__ commit 838c21e3b335ce0944321d16bf3617b983e1b156 Author: eight <eight04@gmail.com> Date: Sun Oct 14 02:36:20 2018 +0800 Fix: use findStyle API commit 93a4cdf595785690a830759a1b06138dec08d73a Author: eight <eight04@gmail.com> Date: Sun Oct 14 02:34:05 2018 +0800 Add: findStyle API commit 8e75871b9bf1b6c360e6f1dece9262d4510e6cb8 Author: eight <eight04@gmail.com> Date: Sun Oct 14 02:19:01 2018 +0800 Breaking: drop getStylesFallback commit ad06551440290ae43e86eca7ed78b824431daf1d Author: eight <eight04@gmail.com> Date: Sun Oct 14 02:16:48 2018 +0800 Fix: use dataurl to inject page script commit cb5cbb4d10c85624f03c0d6d3bd8f35c55318722 Author: eight <eight04@gmail.com> Date: Sun Oct 14 01:39:50 2018 +0800 Fix: various commit 53efd78b894bf73babae28f8ef9595dac4b79f7a Author: eight <eight04@gmail.com> Date: Sun Oct 14 01:12:57 2018 +0800 Update doc commit 7d005f3eaa35ea5328ecf608429de85b77dab34d Author: eight <eight04@gmail.com> Date: Sun Oct 14 01:09:22 2018 +0800 Change: kill style.reason commit fc53bed3de2ff3704609a40d8e736de7b8de6d18 Author: eight <eight04@gmail.com> Date: Sun Oct 14 00:56:04 2018 +0800 Fix: doo many indents commit 14e321d2582cef0c3e97e2723bc60ecc1d682ba8 Author: eight <eight04@gmail.com> Date: Sun Oct 14 00:40:23 2018 +0800 Fix: don't update icon for popup and options commit 01bdd529bc51b8dd780fcb500a4898115bc92b1d Author: eight <eight04@gmail.com> Date: Sun Oct 14 00:39:17 2018 +0800 Fix: updateCount commit b9968830d3f866688eaff4824d0ce47647265de0 Author: eight <eight04@gmail.com> Date: Sun Oct 14 00:38:49 2018 +0800 Fix: don't send null value commit ff3bf6f52d89f3b2e6f74b37b4a47dff5fd6cdfc Author: eight <eight04@gmail.com> Date: Sun Oct 14 00:03:34 2018 +0800 Add: styleViaAPI updateCount commit 39d21c3d29ad3507281e258d4539dfe4ef4ba124 Author: eight <eight04@gmail.com> Date: Sat Oct 13 23:57:45 2018 +0800 Fix: broadcastError -> ignoreError commit ecb622c93cf11fbfc47b8381a1c869ca9151582e Author: eight <eight04@gmail.com> Date: Sat Oct 13 21:29:06 2018 +0800 Fix: implement styleViaAPI commit 7c3d49c0051dc1d5a7be71acd9f08f8b3b09b901 Author: eight <eight04@gmail.com> Date: Sat Oct 13 17:50:28 2018 +0800 Fix: ROOT may change in XML pages commit 3fd8d937f31d643a5976406bc17e47d137ada890 Author: eight <eight04@gmail.com> Date: Sat Oct 13 16:49:43 2018 +0800 Fix: various commit 859afc8ee9c2d964e1cb9c9dbac7c1613cefef64 Author: eight <eight04@gmail.com> Date: Sat Oct 13 16:39:54 2018 +0800 Enhance: don't cache enabled state commit fbe77a8d15330cfd0d340c13eaf77a4c48d3c49f Author: eight <eight04@gmail.com> Date: Sat Oct 13 16:15:07 2018 +0800 Fix: various commit a4fc3e91622e7b9537a661490af92c6f6ee06398 Author: eight <eight04@gmail.com> Date: Sat Oct 13 16:11:38 2018 +0800 Fix: various commit 7e0eddeb8f03c42fb93db9bef633944dd1c82e57 Author: eight <eight04@gmail.com> Date: Sat Oct 13 15:58:31 2018 +0800 Fix: various commit 8b4ab47d897f5baee15f584a0dd289d38e5dc218 Author: eight <eight04@gmail.com> Date: Sat Oct 13 15:20:10 2018 +0800 Add: some type hint commit 7d340d62dcb7a25a1ccdc6648ab0683afbda917d Author: eight <eight04@gmail.com> Date: Sat Oct 13 15:13:11 2018 +0800 Change: drop storage.js, some functions are moved to sections-util commit d286997d6a64cd8601ed96e204514a5d532d5afd Author: eight <eight04@gmail.com> Date: Sat Oct 13 15:12:00 2018 +0800 Fix: minor commit d60db9dbef06baf4430aaea627406dc36b06debb Author: eight <eight04@gmail.com> Date: Sat Oct 13 15:03:10 2018 +0800 Fix: minor commit 43afa31fa0c47967ae695c9eb2492e5ddc33f85b Author: eight <eight04@gmail.com> Date: Sat Oct 13 14:50:31 2018 +0800 Fix: update tab icon on forward/backward commit f08faea149de3d63e1bcb404cb3e6cfa655dc24b Author: eight <eight04@gmail.com> Date: Sat Oct 13 13:50:03 2018 +0800 Fix: parallel import commit 4d064354869360b2bc011803bd229ec1e640a760 Author: eight <eight04@gmail.com> Date: Fri Oct 12 23:32:03 2018 +0800 Add: importStyle API commit c55675912e276139735037fc1968866eecd94a3f Author: eight <eight04@gmail.com> Date: Fri Oct 12 23:14:46 2018 +0800 Fix: refactor import-export commit 86ea846a89549b683711202799a53536e6e9dec2 Author: eight <eight04@gmail.com> Date: Fri Oct 12 17:34:36 2018 +0800 Fix: search db is broken commit 831ca07c2d770271bc069d599eaee47d9705cffe Author: eight <eight04@gmail.com> Date: Fri Oct 12 17:29:35 2018 +0800 fixup! Add: implement sloppy regexp indicator commit e67b7f4f36856ba26e08e37f91d9631aa77ec469 Author: eight <eight04@gmail.com> Date: Fri Oct 12 17:27:19 2018 +0800 Add: implement sloppy regexp indicator commit 36e13f88f00a3b01074ad4f41a1d1e056ee9c561 Author: eight <eight04@gmail.com> Date: Fri Oct 12 16:59:23 2018 +0800 Add: return excluded/sloppy state in getStylesInfoByUrl commit f6ce78f55b3012923e5a2f4315c642b5f9ab9f57 Author: eight <eight04@gmail.com> Date: Fri Oct 12 16:39:47 2018 +0800 Fix: dead object commit 5ae95a1ad95c95bb95073bc259d12f1329dc9c31 Author: eight <eight04@gmail.com> Date: Fri Oct 12 16:27:54 2018 +0800 Fix: don't reinit all editors on save commit 1a5a206fe62270c70239e5dce692f6f49578589c Author: eight <eight04@gmail.com> Date: Fri Oct 12 16:18:40 2018 +0800 Refactor: pull out sections editor section commit 8016346035b109214e974935d74831ca9cd4ff7d Author: eight <eight04@gmail.com> Date: Fri Oct 12 15:30:35 2018 +0800 Fix: replaceStyle make style name undefined commit fa080d191311a02f8b080e4e7cf28e2305c4c540 Author: eight <eight04@gmail.com> Date: Fri Oct 12 15:21:36 2018 +0800 Fix: catch csp error commit e0b064115dd26daf1e728e790761983b59db10fc Author: eight <eight04@gmail.com> Date: Fri Oct 12 15:03:00 2018 +0800 Fix: use a simple eval to execute page scripts commit 405b7f8f06968b1f588a6bdb45dfbaeb0b07305b Author: eight <eight04@gmail.com> Date: Fri Oct 12 03:48:13 2018 +0800 Fix: removed unused API commit 1b2c88f92635f8039dd7cc99fcae13ed0e4f8f4f Author: eight <eight04@gmail.com> Date: Fri Oct 12 03:46:51 2018 +0800 Fix: no need to access db commit a8131fc9c522577d0721798cd0f69c26d68165d3 Author: eight <eight04@gmail.com> Date: Fri Oct 12 03:43:31 2018 +0800 Fix: remove unused methods commit 3ae0c4dd134955055c12e18163c2e8b77999cfd8 Author: eight <eight04@gmail.com> Date: Fri Oct 12 03:10:26 2018 +0800 Enhance: allow matcher to return verbose info commit 0ea7ada48febd59a207f0eee24fbcbb03ae943b6 Author: eight <eight04@gmail.com> Date: Fri Oct 12 02:02:14 2018 +0800 Fix: content script may load before the background is ready commit 04c2d6bbf6d52b78b0fab046ddbacf9cb73ca248 Author: eight <eight04@gmail.com> Date: Fri Oct 12 01:49:52 2018 +0800 Fix: throw receiving end doesn't exist message commit f0c0bc4d6a5a720abfdc91fc92ef5973783c600f Author: eight <eight04@gmail.com> Date: Fri Oct 12 01:11:17 2018 +0800 Fix: unwrap error commit 4d42765d6ca989e04a39696c066e6e12b8f1197d Author: eight <eight04@gmail.com> Date: Thu Oct 11 23:55:16 2018 +0800 fixup! Fix: match subdomain commit 99626e4a48a008e0ddb6f90144965e88a65d2a79 Author: eight <eight04@gmail.com> Date: Thu Oct 11 23:54:58 2018 +0800 Fix: match subdomain commit a57b3b27160cb11b01db2c54e052cbabf6a7ab49 Author: eight <eight04@gmail.com> Date: Thu Oct 11 23:39:11 2018 +0800 Fix: firefox commit 5cfea3933f920822b638683ea234d4aa6866e2f4 Author: eight <eight04@gmail.com> Date: Thu Oct 11 22:46:34 2018 +0800 Add some comment to db.js commit 25fd3a1c2b52ace576a3e0ccfed39ff0393f5141 Author: eight <eight04@gmail.com> Date: Thu Oct 11 22:14:56 2018 +0800 Fix: remove unused prop commit bdae1c3697c698a84417886b0bfaaa54c975f5d4 Author: eight <eight04@gmail.com> Date: Thu Oct 11 20:00:25 2018 +0800 Change: simpler styleCodeEmpty commit bd4a453f458c7c5a782b53145a899e899beb1ae3 Merge: c1bf9f5 9058c06 Author: eight <eight04@gmail.com> Date: Thu Oct 11 19:49:37 2018 +0800 Merge branch 'dev-usercss-meta' into dev-exclusions commit c1bf9f57e908c33ab71ecef44d40c9c7471c036f Author: eight <eight04@gmail.com> Date: Thu Oct 11 19:29:17 2018 +0800 Fix: minor commit fd5eeb4b812b48fb19859d391bfc9658f265113a Author: eight <eight04@gmail.com> Date: Thu Oct 11 19:00:05 2018 +0800 Add: refresh on view commit 3e38810a495b6ba0e10f686f7691fd6dc94be3be Author: eight <eight04@gmail.com> Date: Thu Oct 11 18:13:24 2018 +0800 Fix: make sure icons are refreshed at startup commit c657d7e55c6b48fb5d8649f2488eeef04a936d40 Author: eight <eight04@gmail.com> Date: Thu Oct 11 17:32:27 2018 +0800 Add: implement bug 461 commit 7ed39ab6ef76efd412af42387aec4c24287f3dc7 Author: eight <eight04@gmail.com> Date: Thu Oct 11 15:42:44 2018 +0800 fixup! Add: icon-util commit 30e494eda9ba8167d9528c6d3e24b8446a12e4b8 Author: eight <eight04@gmail.com> Date: Thu Oct 11 15:42:23 2018 +0800 Add: icon-util commit 510a886e1445bcd5b2d72c01438a14a31cb230bd Author: eight <eight04@gmail.com> Date: Thu Oct 11 03:21:38 2018 +0800 Fix: exposeIframes commit c7f81662c43d2aaae0105a754236b96b1225d2ec Author: eight <eight04@gmail.com> Date: Thu Oct 11 02:19:14 2018 +0800 Fix: autoCloseBrackets is true by default commit f3a103645d777f0d8c191a8a74893b3548ecbb00 Author: eight <eight04@gmail.com> Date: Thu Oct 11 02:11:14 2018 +0800 Fix: various commit d4436cde2014fc3a63512da74866aaeb99f7c782 Author: eight <eight04@gmail.com> Date: Thu Oct 11 01:39:10 2018 +0800 Add: implement exposeIframe commit 43db875fd80ec851f1d72ad5589e39126a8d6391 Author: eight <eight04@gmail.com> Date: Thu Oct 11 01:26:24 2018 +0800 Kill more globals commit dc491e9be3ecdf8da516e6653df0030cab104fb9 Author: eight <eight04@gmail.com> Date: Thu Oct 11 01:22:13 2018 +0800 Kill old storage, storage-dummy commit ba64b95575349fdbba2b4592f81c709df1ed0262 Author: eight <eight04@gmail.com> Date: Thu Oct 11 00:54:38 2018 +0800 WIP: kill cachedStyles commit 7eba890a213f204da8f79afaccd07f37d2078096 Merge: d2b36a1 81e4823 Author: eight <eight04@gmail.com> Date: Wed Oct 10 23:15:14 2018 +0800 Merge branch 'dev-private-prefs' into dev-exclusions commit d2b36a168e967dcf48a11574af67bff997df9b6b Author: eight <eight04@gmail.com> Date: Wed Oct 10 23:05:20 2018 +0800 Kill hidden globals commit 22d4767511fb63e77f8f46e9361a998b7803b7fd Author: eight <eight04@gmail.com> Date: Wed Oct 10 19:23:34 2018 +0800 Fix: margin for deleted sections commit 00687983f0a6f277f2bcb2f60ea35575aaa3f734 Author: eight <eight04@gmail.com> Date: Wed Oct 10 18:21:07 2018 +0800 Fix: default value commit ff6fd8cad3dced164673e335ca1b5a6a9e477b94 Author: eight <eight04@gmail.com> Date: Wed Oct 10 18:02:51 2018 +0800 Fix: default options commit c23f315c52f658b7bf33f7a748f6287a710bd64b Author: eight <eight04@gmail.com> Date: Wed Oct 10 17:40:07 2018 +0800 Refactor: use CodeMirror.defineOption commit 4419c5dc1e584f420a3acd204b85fd0661442b27 Author: eight <eight04@gmail.com> Date: Wed Oct 10 16:32:39 2018 +0800 Change: kill editors, styleId commit 6494985b50c36add1569b71020285eb4eeb1a943 Author: eight <eight04@gmail.com> Date: Wed Oct 10 16:14:51 2018 +0800 Fix: various commit 37e1f43f75fe252c32b18fa91e83790860267f10 Author: eight <eight04@gmail.com> Date: Wed Oct 10 15:04:03 2018 +0800 Fix: minor commit d26ce3238e9beea602b4b47c4fd0184107712ce6 Author: eight <eight04@gmail.com> Date: Wed Oct 10 14:49:37 2018 +0800 Add: codemirror-factory commit 15a1f552f6f23ffedb7d22bed6ab306d4cc8ab27 Author: eight <eight04@gmail.com> Date: Wed Oct 10 12:08:35 2018 +0800 WIP: kill getSection commit ba6159e0677ca9da393cda68f6a72d00ab723a3b Author: eight <eight04@gmail.com> Date: Wed Oct 10 02:43:09 2018 +0800 WIP: edit page commit fd9ab5d6e50ef85cc6525c84aba4d5bb50b13f02 Author: eight <eight04@gmail.com> Date: Wed Oct 10 00:41:07 2018 +0800 Fix: switch to editor commit 06e22d0d186cc52dd7260173083406a6895a07c6 Author: eight <eight04@gmail.com> Date: Tue Oct 9 23:38:29 2018 +0800 Change: add sections-editor commit 30e86629468ecd02724c6aae076605b36495b33c Author: eight <eight04@gmail.com> Date: Mon Oct 8 20:12:39 2018 +0800 Add: preview error commit 47b2b4fc49dd0d6296ac4159410e84e19acfc226 Author: eight <eight04@gmail.com> Date: Mon Oct 8 18:38:01 2018 +0800 Add: livePreview.show commit 7b5e7c96d59df10531bbf81fe3bb682f9593aabf Author: eight <eight04@gmail.com> Date: Mon Oct 8 18:16:45 2018 +0800 Hook up live preview commit 15efafff3c55fbd5e08693849b370a1f8fa1ac38 Author: eight <eight04@gmail.com> Date: Mon Oct 8 17:49:57 2018 +0800 Add: live preview commit a38558ef786fccb7cbf46327be3036b608e286b1 Author: eight <eight04@gmail.com> Date: Mon Oct 8 15:30:39 2018 +0800 WIP: make notifyAllTabs a noop commit 582e9078af834a719b1ce04db09c63741b446380 Author: eight <eight04@gmail.com> Date: Mon Oct 8 14:39:08 2018 +0800 Fix: inject all scripts commit f4651da8d8fbf972d1124f695116c07e25cbd0b5 Author: eight <eight04@gmail.com> Date: Sun Oct 7 23:41:46 2018 +0800 Drop deleteStyle commit 0489fb3b2f2243ed99becc7c8fbe0da2e1424d97 Author: eight <eight04@gmail.com> Date: Sun Oct 7 23:33:51 2018 +0800 Drop saveStyle commit 02f471f07758db8753beed09c40aaba921940b77 Author: eight <eight04@gmail.com> Date: Sun Oct 7 23:28:41 2018 +0800 Fix: usercss API commit 057111b171ad414c9cd152bac03711b83073da68 Author: eight <eight04@gmail.com> Date: Sun Oct 7 22:59:31 2018 +0800 Update usercss API commit 69cae02381fc8f1f3e0b33cbda587f4705acdf1d Author: eight <eight04@gmail.com> Date: Sun Oct 7 21:40:29 2018 +0800 Drop getStyles commit c5d41529d9bae8d7f66f49afbedab8362079f66a Author: eight <eight04@gmail.com> Date: Sun Oct 7 21:28:51 2018 +0800 Minor fixes commit 5b3b4e680ff45331db1aa726c5d765b6e8cfc026 Author: eight <eight04@gmail.com> Date: Sun Oct 7 21:20:39 2018 +0800 Add: navigator-util commit b5107b78a5a02df2705771c9ee1fe0f2a6db5a5e Author: eight <eight04@gmail.com> Date: Sun Oct 7 01:42:43 2018 +0800 Add: broadcast messages with reasons commit e7ef4948cd4426bf592230b1670ddc6c50e336ca Author: eight <eight04@gmail.com> Date: Sat Oct 6 18:10:47 2018 +0800 Fix: observer is unavailable? commit 1c635b5bc1e8b5347c1171cb01a32852030c0a91 Author: eight <eight04@gmail.com> Date: Sat Oct 6 17:47:43 2018 +0800 Drop requestStyles commit 75f25611545d7d0735ecd5d84835a956b017ce48 Author: eight <eight04@gmail.com> Date: Sat Oct 6 16:38:04 2018 +0800 Fix: don't recreate element when style update in popup commit 583ca31d973e844ecb7287b1ae8fa9aeb94a0a67 Author: eight <eight04@gmail.com> Date: Sat Oct 6 15:40:07 2018 +0800 fixup! Add: isCodeEmpty commit 1cf6008514f9d402e8f12e7b58a92434243e0d25 Author: eight <eight04@gmail.com> Date: Sat Oct 6 15:33:18 2018 +0800 Add: isCodeEmpty commit 450cd60aeb28c3c99d69c8b37043554a840077bb Author: eight <eight04@gmail.com> Date: Sat Oct 6 15:22:04 2018 +0800 Fix: ignore comment block commit 196b6aac638664e8d7816d9558404fcfa10b2653 Author: eight <eight04@gmail.com> Date: Sat Oct 6 15:16:00 2018 +0800 Fix: the return value of getSectionsByUrl is changed commit 3122d28c1ada62e31fcc7076ec5487e4811cef1d Author: eight <eight04@gmail.com> Date: Sat Oct 6 15:14:05 2018 +0800 Fix: always use promise in API call commit e594b8ccb1d3c9f6f4dee06cb084c392423e6a37 Author: eight <eight04@gmail.com> Date: Sat Oct 6 15:11:01 2018 +0800 Cache enabled state commit 1f18b13a9241f848d68ffc622c3a6f816436fd1c Author: eight <eight04@gmail.com> Date: Sat Oct 6 13:48:46 2018 +0800 Add: match global sections commit fedf844ddd57d8c7bd9bc18ee6bc15359ff4123d Author: eight <eight04@gmail.com> Date: Sat Oct 6 13:45:37 2018 +0800 Add: getStylesInfoByUrl commit 095998f07c0e6ffa6c4552e88a3becf2450051c7 Author: eight <eight04@gmail.com> Date: Sat Oct 6 13:27:58 2018 +0800 Change: switch to msg.js commit fa3127d988b8aa09b059adb4aade25a502636ecf Author: eight <eight04@gmail.com> Date: Sat Oct 6 13:02:45 2018 +0800 Change: switch to msg.js commit 05d582c726642c5222cc2f039f39e1e5f1848499 Author: eight <eight04@gmail.com> Date: Sat Oct 6 11:43:42 2018 +0800 Add: msg.sendBg commit 171339f7109b5f795f37ec2af3a06c14e203b7ec Author: eight <eight04@gmail.com> Date: Sat Oct 6 04:39:48 2018 +0800 WIP: drop api.js commit 3a618aca2a0d19216cd655d66a4d7a4c5b1be07e Author: eight <eight04@gmail.com> Date: Sat Oct 6 03:19:51 2018 +0800 WIP: use deepCopy commit bb1cb580240c042bc3c16e5421810f25611dcd96 Author: eight <eight04@gmail.com> Date: Sat Oct 6 03:10:04 2018 +0800 WIP: msg.js commit 2472e91f5775f4246e9d8695a2c4c8b55cff4acc Author: eight <eight04@gmail.com> Date: Fri Oct 5 21:28:19 2018 +0800 WIP: emitChangesToTabs commit 34497ebe1669bb5811e26044dc4a544b79a497ee Author: eight <eight04@gmail.com> Date: Fri Oct 5 18:47:52 2018 +0800 WIP: switch to API commit f1639cc33ebd68d2e596963c5f8846fe478d9b27 Author: eight <eight04@gmail.com> Date: Fri Oct 5 01:03:40 2018 +0800 WIP: broadcastMessage commit 81e4823f4602226eaeb5126deca93b0618b7c153 Author: eight <eight04@gmail.com> Date: Thu Oct 4 19:39:59 2018 +0800 Debounce updateAllTabsIcon commit dc5f3e209fdc37136b947145ef0f808946de0780 Author: eight <eight04@gmail.com> Date: Thu Oct 4 19:34:36 2018 +0800 Fix: settings could be empty on the first install commit 2328cf623a06581edee5272ed0113c0a37d4f9c7 Author: eight <eight04@gmail.com> Date: Thu Oct 4 19:34:22 2018 +0800 Change: start-firefox -> start commit 7be6a1cba904252eedbfe178627ac41cca7ea785 Author: eight <eight04@gmail.com> Date: Thu Oct 4 19:24:35 2018 +0800 Add: applications commit 630725196f7fe042b954070d45733a0e0f24b3b1 Author: eight <eight04@gmail.com> Date: Thu Oct 4 19:22:44 2018 +0800 fixup! Fix: update all icons when some prefs changed commit 0d0e1b4dc07f2768ac98805a1f34b70bb18caa83 Author: eight <eight04@gmail.com> Date: Thu Oct 4 19:20:36 2018 +0800 Fix: update all icons when some prefs changed commit 5c0288e9baf6cb0ba2f0dbc535cfe41244aeeb6c Author: eight <eight04@gmail.com> Date: Thu Oct 4 19:20:11 2018 +0800 fixup! Remove unused FIREFOX_NO_DOM_STORAGE commit 56b737b65a61c38c4904a931de311d0fc8c7fd73 Author: eight <eight04@gmail.com> Date: Thu Oct 4 18:14:57 2018 +0800 Remove unused FIREFOX_NO_DOM_STORAGE commit 829a134ed101ae0e69c755862941987a2c894e6f Author: eight <eight04@gmail.com> Date: Thu Oct 4 18:10:53 2018 +0800 Fix: this -> prefs commit d35f92250e52c5347e49c2be10ac52d6379e789f Author: eight <eight04@gmail.com> Date: Thu Oct 4 18:08:19 2018 +0800 Fixme: styleViaAPI commit 8a6e8ac03a53746c838803addfcb619f67f4b832 Author: eight <eight04@gmail.com> Date: Thu Oct 4 18:05:41 2018 +0800 Change: drop prefChanged, use prefs service commit 10f9449144b87ac5733886bc03f53c7710629175 Author: eight <eight04@gmail.com> Date: Thu Oct 4 17:46:45 2018 +0800 Change: move setupLivePrefs to dom.js. Remove prefs.js dependencies commit dd2b8ed0918fcdece1a37b28d4f6351723bf83f9 Author: eight <eight04@gmail.com> Date: Thu Oct 4 17:18:38 2018 +0800 Fix: type error commit 3af310c3412d7f2f1e565d354191ea814731effa Author: eight <eight04@gmail.com> Date: Thu Oct 4 17:09:26 2018 +0800 Fix: open-manager has no default value commit 874a2da33e42f32d02f9d5e61ddbb3e6b1b0044e Author: eight <eight04@gmail.com> Date: Thu Oct 4 17:04:23 2018 +0800 Enhance: make prefs use storage.sync commit c01f93f62c0010faf9a884a3d2497ea56b002faf Author: eight <eight04@gmail.com> Date: Thu Oct 4 15:57:02 2018 +0800 WIP commit 6d32ffb76b267a939f1a0f5826d08339ff790939 Author: eight <eight04@gmail.com> Date: Thu Oct 4 12:46:19 2018 +0800 WIP commit 0f148eac32c759f4bdae3e2f69f38495f1a5a446 Author: eight <eight04@gmail.com> Date: Thu Oct 4 03:35:07 2018 +0800 WIP commit 282bdf77067a75f2959082152e913a84414a0625 Author: eight <eight04@gmail.com> Date: Wed Oct 3 20:24:06 2018 +0800 Fix: numbers are not compared correctly commit 24b1eea8a4a79b2a116658f375b60363ec429e70 Merge: 8a6011d 5cbe8a8 Author: eight <eight04@gmail.com> Date: Wed Oct 3 15:00:07 2018 +0800 Merge branch 'master' of https://github.com/openstyles/stylus into dev-exclusions commit 5cbe8a8d780a6eb9fce11d5846e92bf244c3a3f3 Author: eight <eight04@gmail.com> Date: Tue Oct 2 20:22:18 2018 +0800 Add: fetch style object from DB directly in the editor (#507) commit 9058c06c547203ab466785bc5a54ab94fc338e27 Author: eight <eight04@gmail.com> Date: Mon Oct 1 23:24:29 2018 +0800 Fix: bad API commit 1f2d116aae15b61212fa059eee356d94951ca6aa Author: eight <eight04@gmail.com> Date: Mon Oct 1 23:14:56 2018 +0800 Fix: use meta parser commit 918e47b1ed0f4ee0e4b075dd20c4b9704a2fef56 Author: eight <eight04@gmail.com> Date: Mon Oct 1 23:01:21 2018 +0800 Fix: emit update event if no fatal errors commit 81a7bb9ac925061586f458a5608400b8ad92006f Author: eight <eight04@gmail.com> Date: Mon Oct 1 22:56:25 2018 +0800 Add: editorWorker.metalint commit f47d57aea84af25f68a664e377a090eba949d472 Author: eight <eight04@gmail.com> Date: Mon Oct 1 22:49:16 2018 +0800 Change: use editorWorker.metalint commit 5778d5c8582cbb3c26e241b2ebcd3186af53dfa4 Author: eight <eight04@gmail.com> Date: Mon Oct 1 22:39:01 2018 +0800 Change: editor-worker-body -> editor-worker commit 268e1716b4bba9456d7fba7b742ce03ca1e93941 Author: eight <eight04@gmail.com> Date: Mon Oct 1 22:38:06 2018 +0800 Change: switch to worker-util commit cc2980b647547696f591cbd8731ab880275ede94 Author: eight <eight04@gmail.com> Date: Mon Oct 1 22:30:16 2018 +0800 Drop: parserlib-loader commit 08adcb60f2a4bc9b5e3f15c5ef533a3420851a5a Merge: 6909c73 2fd531e Author: eight <eight04@gmail.com> Date: Mon Oct 1 22:29:39 2018 +0800 Merge branch 'master' into dev-usercss-meta commit e4135ce35de2b264d7560b37ca2344f6f206db59 Author: eight <eight04@gmail.com> Date: Fri Sep 28 11:57:34 2018 +0800 Fix: remove unused function commit 39a6d1909f4fa7af53c7f5c00dbd5b8c2e083df9 Author: eight <eight04@gmail.com> Date: Fri Sep 28 00:26:29 2018 +0800 Fix: prefs doesn't work in FF's private windows. Add web-ext. Drop prefs.readOnlyValues commit 6909c73c698a81d4897af3a54cd73663ac012559 Author: eight <eight04@gmail.com> Date: Wed Sep 26 12:16:33 2018 +0800 Fix: minor commit 79833d8bba5994f30398d32d238fbe98854714d9 Author: eight <eight04@gmail.com> Date: Wed Sep 26 11:40:04 2018 +0800 Fix: a better way to draw list? commit a849fd6ddabf81ebde74d7c16dcd240249fbe289 Author: eight <eight04@gmail.com> Date: Wed Sep 26 11:39:53 2018 +0800 Fix: missing placeholders commit d5ee31a0801607fe548ba74a5c1f646e14f3cbb6 Author: eight <eight04@gmail.com> Date: Wed Sep 26 11:37:50 2018 +0800 Fix: a better way to draw character list? commit 7b959af3e36492c3b5ec129cade0823e2c05af4b Author: eight <eight04@gmail.com> Date: Wed Sep 26 11:30:10 2018 +0800 Update usercss-meta commit fefa987c4dfb9660d76d3ae26968209204570171 Author: eight <eight04@gmail.com> Date: Wed Sep 26 10:37:28 2018 +0800 Change: sections-equal -> sections-util commit 2abbf670d875b3249b6963115d03285aca3d44f9 Author: eight <eight04@gmail.com> Date: Wed Sep 26 10:37:14 2018 +0800 Fix: check err.code commit 1fe0586b2958b91c39cb1f486955cdcdc072ed78 Author: eight <eight04@gmail.com> Date: Wed Sep 26 10:33:02 2018 +0800 Add: i18n error message commit ab0ef239cf234fd4b6cefc2eed6e8fb442478069 Author: eight <eight04@gmail.com> Date: Wed Sep 26 09:34:57 2018 +0800 Change: move styleCodeEmpty to sections-util, load colorConverter in background worker commit d5ade807f0c7fc22ec331f9476b31efc63e90773 Author: eight <eight04@gmail.com> Date: Wed Sep 26 09:27:30 2018 +0800 Fix: display error message commit 4f5337e51dba0b0644348d67c02b9a90918b14e8 Author: eight <eight04@gmail.com> Date: Wed Sep 26 09:26:55 2018 +0800 Fix: remove unused colorconverter commit 29b8f512926b1f772fad26182748c4471cc19f7d Author: eight <eight04@gmail.com> Date: Tue Sep 25 23:21:44 2018 +0800 Fix: vars could be undefined commit a7cfeb22e45e5fb69a06d41ac133262c85ef08a5 Author: eight <eight04@gmail.com> Date: Tue Sep 25 22:54:40 2018 +0800 Fix: window is undefined commit 9713c6a3beedc1da8d0d111214e295e745d19956 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:56:38 2018 +0800 Fix: throw an error for unparsable color commit 3c30bc3eb014a9936d605425facbee4011ce4244 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:55:55 2018 +0800 Fix: try to get error message commit 3d32b0428bee83b04bc4f813e1f4a49efc2ca488 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:38:40 2018 +0800 Fix: vars might be empty commit 7d75dd87541925b738b1eb2bc5a6e1c5b38002ac Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:18:39 2018 +0800 Add: meta-parser commit a4df641b96d6d14fadeaeab3021d401c8c01d417 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:18:18 2018 +0800 Enhance: set flag in parserlib so we don't need another loader commit 8028a3529f212dd36c9cbb87967105ec25164ab9 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:17:40 2018 +0800 Include util, worker-util in background commit ba5d6cc31a7d6dbbd9e278c809ec17009c155bf8 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:16:59 2018 +0800 Fix: use spread syntax in loadScript commit b853be13f8f9eb182a127addade7570661d82171 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:14:46 2018 +0800 Enhance: swith to usercss-meta (in worker) commit a3e79151995283ba3dd68cd939e8066c5c48cbd8 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:11:54 2018 +0800 Fix: use promise API commit 5d07a8cd4e4789fb5352afe81a86081a71cb95de Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:11:09 2018 +0800 Fix: buildMeta now returns a promise commit a004bc3c7d462b6571e08ec80d72ed6aa1d8efd1 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:10:35 2018 +0800 Move styleCodeEmpty to util commit 41ac66a1378b92ca3da1d5c189f678a31438ff9c Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:09:40 2018 +0800 Add: background worker commit ffb13bf1db4b2dbd6d68183f16a9397ddd587b44 Author: eight <eight04@gmail.com> Date: Tue Sep 25 21:09:04 2018 +0800 Enhance: move moz-parser/meta-parser/usercss compiler to worker commit 42e97ef1532a4937e545ea7e0b7c5325066af62a Author: eight <eight04@gmail.com> Date: Tue Sep 25 20:45:07 2018 +0800 Fix: display error on install page commit 64aa9fcf538e31367a9443418c20aed1817b707a Author: eight <eight04@gmail.com> Date: Tue Sep 25 17:34:54 2018 +0800 Add: background worker commit b0e407e98fe4893be0b29cae21df6622c09d4e5f Author: eight <eight04@gmail.com> Date: Tue Sep 25 14:52:35 2018 +0800 Add: worker util commit 7a24547e09984327fdee20426412d0744150413a Author: eight <eight04@gmail.com> Date: Tue Sep 25 00:01:18 2018 +0800 Add: usercss-meta commit 8a6011de8cb75dc898ca765399493eeebc67fe22 Author: Rob Garrison <wowmotty@gmail.com> Date: Sun Jul 22 09:15:09 2018 -0500 Attempt to update icon count commit 4fcb1a88d7ee3fc43743eac25db363a7dcbc1ab9 Author: Rob Garrison <wowmotty@gmail.com> Date: Sun Jul 15 13:44:29 2018 -0500 Fix empty exclusion storage error commit bfe54ab4c4f167890ac4e64e2031991770ae813e Author: Rob Garrison <wowmotty@gmail.com> Date: Sun Jul 15 12:59:51 2018 -0500 Add tab communication commit 983a7bc219409c8feadf5e52cbcd8813f7b416ed Author: Rob Garrison <wowmotty@gmail.com> Date: Sun Jul 15 10:51:11 2018 -0500 Fix escaped regex example commit 3950482f3485a3c61892ccda4608fa7a2ff12421 Author: Rob Garrison <wowmotty@gmail.com> Date: Wed Apr 25 18:11:37 2018 -0500 Fix undefined error commit e94c7edb38c218d87c11f18c81e9f2446f564359 Author: Rob Garrison <wowmotty@gmail.com> Date: Wed Apr 25 17:09:45 2018 -0500 Attempt to fix popup exclusion issues commit 2b4a1a5635c8ea2f3df3981be166ba722b8bc411 Author: Rob Garrison <wowmotty@gmail.com> Date: Thu Apr 19 13:00:27 2018 -0500 Modify input method commit 9f75b69cd899f93f61dbd38a8ec9d2d094bdafd8 Author: Rob Garrison <wowmotty@gmail.com> Date: Wed Mar 7 11:54:05 2018 -0600 Include iframe urls in exclusion popup commit 68dfa0153cdaa72a522b617313bc90c32bf249b2 Author: Rob Garrison <wowmotty@gmail.com> Date: Wed Jan 24 19:42:02 2018 -0600 Add style exclusions. Closes #113 * Revert: exclusions * Fix: pass eslint * Fix: the style is injected twice * Fix: don't load script async * Fix: styleCodeEmpty returns true for empty string * Fix: drop array selection * Fix: the config dialog is broken * Fix: popup doesn't use getStyle/getStylesByUrl correctly * Fix: keep disabled state in setStyleContent * Fix: allow live-preview to assign newest vars * Fix: transition fix is broken because setStyleContent becomes async * Fix: typo, TypeError in styleExists * Fix: use new API * Fix: pass linter * Fix: LICENCE -> LICENSE * Fix: remove unused distroy function
2018-11-07 06:09:29 +00:00
if (reason === 'editPreview' || reason === 'editPreviewEnd') return;
let entry;
let oldEntry = $(ENTRY_ID_PREFIX + style.id);
2017-07-16 18:02:00 +00:00
if (oldEntry && method === 'styleUpdated') {
2017-04-26 15:35:00 +00:00
handleToggledOrCodeOnly();
}
entry = entry || createStyleElement({style});
if (oldEntry) {
2017-07-16 18:02:00 +00:00
if (oldEntry.styleNameLowerCase === entry.styleNameLowerCase) {
installed.replaceChild(entry, oldEntry);
} else {
oldEntry.remove();
}
}
if ((reason === 'update' || reason === 'install') && entry.matches('.updatable')) {
handleUpdateInstalled(entry, reason);
}
filterAndAppend({entry}).then(sorter.update);
if (!entry.matches('.hidden') && reason !== 'import' && reason !== 'sync') {
animateElement(entry);
2018-01-01 17:02:49 +00:00
requestAnimationFrame(() => scrollElementIntoView(entry));
}
getFaviconImgSrc(entry);
2017-04-26 15:35:00 +00:00
function handleToggledOrCodeOnly() {
const newStyleMeta = getStyleWithNoCode(style);
const diff = objectDiff(oldEntry.styleMeta, newStyleMeta)
.filter(({key, path}) => path || (!key.startsWith('original') && !key.endsWith('Date')));
2017-07-16 18:02:00 +00:00
if (diff.length === 0) {
// only code was modified
entry = oldEntry;
oldEntry = null;
}
2017-07-16 18:02:00 +00:00
if (diff.length === 1 && diff[0].key === 'enabled') {
oldEntry.classList.toggle('enabled', style.enabled);
oldEntry.classList.toggle('disabled', !style.enabled);
$$('.checker', oldEntry).forEach(el => (el.checked = style.enabled));
oldEntry.styleMeta = newStyleMeta;
entry = oldEntry;
oldEntry = null;
}
}
2015-01-30 17:31:20 +00:00
}
2015-01-30 17:31:20 +00:00
function handleDelete(id) {
const node = $(ENTRY_ID_PREFIX + id);
if (node) {
node.remove();
if (node.matches('.can-update')) {
const btnApply = $('#apply-all-updates');
btnApply.dataset.value = Number(btnApply.dataset.value) - 1;
}
showFiltersStats();
}
2015-01-30 17:31:20 +00:00
}
function switchUI({styleOnly} = {}) {
const current = {};
const changed = {};
let someChanged = false;
for (const id of newUI.ids) {
const value = prefs.get(newUI.prefKeyForId(id));
2017-07-16 18:02:00 +00:00
const valueChanged = value !== newUI[id] && (id === 'enabled' || current.enabled);
current[id] = value;
changed[id] = valueChanged;
someChanged |= valueChanged;
}
if (!styleOnly && !someChanged) {
return;
}
Object.assign(newUI, current);
newUI.renderClass();
installed.classList.toggle('has-favicons', newUI.enabled && newUI.favicons);
installed.classList.toggle('favicons-grayed', newUI.enabled && newUI.faviconsGray);
if (installed.style.getPropertyValue('--num-targets') !== `${newUI.targets}`) {
installed.style.setProperty('--num-targets', newUI.targets);
}
if (styleOnly) {
return;
}
const iconsEnabled = newUI.enabled && newUI.favicons;
let iconsMissing = iconsEnabled && !$('.applies-to img');
if (changed.enabled || (iconsMissing && !createStyleElement.parts)) {
2017-07-19 08:19:15 +00:00
installed.textContent = '';
API.getAllStyles().then(showStyles);
return;
}
if (changed.targets) {
for (const entry of installed.children) {
$('.applies-to', entry).classList.toggle('has-more', entry._numTargets > newUI.targets);
if (!entry._allTargetsRendered && newUI.targets > $('.targets', entry).childElementCount) {
createStyleTargetsElement({entry, expanded: true});
iconsMissing |= iconsEnabled;
}
}
}
if (iconsMissing) {
debounce(getFaviconImgSrc);
return;
}
}
function onVisibilityChange() {
switch (document.visibilityState) {
// page restored without reloading via history navigation (currently only in FF)
// the catch here is that DOM may be outdated so we'll at least refresh the just edited style
// assuming other changes aren't important enough to justify making a complicated DOM sync
case 'visible': {
const id = sessionStore.justEditedStyleId;
if (id) {
handleUpdateForId(Number(id), {method: 'styleUpdated'});
delete sessionStore.justEditedStyleId;
}
break;
}
// going away
case 'hidden':
history.replaceState({scrollY: window.scrollY}, document.title);
break;
}
}
function highlightEditedStyle() {
if (!sessionStore.justEditedStyleId) return;
const entry = $(ENTRY_ID_PREFIX + sessionStore.justEditedStyleId);
delete sessionStore.justEditedStyleId;
if (entry) {
animateElement(entry);
requestAnimationFrame(() => scrollElementIntoView(entry));
}
}
2020-10-15 10:55:27 +00:00
function waitForSelector(selector) {
// TODO: if used in other places, move to dom.js
// TODO: if used concurrently, rework to use just one observer internally
return new Promise(resolve => {
const mo = new MutationObserver(() => {
const el = $(selector);
if (el) {
mo.disconnect();
resolve(el);
}
});
mo.observe(document, {childList: true, subtree: true});
});
}
function embedOptions() {
const options = $('#stylus-embedded-options') ||
document.documentElement.appendChild($create('iframe', {
id: 'stylus-embedded-options',
src: '/options.html',
}));
options.focus();
}
async function unembedOptions() {
const options = $('#stylus-embedded-options');
if (options) {
options.contentWindow.document.body.classList.add('scaleout');
await animateElement(options, 'fadeout');
options.remove();
}
}