Advertisement
Guest User

Untitled

a guest
Jun 21st, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.66 KB | None | 0 0
  1. <div id="barraaceptacion" style="display: none; font-size: .5rem">
  2. <div class="inner">
  3. Solicitamos su permiso para obtener datos estadísticos de su navegación en esta web, en cumplimiento del Real
  4. Decreto-ley 13/2012. Si continúa navegando consideramos que acepta el uso de cookies.
  5. <a href="javascript:void(0);" class="ok" onclick="PonerCookie();"><b>OK</b></a> |
  6. <a href="https://idbocompliance.com/cookies.html" target="_blank" class="info">Más información</a>
  7. </div>
  8. </div>
  9. <script>
  10.  
  11. function getCookie(cname){
  12. var name = cname + "=";
  13. var decodedCookie = decodeURIComponent(document.cookie);
  14. var ca = decodedCookie.split(';');
  15. for(var i = 0; i <ca.length; i++) {
  16. var c = ca[i];
  17. while (c.charAt(0) == ' ') {
  18. c = c.substring(1);
  19. }
  20. if (c.indexOf(name) == 0) {
  21. return c.substring(name.length, c.length);
  22. }
  23. }
  24. return "";
  25. }
  26.  
  27. function setCookie(c_name,value,exdays){
  28. var d = new Date();
  29. d.setTime(d.getTime() + (exdays*24*60*60*1000));
  30. var expires = "expires="+ d.toUTCString();
  31. document.cookie = c_name + "=" + value + ";" + expires + ";path=/";
  32. }
  33.  
  34.  
  35. function PonerCookie(){
  36. setCookie('idbo-markel','1',365);
  37. document.getElementById("barraaceptacion").style.display="none";
  38. }
  39.  
  40. document.onreadystatechange = () => {
  41. var username = getCookie('idbo-markel');
  42. if (username != "") {
  43. } else {
  44. var a = document.getElementById("barraaceptacion").style.display="block";
  45. }
  46. };
  47. </script>
  48.  
  49. /* COOKIES */
  50.  
  51. #barraaceptacion {
  52. display: none;
  53. position: fixed;
  54. left: 0px;
  55. right: 0px;
  56. bottom: 0px;
  57. padding-bottom: 20px;
  58. width: 100%;
  59. text-align: center;
  60. min-height: 40px;
  61. background-color: rgba(0, 0, 0, 0.5);
  62. color: #fff;
  63. z-index: 99999;
  64. }
  65.  
  66. .inner {
  67. width: 100%;
  68. position: absolute;
  69. padding-left: 5px;
  70. font-family: verdana;
  71. font-size: 11px;
  72. top: 30%;
  73. }
  74.  
  75. .inner a.ok {
  76. padding: 4px;
  77. color: #00ff2e;
  78. text-decoration: none;
  79. }
  80.  
  81. .inner a.info {
  82. padding-left: 5px;
  83. text-decoration: none;
  84. color: #faff00;
  85. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement