Greasy Fork is available in English.

icourse163.org显示视频编号

在看课的时候视频没有编号,用这个可以显示当前是第几个视频。

// ==UserScript==
// @name        icourse163.org显示视频编号
// @namespace   https://www.icourse163.org/
// @version     1.4
// @description 在看课的时候视频没有编号,用这个可以显示当前是第几个视频。
// @author      good1uck
// @match       https://www.icourse163.org/learn/*
// @require     http://code.jquery.com/jquery-1.8.2.min.js
// @grant       none
// ==/UserScript==
$(document).ready(
  function () {
    //添加计数器
    $(".unitslist").addClass("mycounter");

    //创建并添加新伪类样式,如果span有title,则会显示视频标题。
    let newstyle =
      `
      <style>
      .u-icon-video2:before {
        counter-increment : section;
        content: '[' counter(section) ']' ' ' attr(title) !important 
      }

      .unitslist {
        counter-reset:section;
      }
      </style>
      `
    $(newstyle).appendTo('head');

  }
)