diff --git a/README.md b/README.md index 4b7bcf5..e158425 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/public/js/custom.js b/public/js/custom.js new file mode 100644 index 0000000..cac6a6b --- /dev/null +++ b/public/js/custom.js @@ -0,0 +1,3 @@ +$(document).ready(function() { + /* Add custom javascript code here */ +}); \ No newline at end of file diff --git a/views/layout.pug b/views/layout.pug index a0e99c7..001a160 100644 --- a/views/layout.pug +++ b/views/layout.pug @@ -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'