Bing Video Search - Related Videos Links Href

Sets href on related videos so they work like normal links

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

作者
csomerville
日安装量
0
总安装量
37
评分
2 0 0
版本
0.1
创建于
2023-11-20
更新于
2023-11-20
大小
1.3 KB
许可证
MIT
适用于

Purpose

This Tampermonkey script enhances the user experience on Bing's video search pages by modifying the behavior of related video links. The primary goal is to ensure these links work like normal hyperlinks, allowing for a more intuitive and seamless browsing experience. For example, making it possible again to easily open related video links in a new tab.

Functionality

It uses an MutationObserver to detect once #mm_relvid container provided by their React component is loaded and will then set href attribute on each anchor with the related video's mid retrieved by decoding the json contained in its vrhdata attribute, which is presumed to be the section containing related videos on Bing's video search pages.

Implementation Details

  1. The script runs on Bing video search pages (://.bing.com/videos/*).
  2. It activates when the document is fully loaded (@run-at document-idle).
  3. The script listens for additions of child nodes within the document's body, specifically looking for changes in the #mm_relvid section.
  4. Once a relevant change is detected, it iterates through elements with the class vta isv and modifies their href attributes.

Usage Notes

  • Users can simply install this script via Tampermonkey and it will automatically execute on the relevant Bing video search pages.
  • The script requires no special permissions or additional setup from the user.

Disclaimer

This script is provided as-is for enhancing navigation on Bing video search pages.