TikTok Warning Popup (with SVG Logo, Font, and Styled Buttons)

Shows a warning that TikTok may be banned with an SVG TikTok logo, custom font, and pink rounded buttons.

  1. // ==UserScript==
  2. // @name TikTok Warning Popup (with SVG Logo, Font, and Styled Buttons)
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.4
  5. // @description Shows a warning that TikTok may be banned with an SVG TikTok logo, custom font, and pink rounded buttons.
  6. // @author You
  7. // @match *://*.tiktok.com/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. // Create the popup warning div
  15. let popupDiv = document.createElement('div');
  16. popupDiv.id = 'tiktok-warning-popup';
  17. popupDiv.innerHTML = `
  18. <div id="tiktok-warning-content">
  19. <img src="https://upload.wikimedia.org/wikipedia/en/a/a9/TikTok_logo.svg" alt="TikTok Logo" id="tiktok-logo">
  20. <h1>TikTok Warning</h1>
  21. <p>TikTok could be banned in the U.S. by January 2025 unless its Chinese parent company, ByteDance, sells it to a U.S. company.</p>
  22. <p>This is currently being fought in court, but the future of TikTok in the U.S. remains uncertain.</p>
  23. <div>
  24. <button id="exit-tiktok">Exit TikTok</button>
  25. <button id="proceed-tiktok">Proceed</button>
  26. </div>
  27. </div>
  28. `;
  29.  
  30. // Apply styles to the popup
  31. let style = document.createElement('style');
  32. style.innerHTML = `
  33. @import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700&display=swap');
  34.  
  35. #tiktok-warning-popup {
  36. position: fixed;
  37. top: 0;
  38. left: 0;
  39. width: 100%;
  40. height: 100%;
  41. background-color: rgba(0, 0, 0, 0.8);
  42. display: flex;
  43. justify-content: center;
  44. align-items: center;
  45. z-index: 10000;
  46. font-family: 'Montserrat', sans-serif;
  47. }
  48. #tiktok-warning-content {
  49. background-color: white;
  50. padding: 20px;
  51. border-radius: 10px;
  52. text-align: center;
  53. }
  54. #tiktok-logo {
  55. width: 100px;
  56. margin-bottom: 20px;
  57. }
  58. #tiktok-warning-content h1 {
  59. font-size: 24px;
  60. margin-bottom: 10px;
  61. }
  62. #tiktok-warning-content p {
  63. font-size: 16px;
  64. margin-bottom: 20px;
  65. }
  66. #tiktok-warning-content button {
  67. padding: 10px 20px;
  68. font-size: 16px;
  69. margin: 5px;
  70. cursor: pointer;
  71. border-radius: 25px;
  72. border: none;
  73. color: white;
  74. }
  75. #exit-tiktok {
  76. background-color: #ff007f; /* Pink color */
  77. }
  78. #proceed-tiktok {
  79. background-color: #ff007f; /* Pink color */
  80. }
  81. #exit-tiktok:hover, #proceed-tiktok:hover {
  82. background-color: #ff3399; /* Lighter pink on hover */
  83. }
  84. `;
  85.  
  86. // Append the popup and styles to the document
  87. document.head.appendChild(style);
  88. document.body.appendChild(popupDiv);
  89.  
  90. // Exit TikTok when "Exit TikTok" is clicked
  91. document.getElementById('exit-tiktok').addEventListener('click', function() {
  92. window.location.href = 'https://google.com'; // Redirects to another site (e.g., Google)
  93. });
  94.  
  95. // Remove popup and allow TikTok to load when "Proceed" is clicked
  96. document.getElementById('proceed-tiktok').addEventListener('click', function() {
  97. document.getElementById('tiktok-warning-popup').style.display = 'none';
  98. });
  99. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址