See Through DPlayer

Display the video source link for DPlayer elements which have <video> elements under the hood.

As of 29.09.2023. See ბოლო ვერსია.

// ==UserScript==
// @name         See Through DPlayer
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  Display the video source link for DPlayer elements which have <video> elements under the hood.
// @author       firetree
// @match        *://*/*
// @icon         none
// @grant        GM_registerMenuCommand
// @grant        GM_getValue
// @grant        GM_setValue
// @license      WTFPL
// ==/UserScript==

(function() {
    'use strict';
    if (!GM_getValue('placeholder')) {
        GM_setValue('placeholder','true')
    }
    function inject() {
        document.querySelectorAll(".dplayer").forEach(el => {
            if (el.classList.contains("see-through-dplayer")) return
            let link = document.createElement("a")
            link.href = el.querySelector("video").src
            link.textContent = link.href
            el.after(link)
            el.classList.add("see-through-dplayer")
        })
    }

    GM_registerMenuCommand('手动激活脚本功能', inject) //注册菜单命令

    if (GM_getValue('placeholder') == 'true') {
        inject()
    }
})();