Greasy Fork is available in English.

YouTube Culture Link Detector

Adds Kagi search link when *Culture channel links are found

作者
Molly Harris
今日安裝
0
安裝總數
0
評價
0 0 0
版本
0.1
建立日期
2025-01-04
更新日期
2025-01-04
尺寸
2.2 KB
授權條款
CC BY-NC-SA 4.0
腳本執行於

This script enhances YouTube video pages by automatically detecting links to channels like WhatCulture, WhoCulture, and similar "*Culture" channels. It adds a Kagi search button, as these channels typically create article content based on the 'listicle' YouTube videos. The search button provides easy access to the corresponding written content.

Features

  • Monitors YouTube pages for "*Culture" channel links
  • Creates a styled search button next to video titles
  • Links to Kagi search targeting the channel's website articles
  • Prevents duplicate button creation
  • Automatically adjusts button size based on title text size
  • Works with dynamic page updates

Technical Details

The script uses:

  1. Regular expression pattern matching to detect WhatCulture, WhoCulture, and similar channel links
  2. MutationObserver to handle YouTube's dynamic content loading
  3. Dynamic styling that matches YouTube's interface
  4. URL encoding with specialized search parameters to find matching articles
  5. Intelligent font sizing that scales with the page

Configuration

The script contains several customizable elements:

  • Culture detection pattern: Adjusts what channels trigger the button
  • Search query format: Modifies how Kagi searches for matching articles
  • Button styling: Customizable appearance settings
  • Link text: Modifiable button label