Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save nyimbi/dcfc8a95ead8eb93e16e99f229d20d4f to your computer and use it in GitHub Desktop.
Save nyimbi/dcfc8a95ead8eb93e16e99f229d20d4f to your computer and use it in GitHub Desktop.
ChatGPT Improves Itself
javascript:(function() {
var timeout = null;
var delay = 1000;
var script = document.createElement('script');
script.src = 'https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js';
document.head.appendChild(script);
script.addEventListener('load', function() {
var mathJaxConfig = {
jax: ["input/TeX", "output/HTML-CSS"],
tex: {
inlineMath: [ ['$','$'], ['\\(','\\)'] ],
displayMath: [ ['$$','$$'], ['\\[','\\]'] ],
processEscapes: true,
processEnvironments: true,
},
options: {
ignoreHtmlClass: 'tex2jax_ignore',
processHtmlClass: 'tex2jax_process'
}
};
window.MathJax.config = mathJaxConfig;
(function() {
function typeset() {
try {
window.MathJax.typeset();
} catch (err) {
console.error(err);
}
}
typeset();
var timeout = null;
var delay = 1000;
var observer = new MutationObserver(function() {
if (timeout) {
clearTimeout(timeout);
}
timeout = setTimeout(function() {
typeset();
}, delay);
});
observer.observe(document.body, { childList: true, subtree: true });
})();
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment