冷少编辑器

try to take over the world!

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         冷少编辑器
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       GodK
// @match        http://cps.neumooc.com/practice/stu/*
// @match        http://cps.neumooc.com/*
// @grant        none
// ==/UserScript==

   document.oncontextmenu="";
    document.onselectstart="";
    document.onpaste ="";




(function() {
    var allLine = document.getElementsByClassName("ace_line");
    var allChild=new Array();
    var allText = "https://s1.ax1x.com/2020/10/09/0BX4xI.png";


//获取编辑器内容
var playtimer=window.setInterval(function(){


    var bgdiv = document.getElementsByClassName("ace_content")[0];
    bgdiv.style.background = "url('https://s1.ax1x.com/2020/10/09/0BX4xI.png')";
    var treediv = document.getElementsByClassName("projectPracticeTree")[0];
    treediv.style.background = "url('https://s1.ax1x.com/2020/10/09/0BX4xI.png') repeat left 50% ";
    if(bgdiv != null)
    {
        clearInterval(playtimer);
    }
    },500);

    var guterContainer = document.getElementsByClassName("ace_layer ace_gutter-layer ace_folding-enabled")[0];//行数容器
    var guterDiv = document.createElement("div");
    guterDiv.style.height = "17px";
    guterDiv.setAttribute("class","ace_gutter-cell");
    guterDiv.innerHTML = "1";
    guterContainer.appendChild(guterDiv);

        var editContainer = document.getElementsByClassName("ace_layer ace_text-layer")[0];
    var lineGroupDiv = document.createElement("div");
    lineGroupDiv.style.height = "17px";
    lineGroupDiv.setAttribute("class","ace_line_group");
    var lineDiv = document.createElement("div");
    lineDiv.style.height = "17px";
    lineDiv.setAttribute("class","ace_line");
    var aSpan = document.createElement("span");
    aSpan.setAttribute("class","ace_identifier");
    aSpan.innerHTML = "asd";
    lineDiv.appendChild(aSpan);
    lineGroupDiv.appendChild(lineDiv);
    editContainer.appendChild(lineGroupDiv);



})();