The window system used in Nightmare
Add the js and css CDN and create a new window
<script src="https://cdn.jsdelivr.net/gh/FogNetwork/Nightmare-Windows/windows.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/FogNetwork/Nightmare-Windows/windows.css">
new Nightmare({
"title": "Example",
"type": "url",
"url": "https://example.com",
"width": 600,
"height": 400,
})
new Nightmare({
"title": "Example", //Window Title - Required
"type": "html", //URL, Html or Js - Required
"url": "https://example.com", //For url
"html": "<button>hi</button>", //For html
"js": "https://example.com/script.js", //For js url
"width": 800, //Width - No quotes
"height": 600, //Height - No quotes
"theme": "dark" //Light or Dark
})
url
Just add a url which will be added in an iframe
html
Just add html code which will be added in the window
js
Add a url to a js file that will be run onclick. Allows for more custom features
When creating a js app it will inject a var called appid
which is the window. You can append a element inside using appid.appendChild(element)
If you wish to use Nightmare Windows commercially (on your service) you must include credit to Nightmare Windows somewhere on your service