1import { ScheduleCtrl } from "./components/ScheduleCtrl.js"; 2import { SubHerstoryCtrl } from "./pages/sub/SubHerstoryCtrl.js"; 3import { ShareCtrl } from "./components/ShareCtrl.js"; 4 5 6/** 7 * 8 */ 9export class SubPageCtrl { 10 constructor() { } 11 /** 12 * í´ëê²½ë¡ ë°ìì¤ê¸° 13 * @param {Array} folders [{String}] 14 * @returns 15 */ 16 set_folders(folders = []) { 17 this.folders = folders; 18 return this; 19 }//set_folders 20 /* ====================================== */ 21 /* ====================================== */ 22 /* ====================================== */ 23 /** 24 * 25 */ 26 init = async () => { 27 if (!this.folders || !this.folders.length) { 28 throw new Error("í´ë ê²½ë¡ ë°°ì´ì´ ì¬ë°ë¥´ì§ ìê±°ë, lengthê° 0ì ëë¤") 29 } 30 31 /* ê³µì í기 ë²í¼ í´ë¦ì */ 32 new ShareCtrl().init(); 33 34 /* ê°ì¥ ë§ì§ë§ 주ì */ 35 const lastRouter = this.folders[this.folders.length - 1]; 36 37 /* ì¼ë°ì¸ì§, ì½ê¸°íì´ì§ì¸ì§ */ 38 this.get_url_diff(); 39 40 /* íì´ì§ì ë°ë¥¸ ìë¸ì»¨í¸ë¡¤ë¬ ìë */ 41 await this.activate_by_router(lastRouter); 42 43 }//init 44 45 /** 46 * 목ë¡ì¸ì§ ì½ê¸°ì¸ì§ ì°ê¸°ì¸ì§ íì íë¼ 47 */ 48 get_url_diff = () => { 49 const pathname = window.location.pathname; 50 if (pathname.includes("_read.html")) { 51 this.isRead = true; 52 } 53 if (pathname.includes("_write.html")) { 54 this.isWrite = true; 55 } 56 }//get_url_diff 57 58 /** 59 * íì´ì§ì ë°ë¥¸ ìë¸ì»¨í¸ë¡¤ë¬ ìë 60 * @param {String}
60 lastRouter ê°ì¥ ë§ì§ë§ ë¼ì°í° ì´ë¦(íì¬íì´ì§) 61 */ 62 activate_by_router = async (lastRouter) => { 63 switch (lastRouter) { 64 /* [ì¶ë¯¸ì ì ëë¤ > ì¼ì ] */ 65 case "schedule": { 66 await ScheduleCtrl.init(); 67 } break; 68 69 /* [ì¶ë¯¸ì ì ëë¤ > herstory] */ 70 case "herstory": { 71 await new SubHerstoryCtrl().init(); 72 } break; 73 74 /* [ìíµê³¼ ì°¸ì¬ > í¸íGë²ì¤ ì ì± ê²ìí] */ 75 case "easygbus": { 76 if (this.isWrite) { 77 console.log("hi"); 78 const $textarea = document.querySelector("textarea.wrtfd-wysiwyg"); 79 let $count = document.querySelector(".reason-count"); 80 $textarea.addEventListener("input",(e)=>{ 81 if(!$count){ 82 $count = document.createElement("P"); 83 $count.classList.add(`reason-count`); 84 $count.innerHTML = "0 / 500"; 85 $count.style.cssText = "margin-top:10px;font-size:12px;color:#666;" 86 $textarea.parentElement.previousElementSibling.appendChild($count); 87 } 88 const currLen = e.target.value.length; 89 $count.innerHTML = `<strong style="font-weight:800;color:${currLen < 400 ? "#333" : (currLen >= 480 ? "red" : "orange")}">${currLen}</strong> / 500`; 90 }); 91 } 92 if (this.isRead) { return; } 93 /* ëª©ë¡ íì´ì§ì¼ë */ 94 95 } break; 96 } 97 }//activate_by_router 98 99 /* ====================================== */ 100 /* ====================================== */ 101 /* ====================================== */ 102}//class:SubPageCtrl
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.