mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 21:12:53 +02:00
Fix sidebar not showing on first load.
This commit is contained in:
parent
b4391f8218
commit
fff819f56c
3 changed files with 9 additions and 8 deletions
|
@ -1,19 +1,19 @@
|
||||||
#JavaScript Documentation Generation
|
# JavaScript Documentation Generation
|
||||||
|
|
||||||
##Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
* Install node.js.
|
* Install node.js.
|
||||||
* Install jsdoc via npm. `npm install jsdoc -g`
|
* Install jsdoc via npm. `npm install jsdoc -g`
|
||||||
|
|
||||||
If you would like the extra functionality for gravPrep:
|
If you would like the extra functionality for gravPrep:
|
||||||
* Run npm install
|
* Run `npm install`
|
||||||
|
|
||||||
To generate html documentation for the High Fidelity JavaScript API:
|
To generate HTML documentation for the Vircadia JavaScript API:
|
||||||
|
|
||||||
* `cd tools/jsdoc`
|
* `cd tools/jsdoc`
|
||||||
* `jsdoc root.js -r api-mainpage.md -c config.json`
|
* `jsdoc root.js -r api-mainpage.md -c config.json`
|
||||||
|
|
||||||
The out folder should contain index.html.
|
The **out** folder should contain index.html.
|
||||||
|
|
||||||
If you get a "JavaScript heap out of memory" error when running the `jsdoc` command you need to increase the amount of memory
|
If you get a "JavaScript heap out of memory" error when running the `jsdoc` command you need to increase the amount of memory
|
||||||
available to it. For example, to increase the memory available to 2GB on Windows:
|
available to it. For example, to increase the memory available to 2GB on Windows:
|
||||||
|
|
|
@ -45,20 +45,21 @@
|
||||||
|
|
||||||
var defaultDarkDisabled = false;
|
var defaultDarkDisabled = false;
|
||||||
var darkDisabled = isLocalStorageSupported ? JSON.parse(localStorage.getItem('darkDisabled')) : defaultDarkDisabled;
|
var darkDisabled = isLocalStorageSupported ? JSON.parse(localStorage.getItem('darkDisabled')) : defaultDarkDisabled;
|
||||||
|
var nightSheet = document.querySelector('[href="styles/night.css"]');
|
||||||
if (darkDisabled === null) {
|
if (darkDisabled === null) {
|
||||||
localStorage.setItem('darkDisabled', JSON.stringify(defaultDarkDisabled));
|
localStorage.setItem('darkDisabled', JSON.stringify(defaultDarkDisabled));
|
||||||
} else {
|
} else {
|
||||||
var nightSheet = document.querySelector('[href="styles/night.css"]');
|
|
||||||
nightSheet.disabled = darkDisabled;
|
nightSheet.disabled = darkDisabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
var defaultResponsiveDisabled = true;
|
var defaultResponsiveDisabled = true;
|
||||||
var responsiveDisabled =
|
var responsiveDisabled =
|
||||||
isLocalStorageSupported ? JSON.parse(localStorage.getItem('responsiveDisabled')) : defaultResponsiveDisabled;
|
isLocalStorageSupported ? JSON.parse(localStorage.getItem('responsiveDisabled')) : defaultResponsiveDisabled;
|
||||||
|
var responsiveSheet = document.querySelector('[href="styles/responsive.css"]');
|
||||||
if (responsiveDisabled === null) {
|
if (responsiveDisabled === null) {
|
||||||
localStorage.setItem('responsiveDisabled', JSON.stringify(defaultResponsiveDisabled));
|
localStorage.setItem('responsiveDisabled', JSON.stringify(defaultResponsiveDisabled));
|
||||||
|
responsiveSheet.disabled = defaultResponsiveDisabled;
|
||||||
} else {
|
} else {
|
||||||
var responsiveSheet = document.querySelector('[href="styles/responsive.css"]');
|
|
||||||
responsiveSheet.disabled = responsiveDisabled;
|
responsiveSheet.disabled = responsiveDisabled;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -16,7 +16,7 @@ exports.handlers = {
|
||||||
beforeParse: function(e) {
|
beforeParse: function(e) {
|
||||||
var pathTools = require('path');
|
var pathTools = require('path');
|
||||||
var rootFolder = pathTools.dirname(e.filename);
|
var rootFolder = pathTools.dirname(e.filename);
|
||||||
console.log("Scanning hifi source for jsdoc comments...");
|
console.log("Scanning the Vircadia source for JSDoc comments...");
|
||||||
|
|
||||||
// directories to scan for jsdoc comments
|
// directories to scan for jsdoc comments
|
||||||
var dirList = [
|
var dirList = [
|
||||||
|
|
Loading…
Reference in a new issue