Board Thread:Support Requests - Getting Technical/@comment-13825175-20140604095357

Hello,

As you know, all logged-in users can delete a post in forums and they are free to check or not the notify-admin check-box. So, is it possible to disable and check this check-box if the user is not a sysop ?

I post this question at the french community and they give me a script. But, the glitch is that as the pop-up is load after the document (page), the script doesn't recognize the check-box.

Is it possible to load the script as soon as the pop-up is load ?

Thank you in advance.

Code :

/* blocage de la case "Notifier un administrateur" pour les forums */ $(function { if (wgNamespaceNumber === 1201) {    if ($.inArray('sysop', wgUserGroups) == -1) {      if ($('#notify-admin')) {        $('#notify-admin').prop('checked', true);        $('#notify-admin').prop('disabled', true);      }    }  } });  