control your current url
Opens an iframe in your browser whose url can be set and controlled from your urbit. Navigate around the web directly from your urbit command line. (Or at least those portions of the web which allow themselves to be displayed in an iframe...)
Just a simple toy with several shortcomings, but seems effective enough that it could be a jumping off point to build some other cool little toys.
- Leverage regular patterns in urbit app urls to build tools to give you fine grained control over how you navigate around your ship's frontend interface.
- Navigate around the regular web using patterns you've saved and tools you've built on your urbit.
- ...
- Clone this repo.
- Boot up a ship (fakezod or moon or whatever you use).
|new-desk %surf
to create a new desk called%surf
.|mount %surf
to access the%surf
desk from the unix command line.- At the unix command line
rm -rf [ship-name]/surf/*
to empty out the contents of the desk. cp -r surf/* [ship-name]/surf
to copy the contents of this repo into your new desk.- At the dojo command line
|commit %surf
. - Install with
|install our %surf
. - Link the command line app with
|link %surf
. - Switch through command line apps with
Ctrl+X
until you see the~zod:surf
prompt. - Type
;printer
and hitENTER
to see the currently savedurl
. - Open your browser to
[your-domain-name]/apps/surf
. - Type
;set-url 'http[s]://[your-domain-name]'
and hitENTER
from the CLI to navigate to your urbit's frontend.
- To learn more about building urbit command line interfaces you can go here.
- To learn more about using urbit's http-api you can go here.
mark: %surf-action
poke-as-noun: [%set-url url=cord]
poke with http-api:
poke('surf', 'surf-action', {
"set-url": "https://urbit.org/"
})
Dojo: .^([%url cord] %gx /=surf=/url/noun)
Browser: [your-domain-name]/~/scry/surf/url.json
/url