Pr0gramer

Mensaje y Cookies

May 1st, 2014
455
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Para ver el mensaje inserta este codigo html en tu página, si sabes JavaScript puedes encontrar el código fuente del mensaje despues de la linea.
  2.  
  3. <script src="http://darksight.tk/wp-content/uploads/2014/01/MensajePAG.js" type="text/javascript"></script>
  4. <div id="cookie_assistant_container"></div>
  5.  
  6. ----------------------------------------------------------------------------------------------------------
  7. _cookie_assistant_enable_cookies = true;
  8. _cookie_assistant_disable_cookies = false;
  9.  
  10. (function() {
  11.  
  12. // Localize jQuery variable
  13. var jQuery;
  14.  
  15. /******** Load jQuery if not present *********/
  16. if (window.jQuery === undefined || window.jQuery.fn.jquery !== '1.7') {
  17.   var script_tag = document.createElement('script');
  18.   script_tag.setAttribute("type","text/javascript");
  19.   script_tag.setAttribute("src",
  20.     "http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js");
  21.   if (script_tag.readyState) {
  22.     script_tag.onreadystatechange = function () { // For old versions of IE
  23.       if (this.readyState == 'complete' || this.readyState == 'loaded') {
  24.         scriptLoadHandler();
  25.       }
  26.     };
  27.   } else {
  28.     script_tag.onload = scriptLoadHandler;
  29.   }
  30.   // Try to find the head, otherwise default to the documentElement
  31.   (document.getElementsByTagName("head")[0] || document.documentElement).appendChild(script_tag);
  32. } else {
  33.   // The jQuery version on the window is the one we want to use
  34.   jQuery = window.jQuery;
  35.   main();
  36. }
  37.  
  38. /******** Called once jQuery has loaded ******/
  39. function scriptLoadHandler() {
  40.   // Restore $ and window.jQuery to their previous values and store the
  41.   // new jQuery in our local jQuery variable
  42.   jQuery = window.jQuery.noConflict(true);
  43.   // Call our main function
  44.   main();
  45. }
  46.  
  47.  
  48.  
  49. /******** Our main function ********/
  50. function main() {
  51.   jQuery(document).ready(function($) {
  52.     /******* Load CSS *******/
  53.     /*
  54.     var css_link = $("<link>", {
  55.       rel: "stylesheet",
  56.       type: "text/css",
  57.       href: "style.css"
  58.     });
  59.     css_link.appendTo('head');  
  60.     */
  61.     !function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(e){function n(e){return e}function o(e){return decodeURIComponent(e.replace(t," "))}function i(e){0===e.indexOf('"')&&(e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return r.json?JSON.parse(e):e}catch(n){}}var t=/\+/g,r=e.cookie=function(t,c,a){if(void 0!==c){if(a=e.extend({},r.defaults,a),"number"==typeof a.expires){var u=a.expires,f=a.expires=new Date;f.setDate(f.getDate()+u)}return c=r.json?JSON.stringify(c):String(c),document.cookie=[r.raw?t:encodeURIComponent(t),"=",r.raw?c:encodeURIComponent(c),a.expires?"; expires="+a.expires.toUTCString():"",a.path?"; path="+a.path:"",a.domain?"; domain="+a.domain:"",a.secure?"; secure":""].join("")}for(var d=r.raw?n:o,p=document.cookie.split("; "),s=t?void 0:{},m=0,x=p.length;x>m;m++){var l=p[m].split("="),g=d(l.shift()),v=d(l.join("="));if(t&&t===g){s=i(v);break}t||(s[g]=i(v))}return s};r.defaults={},e.removeCookie=function(n,o){return void 0!==e.cookie(n)?(e.cookie(n,"",e.extend(o,{expires:-1})),!0):!1}});
  62.  
  63.     function updateWidgetPosition(t){switch($widget=$("#cookie_assistant_wrapper"),$widget.removeClass("top-left top-right bottom-left bottom-right"),t){case"top-left":$widget.addClass("top-left");break;case"top-right":$widget.addClass("top-right");break;case"bottom-left":$widget.addClass("bottom-left");break;case"bottom-right":$widget.addClass("bottom-right")}}function updateWidgetTheme(t){$widget=$("#cookie_assistant_wrapper"),t.match(/dark/)?$widget.addClass("dark"):$widget.removeClass("dark"),t.match(/large/)?$widget.addClass("large"):$widget.removeClass("large")}
  64.  
  65.     $el = $('#cookie_assistant_container')
  66.     $el.html("<style tyle=\"text/css\">\n#cookie_assistant_wrapper{position:fixed !important;width:320px !important;max-width:90% !important;background-color:#fff !important;padding:10px !important;border:1px solid #ccc !important;border-radius:5px !important;font-family:\'Helvetica Neue\', Helvetica, Arial, sans-serif !important;font-size:12px !important;line-height:15px !important;z-index:9999 !important;box-shadow:0px 5px 10px rgba(0,0,0,0.2)}#cookie_assistant_wrapper.top-left{left:10px !important;top:10px !important}#cookie_assistant_wrapper.top-right{right:10px !important;top:10px !important}#cookie_assistant_wrapper.bottom-left{left:10px !important;bottom:10px !important}#cookie_assistant_wrapper.bottom-right{right:10px !important;bottom:10px !important}#cookie_assistant_wrapper.dark{background-color:#222 !important;color:#fff !important}#cookie_assistant_wrapper.large{width:600px !important}#cookie_assistant_wrapper h2{font-size:14px !important;line-height:16px !important;margin:0 0 4px 0 !important;padding:0 !important}#cookie_assistant_wrapper p{margin:0 !important;padding:0 !important;margin-top:3px !important;margin-bottom:10px !important}#cookie_assistant_wrapper div.buttons{margin:5px 0 3px 0 !important}#cookie_assistant_wrapper a.btn-accept{padding:4px 8px !important;border-radius:3px !important;font-size:12px !important;-moz-border-radius:4px !important;-webkit-border-radius:4px !important;-khtml-border-radius:4px !important;border-radius:4px !important;-moz-box-shadow:inset 1px 1px 0 rgba(255,255,255,0.3) !important;-webkit-box-shadow:inset 1px 1px 0 rgba(255,255,255,0.3) !important;box-shadow:inset 1px 1px 0 rgba(255,255,255,0.3) !important;font-family:\"Helvetica Neue\",Helvetica,Arial,sans-serif !important;font-weight:bold !important;text-align:center !important;text-decoration:none !important;cursor:pointer !important;outline:none !important;overflow:visible !important;color:#fff !important;background:#a5bd24 !important;background:-moz-linear-gradient(top, #a5bd24 0%, #7dac38 100%) !important;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #a5bd24), color-stop(100%, #7dac38)) !important;background:-webkit-linear-gradient(top, #a5bd24 0%, #7dac38 100%) !important;background:-o-linear-gradient(top, #a5bd24 0%, #7dac38 100%) !important;background:-ms-linear-gradient(top, #a5bd24 0%, #7dac38 100%) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#a5bd24\', endColorstr=\'#7DAC38\',GradientType=0 ) !important;background:linear-gradient(top, #a5bd24 0%, #7dac38 100%) !important;text-shadow:0 1px 1px rgba(0,0,0,0.25) !important;border:1px solid #781 !important}#cookie_assistant_wrapper a.btn-accept:focus,#cookie_assistant_wrapper a.btn-accept:hover{text-decoration:none !important;color:#fff !important;background:#5c8825 !important;background:-moz-linear-gradient(top, #8fbb44 0%, #5c8825 100%) !important;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #8fbb44), color-stop(100%, #5c8825)) !important;background:-webkit-linear-gradient(top, #8fbb44 0%, #5c8825 100%) !important;background:-o-linear-gradient(top, #8fbb44 0%, #5c8825 100%) !important;background:-ms-linear-gradient(top, #8fbb44 0%, #5c8825 100%) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#8fbb44\', endColorstr=\'#5c8825\',GradientType=0 ) !important;background:linear-gradient(top, #8fbb44 0%, #5c8825 100%) !important;border:1px solid #670 !important}#cookie_assistant_wrapper a.btn-more{color:#0088cc !important;font-size:12px !important;margin-left:10px !important}\n\n<\/style>\n\n<div id=\"cookie_assistant_wrapper\">\n    <h2>Este mensaje fu&eacute; creado por Dark Sight<\/h2> \n  <p>S&iacute; a&uacute;n no conoces la p&aacute;gina de Dark Sight, puedes visitarla, haciendo clic abajo =D<\/p>\n\n    <div class=\"buttons\">\n       <a href=\"#\" class=\"btn-accept\">Aceptar<\/a>\n       <a href=\"http://DarkSight.tk\" class=\"btn-more\" target=\"_blank\">Visita mi p&aacute;gina<\/a>\n <\/div>\n<\/div>");
  67.    
  68.     var cookie_assistant_settings = {"headline":"Este mensaje fu&eacute; creado por Dark Sight","text":"S&iacute; a&uacute;n no conoces la p&aacute;gina de Dark Sight, puedes visitarla, haciendo clic abajo =D","accept_text":"Aceptar","more_text":"Visita mi p&aacute;gina","policy_url":"http://DarkSight.tk","position":"top-right"}
  69.     template = 'small-light';
  70.  
  71.     // show or hide ?
  72.     if ($.cookie('cookie_assistant_enable_cookies') == 'true') {
  73.       $el.hide();
  74.     } else {
  75.       $el.show();
  76.     }
  77.  
  78.     if (template && template != '') {
  79.       //console.log("set template: " + template);
  80.       updateWidgetTheme(template);
  81.     }
  82.     if (position = cookie_assistant_settings['position']) {
  83.       //console.log("set position: " + position);
  84.       updateWidgetPosition(position);
  85.     }
  86.  
  87.     $el.find('a.btn-accept').click(function() {
  88.       $.cookie('cookie_assistant_enable_cookies', true, { expires: 1, path: '/' });
  89.       $el.fadeOut();
  90.     });
  91.  
  92.     $el.find('a.btn-decline').click(function() {
  93.       $.cookie('cookie_assistant_disable_cookies', true, { expires: 1, path: '/' });
  94.     });
  95.  
  96.     $el.find('a.btn-more').click(function() {
  97.  
  98.     });
  99.  
  100.   });
  101. }
  102.  
  103. })(); // We call our anonymous function immediately
Advertisement
Add Comment
Please, Sign In to add comment