Jable_Helper

快速显示jable的m3u8下载链接

2021-11-20 या दिनांकाला. सर्वात नवीन आवृत्ती पाहा.

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

(function() {
    'use strict';
    var html = "<a class = \"addtion\" id = \"tobod\" href=\"javascript:void(0);\"></a>";
    var url = hlsUrl + "#" + document.title.split(" ")[0];
    document.getElementsByClassName("comments pb-3 pb-lg-4")[0].prepend(html);
    document.getElementsByClassName('addtion')[0].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);
            }
        });
    });
})();