Barrel Roll on Page Load

Makes the page do a barrel roll animation when it loads

Size

1.5 KB

Version

1.0.1

Created

Oct 15, 2025

Updated

8 days ago

1// ==UserScript==
2// @name		Barrel Roll on Page Load
3// @description		Makes the page do a barrel roll animation when it loads
4// @version		1.0.1
5// @match		https://*.google.com/*
6// @icon		https://www.gstatic.com/images/branding/searchlogo/ico/favicon.ico
7// ==/UserScript==
8(function() {
9    'use strict';
10    
11    function init() {
12        console.log('Barrel Roll extension loaded');
13        doBarrelRoll();
14    }
15    
16    function doBarrelRoll() {
17        // Add CSS animation for barrel roll
18        const style = document.createElement('style');
19        style.textContent = `
20            @keyframes barrelRoll {
21                from {
22                    transform: rotate(0deg);
23                }
24                to {
25                    transform: rotate(360deg);
26                }
27            }
28            
29            body.barrel-rolling {
30                animation: barrelRoll 1s ease-in-out;
31            }
32        `;
33        document.head.appendChild(style);
34        
35        // Trigger the barrel roll animation
36        document.body.classList.add('barrel-rolling');
37        
38        // Remove the class after animation completes
39        setTimeout(() => {
40            document.body.classList.remove('barrel-rolling');
41        }, 1000);
42        
43        console.log('Barrel roll executed!');
44    }
45    
46    // Run when page loads
47    if (document.readyState === 'loading') {
48        document.addEventListener('DOMContentLoaded', init);
49    } else {
50        init();
51    }
52})();
Barrel Roll on Page Load | Robomonkey