萬盛學電腦網

您现在的位置: 萬盛學電腦網 >> 作業系統 >  >> Windows 10 資訊

Windows 10 將 Cortana 小娜搜尋引擎改為 Google/百度

Win10 任務列搜尋(Cortana)預設用 Bing,習慣 Google 的用戶可自製 Chrome 擴充功能導向 Google 搜尋。

製作步驟

  1. 桌面新建資料夾 CortanaUseGoogle。
  2. 資料夾內建立兩個文字檔,重命名為 CortanaUseGoogle.js 與 manifest.json。
  3. CortanaUseGoogle.js 貼入:
chrome.webRequest.onBeforeRequest.addListener(
  function(details) {
    return { redirectUrl: "https://www.google.com/search?q=" + details.url.split(/=|&/)[1].replace("%20", "+")};
  },
  {urls: ["https://cn.bing.com/search*"]},
  ["blocking"]
);
  1. manifest.json 貼入:
{
  "name": "Cortana use Google",
  "version": "1.0",
  "manifest_version": 2,
  "description": "Just a extension",
  "background": { "scripts": ["CortanaUseGoogle.js"] },
  "permissions": ["webRequest", "webRequestBlocking", "https://cn.bing.com/"]
}
  1. Chrome 進入「擴充功能」頁面 → 勾選「開發人員模式」 → 「封裝擴充功能」選擇資料夾 → 產生 .crx 檔 → 拖入 Chrome 視窗安裝。

⚠ 需將 Chrome 設為預設瀏覽器。若要用百度,將 JS 中 Google 網址改為 https://www.baidu.com/s?wd= 並移除 .replace("%20", "+")。

copyright © 萬盛學電腦網 all rights reserved