_locales
folder.This is the content of the bookmarklet:
javascript:
var admit = 'ADMIT_KEYWORD';
button_added = document.getElementById('auto-admit-div');
var toggle;
if(button_added == null){
Initialize();
}else{
Toggle();
}
function Initialize(){
var newdiv = document.createElement('div');
newdiv.id = 'auto-admit-div';
newdiv.style.display = 'none';
button_added = document.body.appendChild(newdiv);
Toggle();
setInterval(Update, 500);
}
function Update() {
if(toggle){
for (let element of document.getElementsByTagName('span')) {
if (element.innerHTML === admit){
element.click();
}
}
}
}
function Toggle(){
button_added.classList.toggle('on');
toggle = button_added.classList.contains('on');
alert('Auto admit turned '+(toggle?'on':'off'));
}
Simply replace the ADMIT_KEYWORD
with the display text in your language☺.
Everyone is welcome to translate Auto Admit to other languages. If you want to do so, simply add issues, or make pull requests if you know how to edit the locales file.