diff --git a/README.md b/README.md
index 01046c5..b7b7691 100644
--- a/README.md
+++ b/README.md
@@ -62,7 +62,8 @@ Alternative block explorers:
The key features of the Onion Monero Blockchain Explorer are:
- - no javascript, no cookies, no web analytics trackers, no images,
+ - no cookies, no web analytics trackers, no images,
+ - by default no JavaScript, but can be enabled for client side decoding and proving transactions,
- open sourced,
- made fully in C++,
- showing encrypted payments ID,
@@ -176,6 +177,8 @@ xmrblocks, Onion Monero Blockchain Explorer:
--show-cache-times [=arg(=1)] (=0) show times of getting data from cache
vs no cache
--enable-block-cache [=arg(=1)] (=0) enable caching of block details
+ --enable-js [=arg(=1)] (=0) enable checking outputs and proving txs
+ using JavaScript on client side
--enable-autorefresh-option [=arg(=1)] (=0)
enable users to have the index page on
autorefresh
diff --git a/src/page.h b/src/page.h
index f53b927..082a6ec 100644
--- a/src/page.h
+++ b/src/page.h
@@ -404,6 +404,16 @@ namespace xmreg
template_file["config.js"] = xmreg::read(JS_CONFIG);
template_file["biginteger.js"] = xmreg::read(JS_BIGINT);
+
+ // need to set "testnet: false," flag to reflect
+ // if we are running testnet or mainnet explorer
+
+ if (testnet)
+ template_file["config.js"] = std::regex_replace(
+ template_file["config.js"],
+ std::regex("testnet: false"),
+ "testnet: true" );
+
js_html_files += "";
js_html_files += "";
js_html_files += "";
diff --git a/src/templates/js/config.js b/src/templates/js/config.js
index 03f521f..993b272 100755
--- a/src/templates/js/config.js
+++ b/src/templates/js/config.js
@@ -1,5 +1,5 @@
var config = {
- testnet: false, //@todo need to make it automated
+ testnet: false, // this is adjusted page.h if needed. dont need to change manually
coinUnitPlaces: 12,
txMinConfirms: 10, // corresponds to CRYPTONOTE_DEFAULT_TX_SPENDABLE_AGE in Monero
txCoinbaseMinConfirms: 60, // corresponds to CRYPTONOTE_MINED_MONEY_UNLOCK_WINDOW in Monero