pranks
Version:
A collection of fun pranks for web pages
1 lines • 1.19 kB
Source Map (JSON)
{"version":3,"file":"index.mjs","sources":["../../../src/pranks/rotation/index.ts"],"sourcesContent":["export function rotatePage(): void {\n if (typeof window === 'undefined') return;\n\n const style = document.createElement('style');\n style.textContent = `\n @keyframes spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n }\n\n body {\n animation: spin 3s linear infinite;\n transform-origin: center center;\n }\n `;\n\n document.head.appendChild(style);\n}\n\n// Auto-execute when script loads\nif (typeof window !== 'undefined') {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', rotatePage);\n } else {\n rotatePage();\n }\n} "],"names":[],"mappings":"SAAgB,UAAU,GAAA;IACxB,IAAI,OAAO,MAAM,KAAK,WAAW;QAAE;IAEnC,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC;IAC7C,KAAK,CAAC,WAAW,GAAG;;;;;;;;;;;;;;GAcnB;AAED,IAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;AAClC;AAEA;AACA,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;AACjC,IAAA,IAAI,QAAQ,CAAC,UAAU,KAAK,SAAS,EAAE;AACrC,QAAA,QAAQ,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,UAAU,CAAC;;SACpD;AACL,QAAA,UAAU,EAAE;;AAEhB;;;;"}