Add custom javascript file

-The custom.js file can be used to add custom javascript code without affecting the ability to do a git pull update
-Added a quick explanation of using the custom.js file in the "Configure Explorer Settings" section of the README
This commit is contained in:
Joe Uhren
2022-07-06 21:50:00 -06:00
parent 4681fa1e65
commit e5d4c639d3
3 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -284,7 +284,7 @@ cp ./settings.json.template ./settings.json
*Make required changes in settings.json*
**NOTE:** You can further customize the site by adding css rules to the `public/css/custom.scss` file. Adding changes to `custom.scss` is the preferred method of customizing the css rules for your site, without affecting the ability to receive explorer code updates in the future.
**NOTE:** You can further customize the site by adding your own javascript code to the `public/js/custom.js` file and css rules to the `public/css/custom.scss` file. Adding changes to `custom.js` and `custom.scss` is the preferred method of customizing your site, without affecting the ability to receive explorer code updates in the future.
### Start/Stop the Explorer
+3
View File
@@ -0,0 +1,3 @@
$(document).ready(function() {
/* Add custom javascript code here */
});
+1
View File
@@ -24,6 +24,7 @@ html(lang='en')
link(rel='stylesheet', href='/css/custom.min.css' + (customHash == null ? '' : '?h=' + customHash))
script(type='text/javascript', src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js', integrity='sha512-894YE6QWD5I59HgZOGReFYm4dnWc1Qt5NtvYSaNcOP+u1T9qYdvdihz0PPSiiqn/+/3e7Jo4EaG7TubfWGUrMQ==', crossorigin='anonymous', referrerpolicy='no-referrer')
script(type='text/javascript', src='https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js', integrity='sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p', crossorigin='anonymous')
script(type='text/javascript', src='/js/custom.js')
if active == 'markets' || active == 'richlist'
script(type='text/javascript', src='https://cdnjs.cloudflare.com/ajax/libs/jqPlot/1.0.9/jquery.jqplot.min.js')
if active == 'markets'