三三制界面优化

2020/11/20 上午11:06:50

目前为 2020-11-24 提交的版本,查看 最新版本

// ==UserScript==
// @name        三三制界面优化
// @namespace   Violentmonkey Scripts
// @match       *://33.bxwxm.com.cn/index/exam/show/id/*
// @grant       none
// @version     1.0.4
// @author      阿翔哦哦
// @description 2020/11/20 上午11:06:50
// @run-at document-end
// ==/UserScript==

(
  
  function (){
  'use strict';
  $(document).ready(function(){
    //优化界面
    $("#NotiflixReportWrap").remove();                //去除烦人的提示窗口
    var htmlid = window.location.href.slice(-7,-5);   //获取目前URL
    var count = parseInt(htmlid);                     //获取URL ID
    if(count<=40)
      {
        count=count+100;
      }
    var url;  //URL拼接

    //优化界面
    
    //<毛概>
    if(count>=100 && count<=114)
      {
        var g=14;
        var mg=["绪论",1,2,3,4,5,6,7,8,9,10,11,12,13,14];
        for(var cn=114;cn>=100;cn--)
          {
            url="http://33.bxwxm.com.cn/index/exam/show/id/"+String(cn)+".html";            
            $("#nextQuestion").after("<a href=\"" +url+ "\"<button class=\"btn btn-primary\" id=\"nextPage\"  >"+String(mg[g])+"<\/button> </a>");
            g=g-1;
          }
        $("#nextQuestion").after("<div style=\"width:100%; font-size:18px; font-weight:bold; margin-bottom:10px; text-indent:6px; color:#454E59;\">选章节<\/div>");
      }
    //</毛概>
//------------------------------------------------------------------------------------------------------------------------------------------
    //<思修>
    var sx=[85,86,129,130,131,90,91];
    if(sx.includes(count))
      {
        var sxpage = ["绪论",1,2,3,4,5,6];
          for(var cnsx=6;cnsx>=0;cnsx--)
          {
              $("#nextQuestion").after("<a href=\"http://33.bxwxm.com.cn/index/exam/show/id/" + String(sx[cnsx]) + ".html\"<button class=\"btn btn-primary\" id=\"nextPage\"  > "+ String(sxpage[cnsx]) +" <\/button> </a>");
          }
          $("#nextQuestion").after("<div style=\"width:100%; font-size:18px; font-weight:bold; margin-bottom:10px; text-indent:6px; color:#454E59;\">选章节<\/div>");
        ptiku=ti2;
      }
    //</思修>
//------------------------------------------------------------------------------------------------------------------------------------------    
    //<近代史>
    if(count>=115 && count<=128)
      {
        var g=13;
        var jds=["上篇综述",1,2,3,"中篇综述",4,5,6,7,"下篇综述",8,9,10,11];
        for(var cn=128;cn>=115;cn--)
          {
            url="http://33.bxwxm.com.cn/index/exam/show/id/"+String(cn)+".html";
            $("#nextQuestion").after("<a href=\"" +url+ "\"<button class=\"btn btn-primary\" id=\"nextPage\"  >"+String(jds[g])+"<\/button> </a>");
            g=g-1;
          }
        $("#nextQuestion").after("<div style=\"width:100%; font-size:18px; font-weight:bold; margin-bottom:10px; text-indent:6px; color:#454E59;\">选章节<\/div>");
      }
    //</近代史>
//------------------------------------------------------------------------------------------------------------------------------------------    
    //<马原>
    if(count>=92 && count<=99)
      {
        var g=7;
        var my=["导论",1,2,3,4,5,6,7];
        for(var cn=99;cn>=92;cn--)
          {
            url="http://33.bxwxm.com.cn/index/exam/show/id/"+String(cn)+".html";
            $("#nextQuestion").after("<a href=\"" +url+ "\"<button class=\"btn btn-primary\" id=\"nextPage\"  >"+String(my[g])+"<\/button> </a>");
            g=g-1;
          }
        $("#nextQuestion").after("<div style=\"width:100%; font-size:18px; font-weight:bold; margin-bottom:10px; text-indent:6px; color:#454E59;\">选章节<\/div>");
      }
    //</马原>
//------------------------------------------------------------------------------------------------------------------------------------------
    });
  }
  )();