Except from what we have introduced in previous section, there are some other variables which can be set as custom values.
window.HanjstDefault = {
//- variables from response starting with this, e.g. $pageTitle
"TplVarTag": "$",
//- an html element id which holds server response json data
"JsonDataId": "Hanjstjsondata",
//- inner usage
"LogTag": "Hanjst",
//- inner usage
"ParseTag": "__JSTPL__",
//- verbose output in console
"IsDebug": false,
//- override random string in client side
"RandomString": "myRandomStr"
};
Keys listed in above can be set in window.Hanjst before the main source file, i.e., Hanjst.js .
However it is highly-recommended to keep them untouched due to unexpected or unknown warnings or errors.
Hanjst provides a few environmental values via this keys:
$copyright_year
: current year’s value in four digits, e.g. 2020
$time_stamp
: current time stamp since 1970, in millisecond.