Asil Graph Size Change 2.0

아실 그래프 사이즈 조절 플러그인 1.1버전에서 버그발생 부분 해결한 코드입니다.

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

You will need to install an extension such as Tampermonkey to install this script.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name        Asil Graph Size Change 2.0
// @namespace   Violentmonkey Scripts
// @match       https://asil.kr/asil/*
// @grant       none
// @version     2.0
// @author      모느나
// @editor      그레이스호퍼
// @require     https://code.jquery.com/jquery-1.12.4.min.js
// @description 아실 그래프 사이즈 조절 플러그인 1.1버전에서 버그발생 부분 해결한 코드입니다.
// @license     MIT
// ==/UserScript==
 
 
(function sizeChangeFnc() {
 
  let panelSizeOrg = 390;
  let panelSizeMod = 1000;
  let panelSize = 390;
 
  let changeColor = "red";
  let orgColor = "white"
 
 
   let compareSizeModifyEle = `<div class="filter_item" id="graphSizeBtnWrap"><a href="#" class="filter_btn" id="compareSizeModify"><i></i>S</a></div>`;
 
 
   jQuery('#filter > div.filter_scroll > div').append(compareSizeModifyEle);
 
   jQuery(document).on('click', (e) => {
 
     if(e.target.id === 'compareSizeModify'){
 
         panelSize = panelSize === panelSizeOrg ? panelSizeMod : panelSizeOrg;
 
         // 1. 그래프 판텔사이즈 변경
         //jQuery('#contents > div.ctn_wrap.open').css('width', panelSize); 버그
         jQuery('#contents > div.detail_wrap.open').css('width', panelSize); //추가코드
 
         // 2. map 판넬 사이즈 변경
         let mapPanel = jQuery('#contents > div.map_wrap');
         let mapPanelSize = parseInt(mapPanel.css('width'), 10);
 
         if( panelSize === panelSizeOrg ){
           jQuery('#graphSizeBtnWrap').css('background-color', orgColor);
           mapPanel.css('width', "");
         }
         else{
           mapPanelSize = mapPanelSize - (panelSizeMod - panelSizeOrg);
           jQuery('#graphSizeBtnWrap').css('background-color', changeColor);
           mapPanel.css('width', mapPanelSize);
         }
 
        // 3. 단지리스크 TEXT DIV 크기조절
        // document.querySelector('#sub1').contentWindow.document.querySelectorAll("#search_lst > span").forEach(item => item.style.width = "auto" ); 버그
        document.querySelector('#sub2').contentWindow.document.querySelectorAll("#search_lst > span").forEach(item => item.style.width = "auto" ); //추가코드
     }
 
   });
 
 
 
})();v