(Microsoft Rewards) Bing to Google

Changes from Bing to Google

  1. // ==UserScript==
  2. // @name (Microsoft Rewards) Bing to Google
  3. // @description Changes from Bing to Google
  4. // @include http://*.bing.com/search?*
  5. // @include https://*.bing.com/search?*
  6. // @version 0.0.0.5
  7. // @icon https://rewards.bing.com/rewards.png
  8. // @author JAS1998
  9. // @copyright 2023+ , JAS1998 (https://greasyfork.org/users/4792)
  10. // @namespace https://greasyfork.org/users/4792
  11. // @license CC BY-NC-ND 4.0; http://creativecommons.org/licenses/by-nc-nd/4.0/
  12. // @compatible Chrome tested with Tampermonkey
  13. // @contributionURL https://www.paypal.com/donate?hosted_button_id=9JEGCDFJJHWU8
  14. // @run-at document-start
  15. // ==/UserScript==
  16. /* jshint esversion: 9 */
  17. var referrer = document.referrer;
  18. if (!referrer.includes('rewards.bing.com') && !referrer.includes('.bing.com/search?q=')) {
  19. var googlesearch = "https://google.com/search?" + document.URL.match(/q\=[^&]*/);
  20. if (googlesearch != document.URL) {
  21. location.replace(googlesearch);
  22. }
  23. }
  24.  
  25. function isMobile() {
  26. return (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
  27. }
  28.  
  29. if (isMobile()) {
  30. googlesearch = "https://google.com/search?hl=de&site=webhp&source=hp&ei=1R3VUYDfOcHDtAbbhYDoCA&q=" + document.URL.match(/q\=[^&]*/);
  31. if (googlesearch != document.URL) {
  32. location.replace(googlesearch);
  33. }
  34. }