Jable_Helper

快速显示jable的m3u8下载链接

目前为 2021-04-25 提交的版本。查看 最新版本

// ==UserScript==
// @name         Jable_Helper
// @namespace    https://greasyfork.org/zh-CN/scripts/425514-jable-helper
// @version      1.2
// @description  快速显示jable的m3u8下载链接
// @author       XiaO_WanG
// @match        https://jable.tv/videos/*/*
// @match        https://fs1.app/videos/*/*
// @icon         data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    var html = "<a class = \"addtion\" id = \"tobod\" href=\"javascript:void(0);\"></a>";
    var url = hlsUrl + "#" + document.title.split(" ")[0];
    var ul_tag = $("div.text-center>a");
    if (ul_tag) {
        ul_tag.removeClass("uu-ads").addClass("url");
        document.getElementsByClassName('url')[0].remove();
        document.getElementsByClassName('url')[0].remove();
        $("div.text-center").prepend(html);
        document.getElementsByClassName('addtion')[0].innerHTML=hlsUrl;
        document.getElementsByClassName('addtion')[2].innerHTML=hlsUrl;
    }
    $(function () {
        $("#tobod").click(function () {
            const el = document.createElement('textarea');
            el.value = url;
            el.setAttribute('readonly', '');
            el.style.position = 'absolute';
            el.style.left = '-9999px';
            document.body.appendChild(el);
            const selected = document.getSelection().rangeCount > 0 ? document.getSelection().getRangeAt(0) : false;
            el.select();
            document.execCommand('copy');
            document.body.removeChild(el);
            if (selected) {
                document.getSelection().removeAllRanges();
                document.getSelection().addRange(selected);
            }
        });
    });
})();