MA0301/tools/discrete-extraction-tools/scripts/boolean-algebra/inner.js

19 lines
538 B
JavaScript

console.log("boolean-algebra/inner.js injected successfully!");
const redefineConsoleLog = () => {
const oldLog = console.log;
console.log = (...message) => {
if (typeof message === 'object' && Array.isArray(message) && Array.isArray(message[0])) {
window.localStorage.setItem('boolean-result', JSON.stringify(message[0][0]));
}
oldLog.apply(console, message);
};
}
redefineConsoleLog();
answerMathField.latex(window.localStorage.getItem('boolean-expression'));
document.getElementById('submit-btn').click();