icourse163.org显示视频编号

test

目前為 2020-07-09 提交的版本,檢視 最新版本

// ==UserScript==
// @name        icourse163.org显示视频编号
// @namespace   https://www.icourse163.org/
// @version     1.1
// @description test
// @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");

    //创建并添加新伪类样式
    let newstyle =
      `
      <style>
      .u-icon-video2:before {
        counter-increment : section;
        content: '[' counter(section) ']' ' ' attr(title) !important
      }

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

  }
)