// ==UserScript== // @name Sync Google Searches to Bing (Invisible XMLHttpRequest) // @namespace Violentmonkey Scripts // @version 1.0 // @description Automatically searches on Bing when you search on Google, using an invisible XMLHttpRequest // @author intercepted16 // @license MIT // @match https://www.google.com/search* // @grant GM_xmlhttpRequest // @connect bing.com // @downloadURL none // ==/UserScript== (function() { 'use strict'; // Extract search query from the Google URL const params = new URLSearchParams(window.location.search); const query = params.get('q'); if (query) { // Construct the Bing search URL, adding a bunch of rubbish taken from a real search in Edge const bingUrl = `https://www.bing.com/search?q=${encodeURIComponent(query)}&cvid=5ea855fc7c2446b79bd423c6c8dfcca3&gs_lcrp=EgZjaHJvbWUyBggAEEUYOTIGCAEQABhAMgYIAhAuGEAyBggDEC4YQDIGCAQQLhhAMgYIBRAuGEAyBggGEAAYQDIGCAcQABhAMgYICBAuGEDSAQc1NjZqMGoxqAIAsAIA&FORM=ANSPA1&PC=U531`; // Use GM_xmlhttpRequest to send a GET request to Bing GM_xmlhttpRequest({ method: "GET", url: bingUrl, onload: function(response) { console.log("Bing search performed silently"); }, onerror: function(error) { console.error("Error performing Bing search:", error); } }); } })();