let tnc_div = document.createElement('div'); tnc_div.innerHTML = `

Cookies may be used. Please read our privacy policy for more information.

By accepting to enter you agree to our rules and terms of service.

Agree / Disagree

`; document.addEventListener('DOMContentLoaded', () => { if(shm_cookie_get("ui-tnc-agreed") !== "true" && window.location.href.indexOf("/wiki/") == -1) { document.body.classList.add('censored'); document.body.appendChild(tnc_div); } }); function tnc_agree() { shm_cookie_set("ui-tnc-agreed", "true"); document.body.classList.remove('censored'); tnc_div.remove(); } function image_hash_ban(id) { var reason = prompt("WHY?", "DNP"); if(reason) { $.post( "/image_hash_ban/add", { "image_id": id, "reason": reason, }, function() { $("#thumb_" + id).parent().parent().hide(); } ); } }