set script_playpause to "var buttons = ['playButton', 'pauseButton']; var elem; for (index=0; index < buttons.length; ++index) { elem = document.getElementsByClassName(buttons[index])[0]; if (elem.style.display != 'none') { elem.click(); break; } }"