Logout from Google Search

Automatically logs you out of your Google account when using Google Search.

  1. // ==UserScript==
  2. // @name Logout from Google Search
  3. // @namespace logout_google_search
  4. // @description Automatically logs you out of your Google account when using Google Search.
  5. // @include http://www.google.tld/*
  6. // @include https://www.google.tld/*
  7. // @exclude http://www.google.tld/reader/*
  8. // @exclude https://www.google.tld/reader/*
  9. // @version 1.3.0
  10. // @run-at document-end
  11. // ==/UserScript==
  12.  
  13. var loggedIn = document.getElementById('gb_71');
  14. var url = String(window.location);
  15.  
  16. query = url.split("q=");
  17. query = query[1].split("&");
  18. query = query[0];
  19. query = query.replace( /\+/g, '-' );
  20.  
  21. if (loggedIn != null) {
  22. window.location.replace("https://www.google.com/accounts/Logout?continue="+location.protocol+"//"+location.host+"/search?q="+query)
  23. }