toolkit
toolkit copied to clipboard
Changeable text in the SHARELATEX_RIGHT_FOOTER field
I would like to add a changeable text in the SHARELATEX_RIGHT_FOOTER field. To do this, the easiest way is to write the simplest script in js. How can I add this script?
JS
window.onload = function() {
var textArray = [
'Text 1',
'Text 2',
'Text 3',
];
var rotatingText = document.getElementById('ChangableText');
var randomIndex = Math.floor(Math.random() * textArray.length);
ChangableText.innerHTML = textArray[randomIndex];
}