| Server IP : 146.59.209.152 / Your IP : 216.73.216.46 Web Server : Apache System : Linux webm005.cluster131.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64 User : infrafs ( 43850) PHP Version : 8.2.29 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/infrafs/INFRABIKEUS/wp-content/plugins/weglot/app/javascripts/settings/ |
Upload File : |
const init_private_mode = function () {
const $ = jQuery
const execute = () => {
document.querySelector("#private_mode").addEventListener('change', function(e) {
document.querySelectorAll(".private-mode-lang--input").forEach((itm) => {
itm.checked = e.target.checked;
})
})
document.querySelectorAll(".private-mode-lang--input").forEach((itm) => {
itm.addEventListener('change', function(e){
if (document.querySelectorAll(".private-mode-lang--input:checked").length === 0){
document.querySelector("#private_mode").checked = false
}
})
});
}
document.addEventListener('DOMContentLoaded', () => {
const private_mode = document.querySelector("#private_mode")
if (private_mode && private_mode.length != 0){
execute();
}
})
}
export default init_private_mode;