您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
skip video
// ==UserScript== // @name skip online class for 'gseek.kr' // @namespace http://tampermonkey.net/ // @version 2025-04-16 // @description skip video // @author dh.jo // @match https://www.gseek.kr/user/course/online/player // @icon https://www.google.com/s2/favicons?sz=64&domain=gseek.kr // @grant none // ==/UserScript== (function() { 'use strict'; function sleep(ms) { const wakeUpTime = Date.now() + ms; while (Date.now() < wakeUpTime) {} } const $video = document.querySelector('#player'); const $nextBtn = document.querySelector('#nextLessonBtn'); function skip() { if (!$video) return; if ($video.paused) { $video.play(); sleep(200); } $video.currentTime = 99999; sleep(200); const nextId = $nextBtn.getAttribute("data-next_esson_sn"); if (nextId == '0') { // 끝 window.location.href = '/user/mypage/learning/online/list'; } else { // 다음 go window.fnLessonPlay(nextId, true); } } function generateSkipButton() { const $closeBtn = document.querySelector('.course-close'); const skipButtonHTML = ` <button type="button" style="padding: 0 24px; background: #a80909;" class="skip-button"> <span class="mob-hidden">스킵</span> </button> `; $closeBtn.insertAdjacentHTML('afterend', skipButtonHTML); const $skipBtn = document.querySelector('.skip-button'); $skipBtn.onclick = function () { skip(); return false; }; } $video.addEventListener("loadeddata", () => { if ($video.readyState >= 2) { if ($video) { skip(); } } }); generateSkipButton(); })();