Skip to content

πŸ•Έ Open a website as a standalone window with Deno

License

Notifications You must be signed in to change notification settings

ninest/web-window

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

18 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ•Έ Web Window

Open a website as a standalone window with Deno

Made with Deno Make a PR MIT Buy Me A Coffee

Demo

This app uses deno_webview and denomander.

πŸš€ Features

  • 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

🌏 Options

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.

Examples

# 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

πŸ‘Ÿ Running as an app

Mac

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)

πŸ›  Build setup

Clone or fork the repository, then run

deno run -A --unstable index.ts open https://github.com/ninest

😱 Issues and limitations

  • 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

β™₯️ Support

If you liked this project, consider supporting by

  • ⭐️ Starring the repository
  • πŸŽ’ Checking out my other projects
  • β˜•οΈ Buying me coffee

πŸ“œ License

MIT

About

πŸ•Έ Open a website as a standalone window with Deno

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published