Blogspot remove sensitive warning

try remove sensitive content warning in blogspot

  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.2
  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. const links = document.querySelectorAll("a[href]");
  19.  
  20. iframe?.remove();
  21. style?.remove();
  22.  
  23. for (const link of links) {
  24. link.addEventListener("click", e => {
  25. e.stopImmediatePropagation();
  26. e.stopPropagation();
  27. });
  28. }
  29. };
  30.  
  31. if (!location.search.includes("u=https://")) {
  32. removeInterstitial();
  33. return;
  34. }
  35.  
  36. const search = new URLSearchParams(location.search);
  37.  
  38. GM_xmlhttpRequest({
  39. url: search.get("u"),
  40. responseType: "document",
  41. headers: {
  42. "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",
  43. },
  44. onload: e => {
  45. document.documentElement.innerHTML = e.response.documentElement.innerHTML;
  46. removeInterstitial();
  47. },
  48. });
  49. }
  50. exec();