xieve / Windows 10 Search Redirector

// ==UserScript==
// @name         Windows 10 Search Redirector
// @version      0.2.0
// @description  Redirect searches from the Windows 10 Start menu to DuckDuckGo
// @author       xieve
// @match        https://www.bing.com/search?*
// @grant        none
// @run-at       document-start
// @license      MIT
// @copyright    2023, xieve (https://openuserjs.org/users/xieve)
// @updateURL https://openuserjs.org/meta/xieve/Windows_10_Search_Redirector.meta.js
// @downloadURL https://openuserjs.org/install/xieve/Windows_10_Search_Redirector.user.js
// @noframes
// ==/UserScript==

if (location.search.match(/&form=WNS[A-Z]{3}&/)) {
  const query = location.href.replace(/.*?(\?|&)(q=.*?)(\?|&|$).*/, '$2');
  location.href = `https://duckduckgo.com/?${query}`;
}