1/** 2 * æ é¢åå ¸ 3 * @type {{system_terminal: string, setOption: string, about_button: string, index_home_button_a: string, tools_listTool: string, trends_listTrends: string, index_user_mali: string, index_user_manager: string}} 4 */ 5const button_title = { 6 'index_back_page': 'è¿åä¸çº§', 7 'index_home_button_a': 'ç³»ç»ä¸»é¡µ', 8 'index_user_mali': 'é®ä»¶ä¿¡ç®±', 9 'index_user_manager': 'ç¨æ·ç®¡ç', 10 'index_carousel_manager': 'è½®æç®¡ç', 11 'user_resource_manager': 'çé空é´', 12 'trends_listTrends': '卿ä¸å¿', 13 'article_listArticle': 'æç« ä¸å¿', 14 'tools_listTool': 'å·¥å ·é¢æ¿', 15 'games_listTool': 'ä¼é²æ¸¸æ', 16 'shopCodeBook': 'ç æ¬åå', 17 'system_terminal': 'ç³»ç»ç»ç«¯', 18 'setOption': '设置èå', 19 'siteComment': 'LYçè¨æ¿', 20 'icon-moon_button': '徿 æ±æ»', 21 'about_button': 'å ³äºæä»¬' 22} 23 24/** 25 * 徿 åå ¸ 26 * @type {{system_terminal: string, setOption: string, about_button: string, index_home_button_a: string, tools_listTool: string, trends_listTrends: string, index_user_mali: string, index_user_manager: string}} 27 */ 28const button_icon = { 29 'index_back_page': 'î¤', 30 'index_home_button_a': 'î§', 31 'index_user_mali': '', 32 'index_user_manager': 'îª', 33 'index_carousel_manager': 'îº', 34 'user_resource_manager': '', 35 'trends_listTrends': 'î¤', 36 'article_listArticle': 'î¹', 37 'tools_listTool': 'î©', 38 'games_listTool': 'ð¹ï¸', 39 'shopCodeBook': '', 40 'system_terminal': 'î¿', 41 'setOption': 'î¤', 42 'siteComment': 'îº', 43 'icon-moon_button': 'ï¿', 44 'about_button': '', 45} 46 47/** 48 * åå§åæé®é¼ æ ç§»å ¥äºä»¶ 49 */ 50function initButton() { 51 for (let buttonTitleKey in button_title) { 52 const elementById = document.getElementById(buttonTitleKey); 53 elementById.addEventListener('mouseover', () => { 54 elementById.innerText = button_title[buttonTitleKey] 55 }) 56 elementById.addEventListener('mouseout', () => { 57 elementById.innerText = button_icon[buttonTitleKey] 58 }) 59 } 60} 61 62/** 63 * éè¦ç»å½ç页ç 彿° 64 * @param page é¡µé¢ 65 * @param _ 66 */ 67const needLoginToPageFun = (page, _) => { 68 if (isNotLogin()) { 69 toPage('Login.html') 70 } else { 71 $(showArea).load(page) 72 } 73} 74 75/** 76 * 页é¢åæ°åè°å½æ°åå ¸ 77 * @type {{default: (function(*, *): *|jQuery)}} 78 */ 79const pageFun = { 80 "default": (page, _) => $(showArea).load(page) 81} 82 83/** 84 * éè¦ç»å½ç页é¢åæ°åè°å½æ°åå ¸ 85 * @type {{"maliWriter.html": needLoginToPageFun, "PersonalHomepage.html": needLoginToPageFun, "trendsWriter.html": needLoginToPageFun, "ArticleWriter.html": needLoginToPageFun, "listFriend.html": needLoginToPageFun}} 86 */ 87const needLogin = { 88 "ArticleWriter.html": needLoginToPageFun, 89 "listFriend.html": needLoginToPageFun, 90 "maliWriter.html": needLoginToPageFun, 91 "maliReader.html": needLoginToPageFun, 92 "trendsWriter.html": needLoginToPageFun, 93 "PersonalHomepage.html": needLoginToPageFun, 94 "resetPassword.html": needLoginToPageFun, 95 "listUserManager.html": needLoginToPageFun, 96 "listRChat.html": needLoginToPageFun, 97 "setOption.html": needLoginToPageFun, 98 "diskMirrorUserResource.html": needLoginToPageFun, 99 "DiskMirrorFileManager.html": needLoginToPageFun, 100 "default": (page, _) => { 101 } 102} 103 104/** 105 * 跳转å°ä¸ä¸ªæå®çé¡µé¢ 106 * @param page 页é¢çåæ° 107 * @param id_list é带çåæ° å¯é项 108 * @param haveCookie 妿å½åä¸å å«ç»å½ä¿¡æ¯è®¾ç½®ä¸º false è¿æ ·åªä¼å¨ä¸éè¦ç»å½çå表éé¢å¯»æ¾åè°ï¼åä¹åæ¯å¨ needLogin ä¸å¯»æ¾ 109 */ 110function toPage(page, id_list = [], haveCookie = false) { 111 console.info(page, id_list, haveCookie) 112 // åå¤åè°åå ¸ 113 const d = haveCookie ? needLogin : pageFun 114 // è·åå°é¡µé¢ 对åºç彿°å¤çå¨ 115 if (page in d) { 116 d[page](page, id_list) 117 } else { 118 d['default'](page, id_list) 119 } 120} 121 122/** 123 * åå§åç¨æ·èªå·±è®¾ç½®çå£çº¸ 124 */ 125function initWebBackImage() { 126 if (!isNotLogin()) { 127 const webBackImage = USER_CONF['web_BackImage']; 128 if (webBackImage !== undefined) { 129 const string = webBackImage; 130 const string1 = string[1]; 131 if (string.length >
131= 2 && string1 !== undefined && string1 !== WEB_CONF['UN_DATA_CHAR']) { 132 const elementsByClassNameElement = document.getElementsByClassName("body_div")[0]; 133 elementsByClassNameElement.style.background = `url(${string1})` 134 setStyle(elementsByClassNameElement, backImageCssUniversal) 135 } 136 } 137 } 138} 139 140/** 141 * éè左边çå¯¼èªæ 142 */ 143function hiddenLeftNavigationBar() { 144 const elementById = document.getElementById("leftNavigationBar"); 145 elementById.style.animation = 'slideOutLeftNavigationBar 1s forwards' 146 document.getElementById("rightValueShow").style.width = '100%' 147} 148 149/** 150 * æ¾ç¤ºå·¦è¾¹çå¯¼èªæ 151 */ 152function showLeftNavigationBar() { 153 const elementById = document.getElementById("leftNavigationBar"); 154 elementById.style.animation = 'slideInLeftNavigationBar 1s forwards' 155 document.getElementById("rightValueShow").style.width = '90%' 156} 157 158/** 159 * æ ¹æ®ç¨æ·çæéï¼å³å®è¦æ¾ç¤ºçæé®æ§ä»¶å ç´ 160 */ 161function initButtonByUserPL() { 162 if (!(my === undefined || my.name === undefined || my.permissionLevel === null || isPL(my, 'PermissionLevel.VISITOR'))) { 163 // å¤æä¸ªäººæé 妿æé为管çè æè å ¶ä»¥ä¸åè¿è¡ç¸å ³æé®çå±ç¤º 164 if (isPL(my, 'PermissionLevel.MANAGER') || isPL(my, 'PermissionLevel.ADMIN')) { 165 const needManager = document.getElementsByClassName("need_manager_per"); 166 for (let i = 0; i < needManager.length; i++) { 167 needManager[i].style.display = 'block' 168 } 169 } else { 170 const needManager = document.getElementsByClassName("need_manager_per"); 171 for (let i = 0; i < needManager.length; i++) { 172 needManager[i].style.display = 'none' 173 } 174 } 175 } 176} 177 178 179/** 180 * åå§å çé æå¡å¨å®¢æ·ç«¯ 181 * @return {DiskMirror} 182 */ 183function initDiskMirror() { 184 // å®ä¾å çé æå¡å¨å®¢æ·ç«¯ 185 const diskMirror = new DiskMirror(WEB_CONF['ARTICLE_DISk_MIRROR_HTTP']); 186 diskMirror.setSk(getWebConfByKey("USER_DISK_MIRROR_SK"), getWebConfByKey("COOKIE_DOMAIN")) 187 return diskMirror; 188} 189 190/** 191 * åå§å çé æå¡å¨å®¢æ·ç«¯ è¿ä¸ªæ¯ä¸ç¨äºä¸ä¼ çï¼æä»¬å¨å端æä¾äºä¸ä¸ªä¸ä¼ diskMirror çæ¥å£ è¿ä¸ªæ¥å£ä¸ä¼ æ´å¿« ä¸è¿è¿ä¸ªæ¥å£ä¸æä¾ä¸è½½ 192 * @return {DiskMirror} 193 */ 194function initUploadDiskMirror() { 195 // å®ä¾å çé æå¡å¨å®¢æ·ç«¯ 196 const diskMirror = new DiskMirror(backEnd_host_href()); 197 diskMirror.setSk(getWebConfByKey("USER_DISK_MIRROR_SK"), getWebConfByKey("COOKIE_DOMAIN")) 198 return diskMirror; 199}
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.