$ show Popukok/smg_live
This repository contains a user script (smg_fivestar.user.js) designed to bypass restrictions on the SMGTV live streaming website (kankanews.com). The script modifies the behavior of the video player to remove trial countdowns, prevent auto-pausing when switching tabs, and unlock content via API response manipulation. It also implements a custom fullscreen fallback mechanism using CSS when the native fullscreen API fails. The script runs in the browser via Tampermonkey/Violentmonkey and targets pages matching *://*.kankanews.com/huikan*. While highly specific to the target website, the script contains reusable utility functions for CSS injection, Vue instance retrieval, and method wrapping that demonstrate solid web extension craftsmanship.
The LLM identified 1 files worth highlighting for reuse:
Contains three reusable utility functions: injectStyle (safely injects CSS into a page with DOM readiness handling), getVueInstance (retrieves Vue instance from a DOM element using standard Vue attachment patterns), and wrapComponentMethod (wraps object methods with additional logic, handling both synchronous and asynchronous results via timeout chaining and promise resolution). These functions are isolated, self-contained, and require minimal adaptation for use in other user scripts or web applications.