Codeexpander-Helper

[codeexpander]

이 스크립트를 설치하려면 Tampermonkey, Greasemonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 유저 스크립트 관리자 확장 프로그램이 필요합니다.

(이미 유저 스크립트 관리자가 설치되어 있습니다. 설치를 진행합니다!)

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

(이미 유저 스타일 관리자가 설치되어 있습니다. 설치를 진행합니다!)

// ==UserScript==
// @name         Codeexpander-Helper
// @namespace    http://tampermonkey.net/
// @version      1.2
// @description  [codeexpander]
// @author       You
// @match        https://gist.github.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    const update = () => {
       const fileNames = document.getElementsByClassName('css-truncate-target');
       const description = document.getElementsByClassName('description');
       const description02 = document.getElementsByClassName('repository-meta-content');
       const description03 = document.querySelectorAll("#gist-pjax-container > div.container.new-discussion-timeline.experiment-repo-nav > div.repository-content.gist-content > div > div[itemprop='about']");
       for(var i = 0; i < fileNames.length; i++) {
           fileNames[i].textContent = fileNames[i].textContent.split("&env")[0];
           fileNames[i].textContent = fileNames[i].textContent.split("|-|&tag=")[0] ? fileNames[i].textContent.split("|-|&tag=")[0] : "No Description";
       }
       for(var j = 0; j < description.length; j++) {
           description[j].textContent = description[j].textContent.split("|-|&tag=")[0].trim() ? description[j].textContent.split("|-|&tag=")[0] : "No Description";
       }
       for(var k = 0; k < description02.length; k++) {
           description02[k].textContent = description02[k].textContent.split("|-|&tag=")[0].trim() ? description02[k].textContent.split("|-|&tag=")[0] : "No Description";
       }
       for(var h = 0; h < description03.length; h++) {
           description03[h].textContent = description03[h].textContent.split("|-|&tag=")[0].trim() ? description03[h].textContent.split("|-|&tag=")[0] : "No Description";
       }
    };
    update();
    window.addEventListener("click", function (event) {
        setTimeout(()=> { update(); } , 1000);
    });
})();