Bing New Redirect

Redirect if element not found on Bing search or chat pages

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

You will need to install an extension such as Tampermonkey to install this script.

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @license MIT
// @name         Bing New Redirect 
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Redirect if element not found on Bing search or chat pages
// @author       SOPL
// @match        https://www.bing.com/search?*
// @match        https://www.bing.com/chat?*
// @grant        none
// ==/UserScript==

// 
(function() {
    'use strict';

    // Function to check for the element and redirect if not found
    function checkAndRedirect() {
        if (!document.getElementById('b-scopeListItem-conv')) {
            // First redirect
            window.location.href = "https://www.bing.com/account/action?scope=web&cc=au";

            // Set a timeout for 3 seconds and then redirect to the second URL
            setTimeout(function() {
                window.location.href = "https://www.bing.com/account/general?id=region_section#region-section";
            }, 3000);
        }
    }

    // Execute the function
    checkAndRedirect();
})();