Bing Video Search - Related Videos Links Href

Sets href on related videos so they work like normal links

作者
csomerville
日安装量
0
总安装量
30
评分
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.