Last active
March 4, 2021 16:40
-
-
Save janus57/b1323ab71499f72095d9 to your computer and use it in GitHub Desktop.
disclaimer JavaScript "universal"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* variable(s) */ | |
expireAfter1d = new Date(); | |
expireAfter1d.setDate(expireAfter1d.getDate() + 1); | |
/* fonctions */ | |
function getCookie(cname) { | |
var name = cname + "="; | |
var ca = document.cookie.split(';'); | |
for(var i=0; i<ca.length; i++) { | |
var c = ca[i].trim(); | |
if (c.indexOf(name)==0) return c.substring(name.length,c.length); | |
} | |
return null; | |
} | |
function Entrer() { | |
document.cookie= 'disclaimer=entrer; expires=' + expireAfter1d + ';path=/'; | |
if(document.getElementById) { | |
document.getElementById("disclaimer").style.display='none'; | |
top.location.href=location.href; | |
} | |
} | |
function Sortir() { | |
document.cookie= 'disclaimer=sortie; expires=' + expireAfter1d + ';path=/'; | |
top.location.href='http://www.fun-animes.fr'; | |
} | |
/* message */ | |
if(document.cookie.indexOf("disclaimer") <= -1){ | |
document.write("" | |
+"<style type=\"text/css\">" | |
+"object{ visibility:hidden; }" | |
+"#disclaimer{ text-align:left; }" | |
+"#disclaimer-fond{ position:absolute; z-index:15000; width:100%; height:1850px; background:#fff; text-align:center; line-height:normal; clear:both; filter:alpha(opacity=90); -moz-opacity:0.90; opacity:0.90; }" | |
+"#disclaimer-conteneur{ position:absolute; z-index:15001; width:100%; text-align:center; clear:both; }" | |
+"#disclaimer-cadre{ width:718px; padding:10px; margin:150px auto 0 auto; text-align:left; background:#fff; border:#ddd 1px solid; }" | |
+"#disclaimer-cadre b{ display:block; padding:10px 0 10px 0; text-align:center; font-size:21px; color:#a74900; }" | |
+"#disclaimer-cadre font{ display:block; padding:10px 0 20px 0; text-align:center; font-size:21px; color:#a74900; }" | |
+"#disclaimer-cadre p{ margin:0; padding:10px; font-size:16px; color:#a74900; }" | |
+"#disclaimer-cadre .boutons{ margin:0; padding:10px; text-align:center; }" | |
+"#disclaimer-cadre a{ text-decoration:none; font-size:36px; font-weight:bold; color:#c70000; }" | |
+"#disclaimer-cadre a:hover{ text-decoration:underline; }" | |
+"<\/style>" | |
+"<div id='disclaimer'><div id='disclaimer-fond'></div><div id='disclaimer-conteneur'>" | |
+"<div id='disclaimer-cadre'>" | |
+"<b>CONTENU STRICTEMENT RESERVE AUX ADULTES !</b>" | |
+"<p>Le contenu de ce site ne convient pas à un public mineur. Les photos, vidéos, et textes pornographiques disponibles ici peuvent choquer certaines sensibilités. En entrant, vous déclarez prendre vos responsabilités vis-à-vis de ce contenu.</p>" | |
+"<p>Pour entrer sur ce site, CLIQUEZ SUR ENTRER.</p>" | |
+"<font>SI VOUS ETES MINEUR (- 18 ans), cliquez sur Sortir.</font>" | |
+"<div class='boutons'><a href='#' onclick='Entrer(); return(false)'>ENTRER</a> <a rel='nofollow' href='#' onclick='Sortir(); return(false)'>Sortir</a></div>" | |
+"</div>" | |
+"</div></div>" | |
); | |
} | |
else if (getCookie('disclaimer') == "sortie"){ | |
top.location.href='http://www.fun-animes.fr'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* variable(s) */ | |
expireAfter7d = new Date(); | |
expireAfter7d.setDate(expireAfter7d.getDate() + 7); | |
/* fonctions */ | |
function getCookie(cname) { | |
var name = cname + "="; | |
var ca = document.cookie.split(';'); | |
for(var i=0; i<ca.length; i++) { | |
var c = ca[i].trim(); | |
if (c.indexOf(name)==0) return c.substring(name.length,c.length); | |
} | |
return null; | |
} | |
function Entrer() { | |
document.cookie= 'disclaimer_member=entrer; expires=' + expireAfter7d + ';path=/'; | |
if(document.getElementById) { | |
document.getElementById("disclaimer").style.display='none'; | |
top.location.href=location.href; | |
} | |
} | |
function Sortir() { | |
document.cookie= 'disclaimer_member=sortie; expires=' + expireAfter7d + ';path=/'; | |
top.location.href='http://www.fun-animes.fr'; | |
} | |
/* message */ | |
if(document.cookie.indexOf("disclaimer_member") <= -1){ | |
document.write("" | |
+"<style type=\"text/css\">" | |
+"object{ visibility:hidden; }" | |
+"#disclaimer{ text-align:left; }" | |
+"#disclaimer-fond{ position:absolute; z-index:15000; width:100%; height:1850px; background:#fff; text-align:center; line-height:normal; clear:both; filter:alpha(opacity=90); -moz-opacity:0.90; opacity:0.90; }" | |
+"#disclaimer-conteneur{ position:absolute; z-index:15001; width:100%; text-align:center; clear:both; }" | |
+"#disclaimer-cadre{ width:718px; padding:10px; margin:150px auto 0 auto; text-align:left; background:#fff; border:#ddd 1px solid; }" | |
+"#disclaimer-cadre b{ display:block; padding:10px 0 10px 0; text-align:center; font-size:21px; color:#a74900; }" | |
+"#disclaimer-cadre font{ display:block; padding:10px 0 20px 0; text-align:center; font-size:21px; color:#a74900; }" | |
+"#disclaimer-cadre p{ margin:0; padding:10px; font-size:16px; color:#a74900; }" | |
+"#disclaimer-cadre .boutons{ margin:0; padding:10px; text-align:center; }" | |
+"#disclaimer-cadre a{ text-decoration:none; font-size:36px; font-weight:bold; color:#c70000; }" | |
+"#disclaimer-cadre a:hover{ text-decoration:underline; }" | |
+"<\/style>" | |
+"<div id='disclaimer'><div id='disclaimer-fond'></div><div id='disclaimer-conteneur'>" | |
+"<div id='disclaimer-cadre'>" | |
+"<b>CONTENU STRICTEMENT RESERVE AUX ADULTES !</b>" | |
+"<p>Le contenu de ce site ne convient pas à un public mineur. Les photos, vidéos, et textes pornographiques disponibles ici peuvent choquer certaines sensibilités. En entrant, vous déclarez prendre vos responsabilités vis-à-vis de ce contenu.</p>" | |
+"<p>Pour entrer sur ce site, CLIQUEZ SUR ENTRER.</p>" | |
+"<font>SI VOUS ETES MINEUR (- 18 ans), cliquez sur Sortir.</font>" | |
+"<div class='boutons'><a href='#' onclick='Entrer(); return(false)'>ENTRER</a> <a rel='nofollow' href='#' onclick='Sortir(); return(false)'>Sortir</a></div>" | |
+"</div>" | |
+"</div></div>" | |
); | |
} | |
else if (getCookie('disclaimer_member') == "sortie"){ | |
top.location.href='http://www.fun-animes.fr'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# IF NOT IS_USER_CONNECTED # <script type="text/javascript" src="{PATH_TO_ROOT}/templates/{THEME}/js/disclaimer.js"></script> # ENDIF # | |
# IF IS_MODERATOR # <!-- Modérateur/Admin, pas de disclaimer --> # ELSE # # IF IS_USER_CONNECTED #<script type="text/javascript" src="{PATH_TO_ROOT}/templates/{THEME}/js/disclaimer_membre.js"></script> # END ## ENDIF # |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment