Guest User

Untitled

a guest
Jul 17th, 2026
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name     Video Mascot
  3. // @version  1
  4. // @match    https://*.ziemniachan.org/*
  5. // @grant    none
  6. // ==/UserScript==
  7.  
  8.  
  9. (function() {
  10.     'use strict';
  11.  
  12.     // Hardcode your video URL here
  13.     const VIDEO_URL = 'https://ziemniachan.org/b/src/1784292774947.webm';
  14.  
  15.     // Create the main wrapper container
  16.     const wrapper = document.createElement('div');
  17.    
  18.     // Apply styling to position the wrapper
  19.     Object.assign(wrapper.style, {
  20.         position: 'fixed',
  21.         top: '0px',
  22.         right: '0px',
  23.         zIndex: '2147483647',
  24.         borderRadius: '12px',
  25.         overflow: 'hidden', // Ensures the video and overlay don't break outside the rounded corners
  26.         boxShadow: '0 16px 64px rgba(0, 0, 0, 0.8)',
  27.         border: '1px solid rgba(255, 255, 255, 0.2)', // Subtle edge highlight
  28.         pointerEvents: 'none' // Prevents the container from blocking clicks
  29.     });
  30.  
  31.     // Create the video element
  32.     const video = document.createElement('video');
  33.     video.src = VIDEO_URL;
  34.     video.autoplay = true;
  35.     video.muted = true;
  36.     video.loop = true;
  37.     video.controls = false;
  38.  
  39.     // Apply styles to the video
  40.     Object.assign(video.style, {
  41.         display: 'block', // Removes inline baseline gap
  42.         width: 'auto',
  43.         height: 'auto',
  44.         pointerEvents: 'none'
  45.     });
  46.  
  47.     // Create the dark glass overlay that renders ON TOP of the video
  48.     const glassOverlay = document.createElement('div');
  49.     Object.assign(glassOverlay.style, {
  50.         position: 'absolute',
  51.         top: '0',
  52.         left: '0',
  53.         right: '0',
  54.         bottom: '0',
  55.         background: 'rgba(50, 50, 50, 0.5)', // The dark color layering over the video
  56.         backdropFilter: 'blur(1px)', // Very slight blur to sell the glass effect without completely hiding the video
  57.         WebkitBackdropFilter: 'blur(2px)' // Safari support
  58.     });
  59.  
  60.     // Assemble the elements (order matters: overlay is appended last so it sits on top)
  61.     wrapper.appendChild(video);
  62.     wrapper.appendChild(glassOverlay);
  63.  
  64.     // Function to inject the wrapper safely
  65.     const injectVideoContainer = () => {
  66.         if (!document.body.contains(wrapper)) {
  67.             document.body.appendChild(wrapper);
  68.         }
  69.     };
  70.  
  71.     // Append to body immediately if available, otherwise wait for DOMContentLoaded
  72.     if (document.body) {
  73.         injectVideoContainer();
  74.     } else {
  75.         window.addEventListener('DOMContentLoaded', injectVideoContainer);
  76.     }
  77. })();
Advertisement
Add Comment
Please, Sign In to add comment