Twonky Explorer Injector

This add-on simply redirect to Twonku Explorer

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Twonky Explorer Injector
// @version      v20250626.1600
// @description  This add-on simply redirect to Twonku Explorer
// @author       ltlwinston
// @match        http*://*/*
// @namespace    https://greasyfork.org/users/754595
// ==/UserScript==
(async function() {
    'use strict';

    if (!document.title.match(/(twonky|pv connect|mediaserver)/i) || document.title.match(/(enhancher|explorer)/i)) {
        return;
    }
    const btnSetup = document.createElement('div');
    btnSetup.setAttribute('style','z-index: 9999; position: fixed; top: 50%; left: 1em; background: white; border-radius: 2px; cursor: pointer; padding: 0.5em');
    btnSetup.innerHTML = `<a href="/twonkyexplorer">Start Twonky<br>Explorer!</a>`;
    document.body.appendChild(btnSetup);
})();