Inject Games Link

Injects a link to games.com on a specific page

  1. // ==UserScript==
  2. // @name Inject Games Link
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.0
  5. // @description Injects a link to games.com on a specific page
  6. // @author Your Name
  7. // @match *://*/* // Change this to the specific website you want to target
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. // Create a container for the injected HTML
  15. const container = document.createElement('div');
  16. container.style.position = 'fixed';
  17. container.style.top = '20%';
  18. container.style.left = '50%';
  19. container.style.transform = 'translate(-50%, -50%)';
  20. container.style.padding = '20px';
  21. container.style.backgroundColor = 'white';
  22. container.style.border = '1px solid black';
  23. container.style.zIndex = '9999';
  24. container.style.textAlign = 'center';
  25. container.style.fontFamily = 'Arial, sans-serif';
  26.  
  27. // Add HTML content to the container
  28. container.innerHTML = `
  29. <h1>Welcome to Games</h1>
  30. <p>Click the link below to visit Games.com:</p>
  31. <a href="https://www.games.com" target="_blank" style="text-decoration: none; color: blue; font-size: 24px;">Go to Games.com</a>
  32. `;
  33.  
  34. // Append the container to the body
  35. document.body.appendChild(container);
  36. })();