Advertisement
Guest User

Untitled

a guest
Oct 28th, 2024
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Twitter Warning Banner
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description Displays a warning banner when visiting Twitter
  6. // @author You
  7. // @match *://*.twitter.com/*
  8. // @match *://*.x.com/*
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14.  
  15. // Create the banner element
  16. const banner = document.createElement('div');
  17. banner.innerHTML = 'WARNING: YOU ARE ON TWITTER';
  18.  
  19. // Style the banner
  20. banner.style.cssText = `
  21. position: fixed;
  22. top: 0;
  23. left: 0;
  24. width: 100%;
  25. background-color: #ff0000;
  26. color: white;
  27. text-align: center;
  28. padding: 20px;
  29. font-size: 24px;
  30. font-weight: bold;
  31. font-family: Arial, sans-serif;
  32. z-index: 9999999;
  33. text-shadow:
  34. -2px -2px 0 #000,
  35. 2px -2px 0 #000,
  36. -2px 2px 0 #000,
  37. 2px 2px 0 #000;
  38. `;
  39.  
  40. // Add banner to the page
  41. document.body.prepend(banner);
  42. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement