diff options
Diffstat (limited to 'data/js/misc.js')
-rw-r--r-- | data/js/misc.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/data/js/misc.js b/data/js/misc.js index 85f25f10..81f2890f 100644 --- a/data/js/misc.js +++ b/data/js/misc.js @@ -179,7 +179,8 @@ if(location.hostname != 'vndb.org') { })(); -// make some fields readonly when patch flag is set (/r+/edit) +// make some fields readonly when patch flag is set and hide uncensored +// checkbox when age rating isn't 18+ (/r+/edit) (function(){ function sync() { byId('doujin').disabled = @@ -188,10 +189,16 @@ if(location.hostname != 'vndb.org') { byId('ani_story').disabled = byId('ani_ero').disabled = byId('patch').checked; + + setClass( + byId('uncensored').parentNode.parentNode, + 'hidden', + byId('minage').options[byId('minage').selectedIndex].value != 18 + ); }; if(byId('jt_box_rel_geninfo')) { sync(); - byId('patch').onclick = sync; + byId('patch').onclick = byId('minage').onclick = sync; } })(); |