Commit graph

38 commits

Author SHA1 Message Date
Oliver Blanthorn
554bbe41f5
Merge branch 'master' of github.com:cmcaine/tridactyl into caput-theme-mk2 2018-05-20 18:20:46 +01:00
Colin Caine
71d27e5133 Add appendTo()
Appends an element as a child of another if it can, else waits for
DOMContentLoaded.

Cleans up modeindicator insertion a bit.
2018-05-20 17:54:29 +01:00
Bruno Oliveira
0feaa3d2ca
Improve Tridactyl theming capabilities 2018-05-20 16:22:46 +01:00
Oliver Blanthorn
7429f8ca1d
Make mode indicator go purple in private windows 2018-05-17 14:40:30 +01:00
Colin Caine
e4de65f126 Fix #453 on web content pages too for real 2018-05-16 15:23:04 +01:00
glacambre
bdcb45a800
Newtab: Display nothing until we know the user wants tridactyl's newtab 2018-05-06 18:15:42 +02:00
Colin Caine
ec13fa5dec
Native messenger code review 2018-04-25 20:43:41 +01:00
Oliver Blanthorn
f64dedbd8a
Remove errant log. 2018-04-25 19:12:25 +01:00
Oliver Blanthorn
bed18f6fdf
Fix mode indicator not showing
On quick loading pages, we were missing the DOMContentLoaded event.
2018-04-25 10:22:52 +01:00
Oliver Blanthorn
e9f6afeb9c
Add toggle for mode indicator with set modeindicator true|false 2018-04-23 21:28:46 +01:00
Oliver Blanthorn
47409e4fd2
Make Logging.Logger.error print an error to the command line 2018-04-23 15:09:20 +01:00
Colin Caine
04ae5b58a8 Catch CSP exception when hijacking 2018-04-22 18:31:57 +01:00
Oliver Blanthorn
fad7851829
Fix #394: rename generated source .name.generated.ext 2018-04-22 17:15:40 +01:00
Oliver Blanthorn
c67adc44e3
Add mode indicator 2018-04-22 15:34:00 +01:00
Colin Caine
8ee9db1360 Fix exportFunction detection 2018-04-20 13:59:52 +01:00
Colin Caine
07b0a20923 Simplify newtab redirect code 2018-04-19 16:39:01 +01:00
Colin Caine
ec51fbba88 Fix newtab redirection
Broken by hijack code. I've just assumed any page we load content.ts on
manually doesn't need hijacking. Other solutions are available.
2018-04-19 15:34:35 +01:00
Colin Caine
35bcde6627 Update keyseq
- Add and build grammars
 - Add to content.ts for interactive use
 - Add tests
 - Change bracketExpr parser
 - Improve comments
 - Apply prettier
2018-04-15 22:34:07 +01:00
glacambre
0e128b9ef8
{config,content,dom,excmds}.ts: Implement autofocus-prevention mechanism 2018-04-14 11:10:42 +02:00
Oliver Blanthorn
095ce771ea
Formatting: run all typescript through prettier 2018-04-13 19:28:03 +01:00
Oliver Blanthorn
120f1951c5
Merge branch 'master' of github.com:cmcaine/tridactyl into glacambre-hijack_listeners 2018-04-02 13:00:04 +01:00
Oliver Blanthorn
6d8fe17069
Add nascent find mode 2018-03-18 13:11:11 +00:00
Oliver Blanthorn
f2244ee554
Sketch out find command using mark.js 2018-03-18 13:10:17 +00:00
glacambre
f584c67f16
src/{content,dom,hinting}.ts: Implement addEventListener hijacking
This commit makes Tridactyl aware of elements made interactive through
JavaScript and lets Tridactyl put hints on them.
Something possibly dangerous is done here: exporting a function to the
page's context. While it is believed that the current implementation is
secure and that pages can't discover whether the function has been
exported or not, this might change due to new standards being adopted by
firefox. One of these standards is the Custom Elements api:
https://developer.mozilla.org/en-US/docs/Web/Web_Components/Custom_Elements

It will be necessary to check how Tridactyl behaves once this API has
landed. The status of this API seems to be tracked here:
https://bugzilla.mozilla.org/show_bug.cgi?id=1406825
2018-03-03 14:20:06 +01:00
glacambre
1701b7e7fe
content.ts: Make newtab.html load page from newtab setting 2018-03-03 12:40:30 +01:00
Oliver Blanthorn
11b208c2a2
Fix #194: add searchsetkeyword [keyword] [url]
Also, add config to the `tri` namespace for debugging.
2017-12-03 11:30:44 +00:00
Koushien
f982233a49 completions: initial implementation
This commit squashes a load of work by @Koushien, a dozen hours from
@cmcaine and some CSS by @bovine3dom.

@cmcaine is writing this commit message, but the work was mostly by
Koushien so the author is set to them. Thanks Koushien!

The following issues need to be fixed:

 - The interface is over complicated (my fault)
 - commandline_frame is hard-coded to use BufferCompletionSource. This
   needs to be made more general
 - BufferCompletionSource should be generalised
 - completions.ts calls helper functions in commandline_frame. Should
   just use browser proxy. If that's too slow can define a
   completions_background.ts

After that's done, this should be fixed:

 - Completion hiding/unhiding is currently too messy.
2017-11-22 21:30:37 +00:00
Oliver Blanthorn
85d6eba2b5
Revert "Merge branch 'Koushien-completions'"
This reverts commit 0aa14bb754, reversing
changes made to eae9cd0dab.
2017-11-21 20:28:48 +00:00
Koushien
5bbb133c5c Begin transitioning completions refactor
Start laying groundwork for buffersall excmd
2017-11-21 05:15:52 +00:00
Colin Caine
5f560f5e0b debug: add more to content window 2017-11-19 07:58:46 +00:00
Colin Caine
692cdeb5d7 messaging: don't use browserProxy on ext pages 2017-11-19 07:43:48 +00:00
Colin Caine
17e42588b0 debug: add to content window object 2017-11-18 01:51:13 +00:00
Colin Caine
927e19c818 hinting: First working version
state.ts also reworked into a sexy new machine. Check it out!
2017-11-09 05:44:48 +00:00
Colin Caine
5964430fe1 Convert to es6 modules
Motivation:

 - Most test frameworks expect modules
 - I'm told they're the future

Changes:

 - Every typescript source file is now an es6 module
 - Build system is now webpack (tho rollup makes nicer outputs)
 - Outputs of buildsystem are one js file per entry point (background,
   content, commandline_frame)
 - These bundled js files are generated by traversing the dependency
   graph of each entry point
2017-10-02 01:17:32 +01:00
Colin Caine
419854c616 Unprofessionally large commit
- Implement just about working commandline
 - Clean up excmd code
 - Move controller logic out of parsing
 - Document workarounds of webext problems
2017-09-29 18:29:36 +01:00
Koushien
687aaf9209
Implement different scroll excmds
In addition to scrollByLine and scrollByPage,
an excmd to scroll by half pages is included to
mimic default <C-u> and <C-d> behavior. In a
future revision, it may be preferred to have some
variable V for scroll values that pulls current
window height when called.
2017-09-27 21:10:52 -07:00
Colin Caine
9e57a25aa6 Proof of concept
keyboard API shim written, parser revised, example scrolling excmds
implemented.
2017-09-25 05:00:41 +01:00
Colin Caine
1a2c684d30 Reorganise repo 2017-09-24 23:38:57 +01:00
Renamed from addon/src/content.ts (Browse further)