GoogleRedirectBypasser

Automatically proceeds past Google redirect notice pages

  1. // ==UserScript==
  2. // @license MIT
  3. // @name GoogleRedirectBypasser
  4. // @namespace http://tampermonkey.net/
  5. // @version 1.0
  6. // @description Automatically proceeds past Google redirect notice pages
  7. // @author aceitw
  8. // @match https://www.google.com/url?*
  9. // @match https://google.com/url?*
  10. // @grant GM_openInTab
  11. // @grant window.focus
  12. // @noframes
  13. // ==/UserScript==
  14.  
  15. (function() {
  16. 'use strict';
  17.  
  18. // Function to extract destination URL from the page
  19. function extractDestinationUrl() {
  20. // Try to get the URL from the query string first (most reliable)
  21. const urlParams = new URLSearchParams(window.location.search);
  22. const destUrl = urlParams.get('q') || urlParams.get('url');
  23.  
  24. if (destUrl) {
  25. return destUrl;
  26. }
  27.  
  28. // Fallback: Try to find the URL in the page content
  29. // This runs if the script executes after the page has loaded
  30. const links = document.querySelectorAll('a');
  31. for (const link of links) {
  32. // Look for the main "Proceed" link
  33. if (link.textContent.includes('proceed') ||
  34. link.href.includes('http') && !link.href.includes('google.com')) {
  35. return link.href;
  36. }
  37. }
  38.  
  39. return null;
  40. }
  41.  
  42. // Main function to bypass the redirect
  43. function bypassRedirect() {
  44. const destinationUrl = extractDestinationUrl();
  45.  
  46. if (destinationUrl) {
  47. // Redirect immediately to the destination
  48. window.location.replace(destinationUrl);
  49. }
  50. }
  51.  
  52. // Run as soon as possible
  53. bypassRedirect();
  54.  
  55. // Also run when DOM is ready (fallback)
  56. if (document.readyState === 'loading') {
  57. document.addEventListener('DOMContentLoaded', bypassRedirect);
  58. } else {
  59. bypassRedirect();
  60. }
  61. })();

QingJ © 2025

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