ddys-player-history(低端影视-显示播放历史记录)

快速定位至未播放完的视频,用于了解当前有哪些剧集没看完的,避免找不到播放记录。

目前为 2023-11-07 提交的版本。查看 最新版本

// ==UserScript==
// @name         ddys-player-history(低端影视-显示播放历史记录)
// @version      0.1
// @namespace    XZX
// @license      MIT
// @description  快速定位至未播放完的视频,用于了解当前有哪些剧集没看完的,避免找不到播放记录。
// @author       XZX
// @match        https://ddrk.me/*
// @match        https://ddys.tv/*
// @match        https://ddys.pro/*
// @match        https://ddys2.me/*
// @match        https://ddys.art/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=github.com
// @supportURL   [email protected]
// @grant        none
// ==/UserScript==

(function() {
  'use strict';
  if (localStorage) {
    // 用于存储记录
    let history = []
    let k = 'videojs-resume:'
    const origin = window.location.origin;
    Object.keys(localStorage)
      .filter(key => key.indexOf(k) != -1)
      .forEach(key => {
        history.push(key.replace(k, ''))
      })
    
    // 绘制UI
    const panel = 
      `<div id="play-history" style="border: 1px solid grey; background-color: #1f1f1f; min-width: 100px; position: fixed; right: 0; bottom: 0; border-radius: 10px;color: #367d9d;">
          <div style="border-bottom: 1px solid grey; padding: 10px; font-weight: bold; text-align: center;">
            播放记录
            <a href="#" style="position: absolute; right: 5px;" onclick="document.querySelector('#play-history').remove()">[关闭]</a>
          </div>
          <ul style="list-style-type: none; padding: 10px; margin: 0;">
            ${history.map(item => `<li>
            <a href="${origin + item}">${item}</a>
            <span style="font-size: 14px">[${((Number(localStorage.getItem(k + item)) / 60).toFixed(2) + '').replace('.', ':')}]</span>
            </li>`).join('')}
          <ul>
        </div>
      </div>`
    document.querySelector("body").innerHTML += panel;
  }
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址