Skip to content

Commit e751b8d

Browse files
authored
Update and rename docs/desktopapps.md to docs/desktopapps/index.md
1 parent 0f3b1cb commit e751b8d

1 file changed

Lines changed: 18 additions & 10 deletions

File tree

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,29 @@ To include it simply add a script element to a json called `_yab_desktop.json`:
1111

1212
```json
1313
{
14-
"name": "My Cool Website", // Name of the desktop shortcut,
15-
"icon": https...png // appears when user launches app
14+
"name": "My Cool Website",
15+
"icon": "https...png",
1616
"rules": {
17-
"externalUrls": "browser", // "browser" opens any urls the user clicks on in yab. true allows user to open new sites in the same window. false disables all external urls from working.
18-
"allowDevTools": false, // disable or enable yab dev tools
19-
},
17+
"externalUrls": "browser",
18+
"allowDevTools": false
19+
},
2020
"window": {
21-
"theme": "#0000" // the color of the window controls. Only works if user has setting "Use OS Native Window Controls" enabled in browser
22-
"width": 800, // width in px
23-
"height": 600, // height in px
24-
"fullscreen": false // launch fullscreen?
21+
"theme": "#0000",
22+
"width": 800,
23+
"height": 600,
24+
"fullscreen": false
2525
}
2626
}
2727
```
28-
28+
- `name` Name of the desktop shortcut
29+
- `icon` Icon that appears when user launches app
30+
- `rules` Opens any urls the user clicks on in yab. true allows user to open new sites in the same window. false disables all external urls from working.
31+
- `externalUrls` "browser" opens any urls the user clicks on in yab. true allows user to open new sites in the same window. false disables all external urls from working.
32+
- `allowDevTools` disable or enable yab dev tools
33+
- `theme` the color of the window controls. Only works if user has setting "Use OS Native Window Controls" enabled in browser
34+
- `width` width in px
35+
- `height` height in px
36+
- `fullscreen` launch fullscreen?
2937
Some additional lua api exists to check if the website is running in the desktop environment:
3038
```lua
3139
if (browser._yab_.isPackaged) {

0 commit comments

Comments
 (0)