Redirect privated Reddit pages to cache

Redirect reddit posts from recently privated communities to google's cache (works for most front page search results on google, 9s timeout).

  1. // ==UserScript==
  2. // @name Redirect privated Reddit pages to cache
  3. // @namespace zys52712
  4. // @match https://*.reddit.com/*
  5. // @version 1.1
  6. // @license GNU GPLv3
  7. // @author zys52712
  8. // @description Redirect reddit posts from recently privated communities to google's cache (works for most front page search results on google, 9s timeout).
  9. // ==/UserScript==
  10.  
  11. var count = 0;
  12. var interval = window.setInterval( () => {
  13. if (document.body.innerHTML.search("is a private community") != -1 && ! document.URL.includes('cache:')) {
  14. window.location.replace('http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=cache:' + window.location);
  15. }
  16. if (count > 30) {
  17. clearInterval(interval);
  18. }
  19. count++;
  20. }, 300);

QingJ © 2025

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