David Reed
b465d3fc54
add internet connection
...
perhaps the user's internet is disconnected
serviceworkers can run without internet
2023-01-01 16:20:53 -05:00
David Reed
54f9b43995
add more steps, fix grammar, show version
2023-01-01 16:19:47 -05:00
David Reed
5119555f3f
fix filenames
...
This will allow for pages without titles to be correctly saved
and for files to be downloaded with their correct filename
2023-01-01 16:04:49 -05:00
David Reed
22f0e12e95
make error pages practical
2022-12-31 18:09:28 -05:00
David Reed
ba0dbbd83a
only show error string on page requests
2022-12-30 16:51:53 -05:00
David Reed
1f594a5053
Specify cache when making request
...
This was overlooked and is very important in order to leverage the bare server's cache
and not break websites
2022-12-18 16:37:37 -05:00
David Reed
d8d4c458ad
remove console.log
2022-12-03 16:29:56 -05:00
David Reed
63516b3217
use self
2022-12-03 16:28:19 -05:00
David Reed
ea98f9361e
provide randomly chosen bare server URL & refactor
...
Allows a list of bare servers to be passed to `bare` in __uv$config
2022-12-02 18:02:02 -05:00
David Reed
82d50484e6
Fix cookies
...
The set-cookie header was flattened, preventing cookies from being set
The way headers were being read from the BareResponseFetch API meant they were headers that were already flattened (new Headers())
This is fix makes the headers identical to earlier UV versions
2022-11-26 16:30:52 -05:00
David Reed
e891c6a831
redundant setting of host
...
This is already done in bare-client
2022-11-26 14:58:17 -05:00
David Reed
f34bb3d640
js-safe worker injection
2022-11-23 14:37:37 -05:00
David Reed
38a715b3a2
less annoying JSDoc types
2022-11-23 14:28:11 -05:00
David Reed
e502dc33ea
export UVClient separate
2022-11-23 13:34:38 -05:00
David Reed
f905b01477
use ultraviolet.script values
2022-11-23 13:02:07 -05:00
David Reed
561a1ee190
run ESLint
...
Several bugs were found (and fixed):
src/client/index.js:71
the following if() was equivalent to if (false in obj)
src/client/dom/element.js:207
the following if() was equivalent to if (!element || false in element)
src/client/rewrite/html.js:179
an undefined iterate() was referenced
2022-11-23 12:37:00 -05:00
David Reed
dbc01b3d56
remove unused bowser
2022-11-23 12:23:42 -05:00
David Reed
f08364edcd
remove case for status 500
2022-11-19 20:06:02 -05:00
David Reed
1a1bf9b500
npm events, expose EventEmitter via bundle
2022-11-19 19:57:18 -05:00
David Reed
7ef4fb9732
log error, add fetch to try catch
2022-11-19 19:51:15 -05:00
David Reed
edb339b137
remove requestCtx.forward
2022-11-19 19:11:41 -05:00
David Reed
30f17a2b5c
set user-agent in fetch
...
Firefox doesn't pass user-agent in the serviceworker request headers. We need to manaully provide this.
2022-11-19 19:05:55 -05:00
David Reed
12e9d3c0f8
bareClient
2022-11-19 19:02:37 -05:00
David Reed
1700d17e09
use correct address API
2022-11-19 19:02:17 -05:00
David Reed
b7249e5819
WebSocket support
...
What I did:
- juggle the bare client data between the page and SW
- mock the WebSocket class to perform async ops
There are still bugs:
- new WebSocket().constructor is the mock class
- eventTarget() feels very stomp-like
2022-11-18 21:11:51 -05:00
David Reed
bd51158873
cleanup iterator
2022-11-18 20:29:10 -05:00
David Reed
5e71b8138b
separate consts
2022-11-18 20:28:50 -05:00
David Reed
015045f2c5
some JSDoc, install @tomphttp/bare-client
2022-11-18 20:25:49 -05:00
David Reed
8f999e7236
prettier
2022-11-18 20:00:58 -05:00
David Reed
0bff4aacd2
break serviceworkers
2022-09-15 18:08:01 -04:00
David Reed
471f591ab0
import core scripts from ultraviolet-core
2022-09-15 17:12:58 -04:00