Guest User

Video Mascot

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/1784242411593.webm';
  14.  
  15.     // Create the video element
  16.     const video = document.createElement('video');
  17.     video.src = VIDEO_URL;
  18.    
  19.     // Set required attributes
  20.     video.autoplay = true;
  21.     video.muted = true; // Required by modern browsers for autoplay to work
  22.     video.loop = true;
  23.     video.controls = false; // Ensures controls are hidden
  24.  
  25.     // Apply styles for fixed bottom-right positioning
  26.     Object.assign(video.style, {
  27.         position: 'fixed',
  28.         bottom: '0px',
  29.         right: '0px',
  30.         width: 'auto',
  31.         height: '70%',
  32.         zIndex: '2147483647',
  33.         opacity: '0.9',
  34.         pointerEvents: 'none' // Prevents the video from blocking clicks on the page beneath it
  35.     });
  36.  
  37.     // Function to inject the video safely
  38.     const injectVideo = () => {
  39.         if (!document.body.contains(video)) {
  40.             document.body.appendChild(video);
  41.         }
  42.     };
  43.  
  44.     // Append to body immediately if available, otherwise wait for DOMContentLoaded
  45.     if (document.body) {
  46.         injectVideo();
  47.     } else {
  48.         window.addEventListener('DOMContentLoaded', injectVideo);
  49.     }
  50. })();
Advertisement
Add Comment
Please, Sign In to add comment