PrimewireLinks

If link text is missing, it will fill it so you can see which CDNs to click on. This will also strip out Promo / Sponsor hosts.

当前为 2017-06-13 提交的版本,查看 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name           PrimewireLinks
// @namespace      nitrocode
// @description    If link text is missing, it will fill it so you can see which CDNs to click on. This will also strip out Promo / Sponsor hosts.
// @version        0.1
// @match          *://*.primewire.ag/tv-*
// @match          *://*.primewire.ag/watch-*
// @grant          none
// ==/UserScript==

// Purposely did not use jquery because it didn't seem to work too well with FF
// Only run script after the page has fully loaded
window.addEventListener('load', function() {
    // grab all version_host class vars that hold the rocker script
    var links = document.querySelectorAll('.version_host');
    var link_text = "";
    var real_link_count = 0;
    for (var i=0; i<links.length; i++) {
        // cut up the string instead of eval'ing so it's safe
        link_text = links[i].innerHTML.substring(
            links[i].innerHTML.indexOf("'") + 1,
            links[i].innerHTML.lastIndexOf("'")
        );
        // Remove Promo Host and Sponsor Host
        if (!link_text.includes('Host')) {
            links[i].innerHTML = link_text;
            console.log('Found real link: ' + link_text);
            real_link_count++;
        } else {
            links[i].closest('table').remove();
            console.log('Removed: ' + link_text);
        }
    }
    console.log('Found ' + real_link_count + ' real links');
}, false);