Guest User

Dweet template for Plastuer

a guest
Dec 26th, 2017
313
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.52 KB | None | 0 0
  1. <html>
  2.     <head>
  3.         <title>Wallpaper</title>
  4.         <script type="text/javascript" src="http://code.jquery.com/jquery-2.2.0.js"></script>
  5.        
  6.         <script type="text/javascript">
  7.        
  8.         function ResizeCanvas()
  9.         {
  10.             var can = $("canvas")[0];
  11.            
  12.             if(($(window).width() * 0.5625) > $(window).height())
  13.             {
  14.                 $(can).css("max-width", "100%");
  15.                 $(can).css("max-height", "");
  16.             }
  17.             else
  18.             {
  19.                 $(can).css("max-width", "");
  20.                 $(can).css("max-height", "100%");
  21.             }
  22.         }
  23.        
  24.         $(document).ready(function()
  25.         {
  26.             ResizeCanvas();
  27.            
  28.             $(window).resize(ResizeCanvas);
  29.            
  30.             function GetTime()
  31.             {      
  32.                 var d = new Date();
  33.                 var n = d.getTime();
  34.                
  35.                 return n / 1000;
  36.             }
  37.            
  38.            
  39.             var time = GetTime();
  40.             var S = Math.sin;
  41.             var C = Math.cos;
  42.             var T = Math.tan;
  43.             var R = function(r, g, b, a)
  44.             {
  45.                 if(typeof(a) == "undefined")
  46.                     a = 1.0;
  47.                
  48.                 return "rgba(" + parseInt(r) + ", " + parseInt(g) + ", " + parseInt(b) + ", " + a + ")";
  49.             }
  50.            
  51.             var c = $("canvas")[0];
  52.             var x = c.getContext("2d");
  53.            
  54.             setInterval(function()
  55.             {
  56.                 u(GetTime() - time);
  57.             }, 1000/60);
  58.            
  59.    
  60.  
  61.  
  62.             /* Paste the dweet here */
  63.  
  64.  
  65.          
  66.  
  67.  
  68.          
  69.  
  70.            
  71.         });
  72.        
  73.        
  74.         </script>
  75.        
  76.         <style>
  77.             html,body{
  78.             width:100%;
  79.             height:100%;
  80.             padding:0px;
  81.             margin:0px;
  82.             overflow:hidden;
  83.             }
  84.            
  85.             canvas{
  86.             object-fit: contain;
  87.            
  88.             }
  89.         </style>
  90.     </head>
  91.     <body>
  92.    
  93.         <canvas id="c" width="1920" height="1080"></canvas>
  94.    
  95.     </body>
  96. </html>
Advertisement
Add Comment
Please, Sign In to add comment