Commit Graph

869 Commits

Author SHA1 Message Date
tophf
c4f219c039 Use our match-highlighter.js mod that reveals only multiple matches 2017-04-18 12:46:26 +03:00
tophf
6265951d01 match-highlighter.js: override step 2, highlight only multiple matches 2017-04-18 12:46:26 +03:00
tophf
3fb41a17e3 match-highlighter.js: override step 1 2017-04-18 12:46:26 +03:00
tophf
7ba276a821 regexp tester: autoupdate on tab navigations 2017-04-18 12:46:26 +03:00
tophf
c356fb9be5 Add regexp tester to the editor 2017-04-18 12:46:26 +03:00
tophf
486d4258d3 Reinject styles on document-rewrite
uBlock-extra rewrites html of some sites known to have bad scripts. Such new documentElement doesn't have our styles so we need to detect this case by observing the parent document node non-recursively, meaning we don't add overhead to the normal browsing experience.
2017-04-18 12:46:26 +03:00
tophf
e4c8ff9ff1 TEMPORARY: restore style elements removed by hostile sites 2017-04-18 12:46:26 +03:00
tophf
1c2c14d231 Correctly omit @namespace-only code in popup + speed up 2017-04-18 12:46:26 +03:00
tophf
7d9a6b5a3f OptionsUI: add 2 global options + simplify
* [x] show badge with active styles count
* [x] styles on top in the popup
* Simplify since we use a persistent background page so it's always there for us
2017-04-18 12:46:25 +03:00
tophf
4dd8066ca4 OptionsUI: restructure html, make it userstylable 2017-04-18 12:46:25 +03:00
tophf
0c6b74d999 Apply styles to more iframes
Previously we incorrectly assumed that each sub-element is present in addedNodes array, but actually we need to inspect each added node's children e.g. using the superfast getElementsByTagName.
2017-04-18 12:46:25 +03:00
tophf
4be9dc0413 fixup f7659343: getStyles is callback-based, not return-based 2017-04-18 12:46:25 +03:00
tophf
64c830caa9 webNavigation.onReferenceFragmentUpdated instead of tabs.onUpdated
Also send a Do-It-Yourself to our built-in pages to fetch the styles directly which is faster because IPC messaging JSON-ifies everything internally
2017-04-18 12:46:25 +03:00
tophf
d32ad30f8f webNavigation.getFrame may return null on overridden pages, fix a3401b05 2017-04-18 12:46:25 +03:00
tophf
54ab65989d Simplify configureCommands; focus an existing tab
Instead of isolating the deoptimization trigger:
https://github.com/petkaantonov/bluebird/wiki/Optimization-killers
2017-04-18 12:46:25 +03:00
tophf
55ac677d85 manage: fixup style search 2017-04-18 12:46:24 +03:00
tophf
2fb046e996 manage: import/update/add maintains sort order 2017-04-18 12:46:24 +03:00
tophf
b09b77d198 break-word for style name in manage/messagebox 2017-04-18 12:46:24 +03:00
tophf
9a36acf045 Center messageBox icon vertically in the title 2017-04-18 12:46:24 +03:00
tophf
1166fd9d3b openURL fix for opera:// URLs 2017-04-18 12:46:24 +03:00
tophf
a2ea1bb1d9 openURL: handle urls with # 2017-04-18 12:46:24 +03:00
tophf
4a642f77a5 Cache last 100 getDomains for filterStyles 2017-04-18 12:46:24 +03:00
tophf
78c56352cb Cache compiled regexps 2017-04-18 12:46:24 +03:00
tophf
2ef87e003d Remove webSqlStorage cruft as Stylus never used it 2017-04-18 12:46:23 +03:00
tophf
ac4a420e2b ESLint: customize the rules; fix the issues 2017-04-18 12:46:23 +03:00
tophf
657db366c9 openURL: refactor to open/switch to URL 2017-04-18 12:46:23 +03:00
tophf
18a9e26668 Move height fix into initPopup so it runs on unsupported pages 2017-04-18 12:46:23 +03:00
tophf
04084864cc Reverse button order when OS is not Windows 2017-04-18 12:46:23 +03:00
tophf
363f752934 Use messageBox in manage for confirm; partially revert c5741aff 2017-04-18 12:46:23 +03:00
tophf
54bb7cdd4e dom.js in optionsUI + reuse openURL to open/switch to URL 2017-04-18 12:46:23 +03:00
tophf
4936426fa3 dom.js: extract common DOM functions 2017-04-18 12:46:22 +03:00
tophf
0f8fd5c07c popup: refactor click handlers 2017-04-18 12:46:22 +03:00
tophf
b51c264c8b confirmDelete: extract, refactor, use in manage 2017-04-18 12:46:22 +03:00
tophf
8bcd7f60c5 Restore implicit handleUpdate in saveStyle 2017-04-18 12:46:22 +03:00
tophf
a6c3424b53 Move images into a separate directory 2017-04-18 12:46:22 +03:00
tophf
b1c19bdf3d Import styles: show report with Undo button 2017-04-18 12:46:22 +03:00
tophf
4bcfcb1503 Suppress out-of-order lint invocation errors 2017-04-18 12:46:22 +03:00
tophf
54171ea084 Optimize world_go with pngquant --quality 50-80 2017-04-18 12:46:21 +03:00
tophf
b5fa934652 confirmOK -> confirmDelete 2017-04-18 12:46:21 +03:00
tophf
5522b283ec Help link: http://add0n.com/stylus.html 2017-04-18 12:45:24 +03:00
tophf
26e1b67f44 Add <html id="stylus"> to all pages 2017-04-18 12:43:31 +03:00
tophf
49cba8cced apply.js: don't alter DOM stylesheet state if same 2017-04-18 12:43:31 +03:00
tophf
d53db2d45c Refactor & speed up styleSectionsEqual 2017-04-18 12:43:30 +03:00
tophf
19f1490f0a Add context menu 'delete' in editor for browsers without it 2017-04-18 12:43:30 +03:00
tophf
80130797ce Refactor contextMenus and commands 2017-04-18 12:43:30 +03:00
tophf
a717e632c6 Expose tDocLoader.stop() to prevent unneeded observation 2017-04-18 12:43:30 +03:00
tophf
c1338e63d1 Highlight updated/saved style in manage page 2017-04-18 12:43:30 +03:00
tophf
07bee69359 Fix deoptimization triggers 2017-04-18 12:43:30 +03:00
tophf
95e2263c10 Autocleanup cached filters when over 10k items (a few MB)
Precaution for the [rare but possible] case of users running Stylus for a very long time without restarting the browser.
2017-04-18 12:43:30 +03:00
tophf
c54e22ad64 Don't enforce non-native end_of_line in editorconfig 2017-04-18 12:43:30 +03:00