APPSETTINGISSUE : AADHAVAN

This commit is contained in:
aadhavan valli 2024-02-10 11:31:10 +05:30
parent f8bf6bf965
commit 3a5087d1a2
2 changed files with 8 additions and 6 deletions

View File

@ -5991,8 +5991,9 @@ setInterval(removeNonExistentIdseveryTime, 1000)
mathDisableFunction();
}, 1500);
function mathDisableFunction() {
const parentFolder = path.dirname(__filename);
const filePath = path.join(parentFolder, 'mathEnable.json');
// const parentFolder = path.dirname(__filename);
// const filePath = path.join(parentFolder, 'AppSetting.json');
const filePath = 'AppSetting.json';
fs.readFile(filePath, 'utf8', (err, data) => {
if (err) {
console.error('Error reading file:', err);
@ -6000,8 +6001,9 @@ setInterval(removeNonExistentIdseveryTime, 1000)
}
const jsonObject = JSON.parse(data);
var aa= jsonObject.mathEnable;
var aa= jsonObject.AppSetting;
const inputString = aa[0];
console.log(inputString);
const valuesArray = inputString.split(', ');
valuesArray.forEach(value => {
@ -6015,7 +6017,7 @@ setInterval(removeNonExistentIdseveryTime, 1000)
var subTitles= document.querySelectorAll('label')
subTitles.forEach(function (subTitle){
if (subTitle.innerHTML == "Subtitle:") {
subTitle.parentElement.parentElement.style= "display:block";
subTitle.parentElement.style= "display:block";
}
})
}else if(value === 'MathCheckbox'){

View File

@ -972,11 +972,11 @@ function submitValues() {
const string = array.join(', ');
const jsonString = JSON.stringify(string);
console.log(jsonString);
const wrappedJsonString = `{"mathEnable":[${jsonString}]}`;
const wrappedJsonString = `{"AppSetting":[${jsonString}]}`;
const newPath = xmlPath.replace(/\\xml\\/i, '\\');
fs.writeFileSync(`${newPath}mathEnable.json`, wrappedJsonString, 'utf-8');
fs.writeFileSync(`AppSetting.json`, wrappedJsonString, 'utf-8');
}