Open a website as a standalone window with Deno
This app uses deno_webview and denomander.
- Open a website (and specify title, resizable, and fullscreen)
- Set toolbar color
- Install "executable", so website can be opened as an app without using command-line
To open a website as a window, run
deno run -A --unstable https://cdn.jsdelivr.net/gh/ninest/web-window/src/mod.ts open https://github.com/ninest
Note: jsdelivr is used over raw.githubusercontent.com because it is shorter and faster.
There are a few more options:
--fullscreen
: Open the window in fullscreen--title <string>
: Set the window's title, to show in the toolbar--resizable <bool>
: Whether the window should be resizable (defaults to true)
-f
, -t <string>
, and -r <bool>
can also be used.
# Open my github profile in a window with a title "Ninest"
deno run -A --unstable https://cdn.jsdelivr.net/gh/ninest/web-window/src/mod.ts open https://github.com/ninest --title "Ninest"
# Open youtube in fullscreen with no title
deno run -A --unstable https://cdn.jsdelivr.net/gh/ninest/web-window/src/mod.ts open http://youtube.com/ --fullscreen
(no need to download anything to run these examples)
To see a list of all options/commands, run
deno run -A --unstable https://cdn.jsdelivr.net/gh/ninest/drink-if-exists/src/mod.ts --help
Create a file app.command
with the following:
#!/bin/sh
deno run -A --unstable https://cdn.jsdelivr.net/gh/ninest/web-window/src/mod.ts open https://github.com/ninest
(see the file example-app.command
)
If you don't have priviledges to open the file, open Terminal and enter the command
chmod u+x app.command
Now open app.command
(double-click it in Finder)
Clone or fork the repository, then run
deno run -A --unstable index.ts open https://github.com/ninest
- Non-resiable windows cannot be put into fullscreen
WebView.setColor
doesn't seem to work on Mac OS. When this is fixed,--color
can be added
If you liked this project, consider supporting by
MIT