Greasy Fork

Greasy Fork is available in English.

东软智慧平台视频助手

Skip your video

当前为 2025-03-17 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         东软智慧平台视频助手
// @namespace    ukpkmkk
// @version      0.5
// @description  Skip your video
// @author       Yx
// @match       https://neustudydl.neumooc.com/*
// @grant        none
// @license MIT
// ==/UserScript==


(function() {
    'use strict';

    // 添加CSS样式
    var style = document.createElement('style');
    style.type = 'text/css';
    style.innerHTML = `
    /* 基础按钮样式 */
    .button {
        display: inline-block;
        border-radius: 4px;
        background-color: #4CAF50; /* 按钮背景色 */
        border: none;
        color: #FFFFFF; /* 文字颜色 */
        text-align: center;
        font-size: 16px;
        padding: 10px 20px; /* 内边距 */
        transition: all 0.6s; /* 过渡效果 */
        cursor: pointer; /* 鼠标样式 */
        margin: 5px;
        position: fixed;
        bottom: 100px; /* 将按钮放在右下角 */
        right: 10px;
        z-index: 10000;
    }

    /* 按钮悬停效果 */
    .button:hover {
        background-color: #337ab7; /* 按钮悬停时的背景色 */
        color: #FFFF00; /* 按钮悬停时的文字颜色 */
    }

    /* 按钮点击效果 */
    .button:active {
        background-color: #555555; /* 按钮按下时的背景色 */
        box-shadow: 0 5px #666; /* 按钮按下时的阴影效果 */
        transform: translateY(4px); /* 按钮按下时的位移效果 */
    }
    `;
    document.head.appendChild(style);

    // 创建跳到视频末尾的按钮
    var buttonSkipToEnd = document.createElement('button');
    buttonSkipToEnd.textContent = '跳到视频末尾';
    buttonSkipToEnd.className = 'button'; 
    buttonSkipToEnd.style.bottom = '160px'; // 调整位置避免重叠

    // 添加点击事件
    buttonSkipToEnd.addEventListener('click', function() {
        let videos = document.getElementsByTagName('video');
        for (let i = 0; i < videos.length; i++) {
            videos[i].currentTime = videos[i].duration;
        }
    });

    document.body.appendChild(buttonSkipToEnd);
})();