Commit graph

164 commits

Author SHA1 Message Date
Omar Rizwan 0f2ab4b4de safari: fix some races when you reload Web inspector, make ws connection retry 2021-02-08 13:45:26 -08:00
Omar Rizwan 2f639e2a02 safari: TabFSServer subprocess that can live long. fixes bug where fs would die after a minute or two 2021-02-08 12:12:43 -08:00
Omar Rizwan 9b4abc40ee safari: more cleanup and commenting 2021-02-08 05:03:31 -08:00
Omar Rizwan b6b61ee093 safari: make tabfs URL path independent 2021-02-08 04:52:07 -08:00
Omar Rizwan 341ae6d477 safari: more cleanup, start on README.md 2021-02-08 04:30:36 -08:00
Omar Rizwan eae9082407 safari: loopback restrict 2021-02-08 04:26:00 -08:00
Omar Rizwan 78f67aa873 safari: clean up code a bit 2021-02-08 04:21:58 -08:00
Omar Rizwan b19f68cc8e safari: it works over ws! 2021-02-08 04:16:30 -08:00
Omar Rizwan 4fdcf4be9d safari: successfully exchanges 1 req/resp over ws, then fails 2021-02-08 04:02:47 -08:00
Omar Rizwan 7211a5fdea safari: start migration to using out-of-band WebSocket to do extension<=>fs comm 2021-02-08 02:32:21 -08:00
Omar Rizwan 930352dd42 safari: works! (it lists tabs/by-title, at least)
Safari keeps stealing focus bc of how I do messaging to it now, need to fix all that next
2021-02-07 22:57:04 -08:00
Omar Rizwan 6f743114da safari: XPC service runs! 2021-02-07 21:44:46 -08:00
Omar Rizwan 8924f946dd safari: merge XPC service to run tabfs process. it builds but haven't hooked it in yet 2021-02-07 16:10:37 -08:00
Omar Rizwan 33e5911cb2 trying to just run straight from sandbox instead of xpc -- kinda works! blocked on libfuse 2021-02-07 02:46:07 -08:00
Omar Rizwan a465ad6a8f safari: checkpoint as I try to get the terrible wiring right 2021-02-02 23:07:24 -08:00
Omar Rizwan f5b00deb7e safari: initial commit.
this is just the output of `xcrun safari-web-extension-converter .` in
`extension/`

it doesn't work yet (well, it runs without any errors, but it doesn't
know to invoke the tabfs process; it just talks to the stub app from
the generator)
2021-01-31 13:48:26 -08:00
K1-K1 d918d93bbc
Allow all characters (except /) when sanitazing 2021-01-14 13:42:08 +00:00
Omar Rizwan c8f6827e76
Merge pull request #51 from joshuahhh/master
read/write textareas
2021-01-13 00:12:12 -08:00
Omar Rizwan 9e1a145d23 Merge branch 'huglovefan-truncate' 2021-01-12 00:16:29 -08:00
human a7ab34ebbc fix truncating in defineFile()
- in the C part: enable FUSE_CAP_ATOMIC_O_TRUNC so that open() will get called with O_TRUNC in flags instead of truncate() being called separately
  - this also prevents truncate() from calling setData() with an empty string when a file is opened with O_TRUNC
- in defineFile()->open(): if O_TRUNC is used, don't call getData() but start with an empty file as if it had just been truncated
- in defineFile()->write()/truncate(): correct buffer resizing/copying
2021-01-11 10:25:57 +02:00
Joshua Horowitz 08885dc990 read/write textareas 2021-01-10 22:55:34 -08:00
cdf1982 dc9ab003ee
Save tab HTML source to file 2021-01-10 20:59:42 +01:00
Omar Rizwan 6e829c1f17
Merge pull request #29 from huglovefan/master
multi-threaded tabfs.c
2021-01-04 03:35:17 -08:00
tv 8946ca34b8 background.js: add /tabs/by-id/*/active 2021-01-04 05:06:34 +01:00
human 3c8570ac52 multi-threaded tabfs.c 2021-01-03 12:52:38 +02:00
Omar Rizwan d588283fb2 Firefox fixes, md update 2020-12-31 18:00:25 -08:00
Omar Rizwan 86cf0a0ae8 update md, add some stubs, move console inside scope 2020-12-31 17:33:11 -08:00
Omar Rizwan 957ea5a3d4 console and execute-script work. with test 2020-12-30 22:44:25 -08:00
Omar Rizwan b09951ebc2 continuing work on console. it can print stuff in tail -f! 2020-12-30 18:57:01 -08:00
Omar Rizwan 77c79a8f83 eval works. start on console 2020-12-30 17:19:22 -08:00
Omar Rizwan 1185e6885c ability to read scripts/file with path filtering 2020-12-29 14:16:25 -08:00
Omar Rizwan 8315efcb60 improve scripts dir -- checking scriptId more reliably. add tests 2020-12-29 04:27:12 -08:00
Omar Rizwan 705b245be5 prevent explosion of scriptsForTab! 2020-12-29 03:52:17 -08:00
Omar Rizwan 5f15ab1c37 improve test reliability; try clear scriptsForTab (doesn't work yet) 2020-12-29 02:35:03 -08:00
Omar Rizwan b8181bd6f5 cleanup refcount stuff that wasn't being used anyway, update md 2020-12-28 10:41:15 -08:00
Omar Rizwan fb6ed2b2f4 add tabfs.md (hard linked into website) 2020-12-27 18:04:15 -08:00
Omar Rizwan ab34a525dc add window symlink in tab folder 2020-12-25 15:54:53 -08:00
Omar Rizwan f3ea7349c0 add some comments, do some cleanup 2020-12-25 15:42:38 -08:00
Omar Rizwan c4d9cb7b54 make windows/*/visible-tab.png. seems to work? 2020-12-25 15:13:04 -08:00
Omar Rizwan 2d8bedcc4b start working on windows/ (so i can have cleaner screenshot API) 2020-12-25 14:55:35 -08:00
Omar Rizwan 58d5e819ae fix bug with new debugger/ route path matching 2020-12-25 13:59:35 -08:00
Omar Rizwan cc53bdd98d make debugger/ subfolder. remove lastFocused storage (didn't need?)
make test reload on start. test seems to work
2020-12-25 13:40:18 -08:00
Omar Rizwan b64c0f7016 add .txt extensions (it screenshots better) 2020-12-25 00:38:55 -08:00
Omar Rizwan 462a657bfd remove doc/README. fix truncate on extensions/*/enabled. add timeout 2020-12-24 23:46:48 -08:00
Omar Rizwan 2a67a62e21 better router infill logic; start work on /runtime/reload 2020-12-24 13:49:38 -08:00
Omar Rizwan 760de1ac77 fix truncate & write (incl resizing). fix extensions/*/enabled ? 2020-12-23 04:18:26 -08:00
Omar Rizwan 35214c9698 extensions/*/enabled is readable (+ test that works) 2020-12-22 20:34:01 -08:00
Omar Rizwan e6f9ce7437 fixup ancestor algorithm so extensions/ appears 2020-12-22 18:32:08 -08:00
Omar Rizwan de9a792a21 start adding extensions/ folder. fix up js tests
some hacks to start working on clearing old scriptParsed entries
2020-12-22 16:36:09 -08:00
Omar Rizwan 9e23fc59fc remove tab at end of test 2020-12-19 17:11:59 -08:00
Omar Rizwan e1e47173b6 make test.c. clean up utf8/string stuff a bit, start write patching 2020-12-19 15:22:44 -08:00
Omar Rizwan bb0376c407 checkpoint: starting work on truncate. more README stubs. 2020-12-18 23:54:36 -08:00
Omar Rizwan d21c9eace1 make URL writable (kinda). allow delete in by-title/. README update 2020-12-15 12:11:41 -08:00
Omar Rizwan 9feca9b0b9 Add unlink support. Make by-title/ writable. Add . and .. entries.
Still haven't added the unlink handler to by-title/, though.
2020-12-13 22:02:29 -08:00
Omar Rizwan cabc3fe03f fromStringMaker -> defineFile; start adding write to defineFile.
also make write() actually work w/o errors. (return size)
2020-12-13 05:21:43 -08:00
Omar Rizwan 654265347c scripts works! uses getScriptSource 2020-12-12 02:51:09 -08:00
Omar Rizwan 08af48843b fix detach->attach flow. collect scripts/ entries and readdir
(but not providing attrs yet, so they don't actually show up in ls
yet)
2020-12-12 02:36:37 -08:00
Omar Rizwan edb59121cc make screenshot.png use fromStringMaker 2020-12-11 22:32:46 -08:00
Omar Rizwan 583611af58 more refactoring: standardize fromStringMaker to use arrays
resources and screenshot.png seem to still work
2020-12-11 21:25:03 -08:00
Omar Rizwan dc71428fbd refactor to create fromStringMaker. text, title, url seem to work
with this, I think I can drastically simplify the synthetic file
definition code
2020-12-11 20:01:11 -08:00
Omar Rizwan 1dd02874a3 fence withTab and fromScript into scope 2020-12-11 15:45:19 -08:00
Omar Rizwan d3b376582f refactor -> Cache, TabManager, BrowserState.
screenshot.png is consistent & fast-ish now! need to fixup resources
2020-12-11 15:18:26 -08:00
Omar Rizwan 34c16fec0d extension: improve debug attach reliability
(by forcing detach first for tabs that already have an attached
debugger -- this crops up a lot if I reload the extension, the old
extension ver stays hanging -- and by attaching before we open/getattr
files too, not just when we open the dir)

(it seems pretty solid now)
2020-12-04 17:40:03 -08:00
Omar Rizwan e4c92ac4e9 trying to fix resource read. fix releasedir call. 2020-12-04 13:44:35 -08:00
Omar Rizwan 50c9f62890 screenshot.png works! (when focused, when you kill old debugger) 2020-12-04 11:39:26 -08:00
Omar Rizwan d34ed5b28c fix text bug 2020-12-04 11:31:26 -08:00
Omar Rizwan c826e20365 extension: move toward unified base64-encoded utf8 bufs
title and url work, but not text?
2020-12-04 09:58:09 -08:00
Omar Rizwan 22aaeaa9e1 base64 reads. start working on screenshot stuff. 2020-12-02 20:24:20 -08:00
Omar Rizwan 506751b3d5 fix write (base64-encoding) 2020-12-02 16:57:06 -08:00
Omar Rizwan 71df7d3729 introduce default ops. it still (mostly) works!
control is broken tho
2020-12-02 13:45:20 -08:00
Omar Rizwan 45518bce56 fix bugs with error handling (Unix vs other Errors). add open stubs
now I actually will have to implement all the ops properly for every
route...
2020-12-02 11:58:37 -08:00
Omar Rizwan a7af875a65 fix readlink bug 2020-12-02 11:10:53 -08:00
Omar Rizwan adf4330f54 start refactor to use frozen instead of cJSON; I can list dirs, but can't read file yet
also (... at the same time ...) more work on refactoring background.js
to eliminate middle layer, I guess
2020-12-01 21:47:05 -08:00
Omar Rizwan 976c5ef20a start on refactor to eliminate layer of fs op handling 2020-11-30 16:01:56 -08:00
Omar Rizwan 03219b64d7 fix base64-encoded reads! 2020-11-22 15:36:21 -08:00
Omar Rizwan 3a623f17c4 track last-focused window by hand 2020-11-22 13:38:25 -08:00
Omar Rizwan 374d794f73 add last-focused to make testing easier 2020-11-22 11:52:08 -08:00
Omar Rizwan 6b54c8ec6b re-add (buggy) resource file support 2020-11-22 04:42:16 -08:00
Omar Rizwan 9517494cd5 bring back debugging, resources dir 2020-11-22 04:30:57 -08:00
Omar Rizwan 2befcb8db6 close should be remove. Make control allow arbitrary commands. 2020-11-05 19:09:44 -08:00
Omar Rizwan f576b4c324 Manually set getattr op. Fixes text file. 2020-10-29 23:16:06 -07:00
Omar Rizwan 76efd118e0 fix file reads! (substr by offset/size). remove browser action 2020-10-29 15:56:57 -07:00
Omar Rizwan 5ed6379687 Fix async bug on handler init. Can read url and title now! (kinda)
(they don't terminate properly, will fix that next)
2020-10-29 15:24:27 -07:00
Omar Rizwan c85bb26264 ancestor-building kind of works. 2020-10-28 14:14:57 -07:00
Omar Rizwan a9cb8e14af working on refactor of fs spec. also Linux port and README stuff. 2020-10-27 20:53:39 -07:00
Omar Rizwan 281e0a3d8c Works in Chrome again! (had to make TabFS name lowercase)
Add install script to cover all the native messaging install cases.
2020-10-23 22:03:13 -07:00
Omar Rizwan eee57547ac text file works! 2020-10-23 12:03:38 -07:00
Omar Rizwan 44d5a7ed3c Switch to browser namespace so we can use Promises. 2020-10-23 12:00:25 -07:00
Omar Rizwan 543dc7d4b2 works on FF!! key thing was... to add indexedDB permission...
(I guess FF uses the DB in the backend? it makes async errors work...)
2020-10-22 19:54:37 -07:00
Omar Rizwan 8bbcaf9343 postMessage back from browser. Kill other instances of fs.
Currently stuck not getting response to a getattr...
2020-10-22 06:47:00 -07:00
Omar Rizwan 64bd1f3948 fs: Attempt to switch to native messaging. It relays 1 message ok! 2020-10-21 15:53:27 -07:00
Omar Rizwan 69c167a134 native messaging test file. 2020-10-21 15:14:00 -07:00
Omar Rizwan 74b1b0f789 Starting to move to native messaging.
Why? The WebSocket stuff is broken right now, and I want to get rid of
the dep...
2020-10-16 21:56:49 -07:00
Omar Rizwan 53de6736fe write works to close tabs! 2019-03-02 12:16:08 -08:00
Omar Rizwan a81c021204 extension: Truncate long tab titles. Move Apple Double logic. 2019-03-02 01:48:56 -08:00
Omar Rizwan aa3ac637ee extension: Naming, factor out debugTab, add snapshot+screenshot. 2019-02-28 01:38:22 -08:00
Omar Rizwan bc3b35487d extension: Change some names. 2019-02-28 01:22:33 -08:00
Omar Rizwan 840526a17e extension: Add /text route. 2019-02-28 01:19:37 -08:00
Omar Rizwan a3f25d346f Add tabs/by-title. Fix symlink stuff to make it work?
FUSE readlink needing to return 0 + getattr needing to return correct
st_size was _not_ obvious, lol.
2019-02-28 01:05:28 -08:00
Omar Rizwan b18fc10e14 Report ENOTSUP for Mac xattr files.
Lets me open png files (in Preview) in tree/, at least!
2019-02-27 23:38:12 -08:00