Commit graph

2046 commits

Author SHA1 Message Date
glacambre
666f9cfc51
Implement {bind,unbind,reset}url 2018-10-04 13:18:12 +01:00
Oliver Blanthorn
c2834ecc19
Merge pull request #1055 from glacambre/improve_guiset
Improve guiset
2018-10-04 12:48:32 +01:00
glacambre
1d8edb5a4b
excmds.ts: Remove profile-finding code in guiset
:guiset implemented a bit of its own profile-finding code (checking for
auto, making sure it's using the right platforms...) which isn't really
necessary since all of these checks (and more!) are already implemented
in Native.getProfileDir().

Closes https://github.com/tridactyl/tridactyl/issues/705.
2018-10-04 12:35:13 +02:00
glacambre
1f3ddce189
css_util.ts: Make findCssRules find rules with more that one selector
findCssRules only took one selector. This became a problem when
f017f74973 changed the hoverlink rule to
match two different selectors. The problem is solved by making
findCssRules accept an array of selectors.

This fixes https://github.com/tridactyl/tridactyl/issues/803 .
2018-10-04 11:48:49 +02:00
Oliver Blanthorn
f014671359
Merge pull request #1054 from antonva/allownewtabfocus
Add new config variable 'newtabfocus'.
2018-10-04 09:46:06 +01:00
glacambre
c4fc5cc8fe
Rename ffargs to ff_cmdline() and remove constraint on profile name
The rename of ffargs to a more sensible ff_cmdline was suggested in
https://github.com/tridactyl/tridactyl/pull/510#discussion_r188589211

The constraint on profile names was that the `find` command tridactyl
ran looked for profiles the name of which contained a dot. While all
profiles generated by firefox contain a dot in their path, users can
easily rename them to something that doesn't contain a dot, provided
that they also modify their profile.ini file.
2018-10-04 10:04:20 +02:00
glacambre
c7c152bc33
excmds.ts: Fix guiset profile not found error being overwritten 2018-10-04 09:28:03 +02:00
Anton Vilhelm Ásgeirsson
521a039ade Change name to 'newtabfocus' and clear up ambiguities in comments. 2018-10-03 23:56:27 +00:00
Anton Vilhelm Ásgeirsson
6336c3fb01 Add new config variable 'allownewtabfocus'.
Allows switching between having the newtab site grab focus or letting
the urlbar keep it with the former being default.
2018-10-03 23:36:59 +00:00
Oliver Blanthorn
0512c3e125
Merge pull request #1050 from glacambre/fix_753
scrolling.ts: default scroll values to 0
2018-10-03 17:58:53 +01:00
glacambre
fdb081ca84
Implement ownTab{,Id,Container}, use them to set modeindicator color
Firefox used to give the same color to all modeindicators on startup
with browser.sessionstore.restore_on_demand set to true in about:config,
This was caused by the use of `activeTabContainer` when setting the
modeindicator in content.ts. This call is replaced by a call to
`ownTabContainer`, which fixes this bug.

Closes https://github.com/tridactyl/tridactyl/issues/816 .
2018-10-03 17:29:36 +02:00
glacambre
2b30efca4c
scrolling.ts: default scroll values to 0
If x or y are undefined, the page could be scrolled back to its very top
under certain circumstances. This commit fixes that.

Closes https://github.com/tridactyl/tridactyl/issues/753 .
2018-10-03 14:48:47 +02:00
glacambre
f7775bfbb0
commandline_frame.ts: Make completions async again
This commit makes completions a bit less slow by making sure that the
previous completion round finished before starting a new one. The
optimal thing to do here would be to interrupt previous computations and
starting new ones right off the bat but this doesn't seem possible with
the current JS APIs.
2018-10-02 16:40:38 +02:00
Oliver Blanthorn
c451faf3ce
Merge pull request #1045 from glacambre/focus_newtab
newtab.ts: Focus newtab page when opening it
2018-10-02 15:22:21 +01:00
glacambre
331c67cdc6
newtab.ts: Focus newtab page when opening it 2018-10-02 15:45:16 +02:00
Oliver Blanthorn
95b32af95b
Merge branch 'messageOwnTab' 2018-10-02 12:51:36 +01:00
glacambre
313a55c0eb
commandline_frame.ts: Message own tab rather than background script
I believe this fixes two out of the three bugs mentionned in
https://github.com/tridactyl/tridactyl/issues/804
2018-10-02 12:45:30 +02:00
glacambre
cad3afadc2
messaging.ts: Implement messageOwnTab function
messageOwnTab does exactly what the name suggests. In a lot of cases,
it can and should replace messageActiveTab when it is called from the
content/commandline_frame script.
2018-10-02 12:38:30 +02:00
Saul Reynolds-Haertle
da629fbfe3 Change performanceEnabled to performanceApiAvailable for readability 2018-09-30 12:01:07 -07:00
Saul Reynolds-Haertle
35605d3bf9 Add more logging and debug output to perf counters
Also, present a friendly error string instead of an opaque crash if no
samples are avilable for perfhistogram.
2018-09-30 12:01:07 -07:00
Saul Reynolds-Haertle
b98e0af7c0 Rename dumpcounters to perfdump to maintain pseudo-namespacing 2018-09-30 12:01:07 -07:00
Saul Reynolds-Haertle
77832fd8a2 Add documentation for perf counts library and clean up the interface
Most importantly, provide some convenience functions for hooking up
listeners and messaging.
2018-09-30 12:01:07 -07:00
Saul Reynolds-Haertle
b8e0459e6b Build a performance counters system so I can start optimizing things
Complete a circular buffer so we don't log too much data, config
settings for turning it on and off (default off, becuase performance)
and for changing the size of the buffer, an excmd for dumping the raw
json so you can pore over it, and for when you just want to
sanity-check yourself instead of groveling over your data for six days
with a deep learning toolkit and three hundred CPUs of compute, an
excmd for pretty-printing your stats in a nice histogram.

I didn't think far enough ahead and only implemented the easy way to
instrument a function, which is with a decorator. I'm getting _really_
angry at typescript not being able to handle decorators on free
functions. bah. I'll figure out a good way to wrap free
functions. Maybe just go the stupid route and make you change
`export async function foo(args)` to `export foo = measured(async
function(args) ...`. But that would break excmd parsing, so... :/

I think that I already want to do a refactor to break excmd.ts into a
bunch of one-line wrappers referencing implementations spread
throughout a bunch of libraries. This would go nicely with that.

Other things I did while I was here:
* Fix the ugliness we had with (window as any).tri by monkey-patching
  the tri property into the window object in tridactyl.d.ts
2018-09-30 12:01:07 -07:00
Oliver Blanthorn
bbc305c5cf
Merge branch 'readline_excmds' 2018-09-30 19:00:51 +01:00
Oliver Blanthorn
b6573a88f8
Merge branch 'add_saveas' 2018-09-30 18:57:07 +01:00
Oliver Blanthorn
f8fcaf452a
Add disclaimer to saveas help 2018-09-30 18:56:56 +01:00
Oliver Blanthorn
58445dcd0f
Merge pull request #1042 from joaomsa/fix-build-on-paths-with-spaces
Fix build scripts on paths with spaces
2018-09-30 17:03:14 +01:00
Joao Sa
9b94146c9f Fix build scripts on paths with spaces 2018-09-30 15:25:14 +00:00
Saul Reynolds-Haertle
f95a33d76c Fix remaining relative imports 2018-09-29 18:03:36 -07:00
Saul Reynolds-Haertle
76057d3c98 Remember to move test files to stay with the things they test 2018-09-29 18:03:36 -07:00
Saul Reynolds-Haertle
a9367f479b move src/keyseq.ts to src/lib/ 2018-09-29 18:03:36 -07:00
Saul Reynolds-Haertle
8670ed1136 move src/dom.ts to src/lib/ 2018-09-29 18:03:36 -07:00
Saul Reynolds-Haertle
aa16c227f5 move src/test_utils.ts to src/lib/ 2018-09-29 18:03:36 -07:00
Saul Reynolds-Haertle
9df56bbd64 move src/url_util.ts to src/lib/ 2018-09-29 18:03:36 -07:00
Saul Reynolds-Haertle
7769d6db1b move src/text_to_speec.ts to src/lib/ 2018-09-29 18:03:36 -07:00
Saul Reynolds-Haertle
987bf32976 move src/styling.ts into src/content 2018-09-29 18:03:36 -07:00
Saul Reynolds-Haertle
073a0a7454 move src/state_content.ts into src/content 2018-09-29 18:03:36 -07:00
Saul Reynolds-Haertle
2d16c4d925 move src/scrolling.ts into src/content 2018-09-29 18:03:36 -07:00
Saul Reynolds-Haertle
b181840ceb move src/requests.ts into src/lib/ 2018-09-29 18:03:36 -07:00
Saul Reynolds-Haertle
16f95261f1 move src/number.mod.ts to src/lib 2018-09-29 18:03:36 -07:00
Saul Reynolds-Haertle
3100dca4a3 move src/number.clamp.ts to src/lib 2018-09-29 18:03:36 -07:00
Saul Reynolds-Haertle
6b77696de7 move src/nearley_utils.ts to src/background/ 2018-09-29 18:03:36 -07:00
Saul Reynolds-Haertle
eeb74c95c6 move src/native_background.ts to src/background/ 2018-09-29 18:03:36 -07:00
Saul Reynolds-Haertle
a4274d3839 move src/metadata.ts to src/lib/ 2018-09-29 18:03:36 -07:00
Saul Reynolds-Haertle
3160137c57 move src/messaging.ts to src/lib/ 2018-09-29 18:03:36 -07:00
Saul Reynolds-Haertle
ffc632a695 move src/math.ts to src/lib/ 2018-09-29 18:03:36 -07:00
Saul Reynolds-Haertle
c02ef5a90e Move src/itertools.ts to src/lib/ 2018-09-29 18:03:36 -07:00
Saul Reynolds-Haertle
e635034f9e Move src/hinting.ts to src/content/ 2018-09-29 18:03:36 -07:00
Saul Reynolds-Haertle
b255712970 Move src/finding.ts to src/content/ 2018-09-29 18:03:36 -07:00
Saul Reynolds-Haertle
c8362dd774 Move src/download_background.ts to src/background/ 2018-09-29 18:03:36 -07:00