Blogspot remove sensitive warning

try remove sensitive content warning in blogspot

当前为 2025-06-04 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Blogspot remove sensitive warning
  3. // @namespace https://greasyfork.org/users/821661
  4. // @match https://*.blogspot.com/*
  5. // @match https://www.blogger.com/interstitial/blog*
  6. // @require https://update.greasyfork.org/scripts/526417/1534658/USToolkit.js
  7. // @grant GM_xmlhttpRequest
  8. // @version 1.1
  9. // @author hdyzen
  10. // @description try remove sensitive content warning in blogspot
  11. // @license GPL-3.0-only
  12. // ==/UserScript==
  13.  
  14. async function exec() {
  15. const removeInterstitial = () => {
  16. const iframe = document.querySelector("body > #injected-iframe[src*='/interstitial/']");
  17. const style = document.querySelector("body > style");
  18.  
  19. iframe?.remove();
  20. style?.remove();
  21. };
  22.  
  23. if (!location.search.includes("u=https://")) {
  24. removeInterstitial();
  25. return;
  26. }
  27.  
  28. const search = new URLSearchParams(location.search);
  29.  
  30. GM_xmlhttpRequest({
  31. url: search.get("u"),
  32. responseType: "document",
  33. headers: {
  34. "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36",
  35. },
  36. onload: e => {
  37. document.documentElement.innerHTML = e.response.documentElement.innerHTML;
  38. removeInterstitial();
  39. },
  40. });
  41. }
  42. exec();