Skip to content

Commit 30238c7

Browse files
author
avscs
committed
updated documentation
1 parent 124144c commit 30238c7

File tree

2 files changed

+80
-2
lines changed

2 files changed

+80
-2
lines changed

README.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,75 @@ Welcome to MonkeyGG2, a feature-rich game site created for you! With over 150 ga
2525
- Proxy
2626
- And More...
2727

28+
## Customization
29+
30+
### Settings
31+
32+
#### Cloaking
33+
34+
Cloaking refers to opening the page in an `about:blank` tab. This behavior is forced by default, although it can be disabled. Presets are available for the redirect link however that can also be manually configured.
35+
36+
#### Masking
37+
38+
Masking refers to changing the icon and tab title of the about:blank tab. Presets are available for the icon and tab title however that can also be manually configured.
39+
40+
#### Shortcuts
41+
42+
Custom keyboard shortcuts can be created to perform a variety of tasks. For example, exiting the game, masking the tab, and executing custom JavaScript are all supported.
43+
> Note: if you want to execute custom JavaScript, make sure you know what you are doing. If you do break something, a page reload is always the solution.
44+
45+
#### Theme
46+
47+
The following theme customizations are supported currently:
48+
- Toggle Background Animation (if you are worried about performance mid-game, don't worry it's automatically disabled whenever you are playing a game)
49+
- Background Color
50+
- Block Color
51+
- Button Color
52+
- Games Color
53+
- Hover Color
54+
- Scrollbar Color
55+
- Scroll Track Color
56+
- Font Color
57+
58+
> Note: if you accidentally change the colors so that the site is unusable, you'll have to clear your cookies and local storage.
59+
60+
### Advanced Customization
61+
62+
> Disclaimer: The following customizations are only available to owners of the repository or any fork of this repository.
63+
64+
The `config.jsonc` file is formatted to include configuration for the entire site. Currently, the following items are supported:
65+
- Games
66+
- Themes (coming soon)
67+
- Proxy Configuration
68+
69+
#### Games
70+
71+
Each game entry has a key representing the display name of the game, and the value should be an object with three key-value pairs:
72+
- `"path"`: Path to the game from `./games` directory
73+
- `"aliases"`: List of alternative names for the game used to enhance search
74+
- `"categories"`: List of categories the game fits in (support for adding icons coming soon)
75+
76+
Adding an entry manually is possible, but tedious especially if you want to alphanumerically order the list (not required for the configuration to work though!)
77+
This is why the script `add-game-entry.js` was created, an easy way to add a new game into the configuration without having to manually edit the file.
78+
79+
```bash
80+
# You can use any js runtime such as node.js, bun, or deno
81+
# For this demonstration bun will be used as dependencies are automatically installed
82+
bun add-game-script.js
83+
# Answer the prompts that follow and the configuration will be updated
84+
```
85+
86+
#### Themes
87+
88+
Theme standard not implemented yet (TODO)
89+
90+
#### Proxy
91+
92+
Proxy configuration options are under the **"config"** key.
93+
The value for key `"proxy"` is a boolean value that enables or disables the proxy function. If `"proxy"` is set to false, then the user will be greeted with an error dialog when attempting to access the proxy.
94+
The value for key `"proxyPath"` is the path to the proxy. It can be an absolute path or a relative path, but the proxy must support **CORS** as the proxy page will be displayed as an iframe on the site.
95+
96+
2897
## Deployment
2998

3099
### Without Proxy

config.jsonc

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,11 @@
8080
"aliases": [],
8181
"categories": []
8282
},
83+
"Aground": {
84+
"path": "aground",
85+
"aliases": [],
86+
"categories": []
87+
},
8388
"Amidst The Sky": {
8489
"path": "amidst-the-sky",
8590
"aliases": [],
@@ -846,6 +851,11 @@
846851
"aliases": [],
847852
"categories": []
848853
},
854+
"Swords and Souls": {
855+
"path": "flash/?game=swords-and-souls",
856+
"aliases": [],
857+
"categories": []
858+
},
849859
"The Final Earth": {
850860
"path": "the-final-earth",
851861
"aliases": [],
@@ -978,7 +988,6 @@
978988
"config": {
979989
"proxy": true, // proxy only works when self-hosted
980990
"proxyPath": "https://monkey.nordparrot.ro" // absolute or relative path to proxy; proxy must be set to true for this setting to have any effect.
981-
// if you are using VioletGG2, all you need to do set proxy to true
982-
// proxyPath is already set for you if you are using VioletGG2
991+
// if you are using VioletGG2, all you need to do set proxy to "/proxy.html"
983992
}
984993
}

0 commit comments

Comments
 (0)