LLWiki正在建設中,歡迎加入我們!
用戶:Bhsd
跳至導覽
跳至搜尋
簡歷
- 2019年12月開始學習Javascript(無關LL的GitHub項目)。
- 2020年4月開始學習Wikitext(萌娘百科)。
- 2020年6月開始學習CSS(萌娘百科)。
- 2020年7月(本站建站以後)開始學習jQuery。
待辦事項
- CSS
- Javascript(全局和Gadgets)
- 濫用過濾器
- 模板和Widgets
- 幫助頁面
經驗總結
CSS
移動版已知會自動添加以下樣式:
table, caption, tbody, tfoot, thead, tr, th, td {
font-size: 100%;
}
table {
border-collapse: collapse;
}
.content table {
margin: 1em 0;
overflow: auto;
overflow-y: hidden;
overflow-x: auto;
}
@media only screen and (max-width: 720px) {
.content table {
display: block;
width: 100% !important;
}
}
Javascript
試着整理下本站各主要JS腳本(全局JS和Gadgets)的合理執行時機:
JS文件 | 桌面版 | 移動版 |
---|---|---|
common.js | mw.hook('wikipage.content') 或$.ready |
|
mobile.js | mw.hook('wikipage.content') 或移動版菜單生成後
| |
gadget-site-lib.js | 無條件 | 無條件 |
gadget-exlinks.js | mw.hook('wikipage.content') |
mw.hook('wikipage.content')
|
gadget-sharelink.js | $.ready |
$.ready
|
gadget-toc-custom.js | $.ready |
|
gadget-UTCLiveClock.js | $.ready |
$.ready
|
gadget-hideConversionTab.js | 移動版語言選單生成後 | |
gadget-mobile-Backtotop.js | $.ready |
$.ready
|
gadget-CommentsInLocalTime.js | mw.hook('wikipage.content') |
mw.hook('wikipage.content')
|
gadget-code-prettify.js | mw.hook('wikipage.content') |
mw.hook('wikipage.content')
|
gadget-ReferenceTooltips.js | mw.hook('wikipage.content') |
|
gadget-stickyHeading.js | mw.hook('wikipage.content') |
mw.hook('wikipage.content')
|
gadget-MobileCategories.js | $.ready
| |
gadget-editCount.js | $.ready |
移動版菜單生成後 |
gadget-HotCat.js | $.ready |
|
gadget-mobile-HotCat.js | gadget-MobileCategories執行完後 | |
gadget-Cat-a-lot.js | $.ready |
|
gadget-Wikiplus.js | $.ready |
|
gadget-PreviewWithVariant.js | $.ready |
$.ready
|
gadget-notEditTopSection.js | $.ready
| |
gadget-mobileEdit.js | 移動版JS加載完成後,具體時間不好確定,暫定為$.ready 再延遲0.5秒
| |
gadget-pxruler.js | $.ready |
|
gadget-CleanDeleteReasons.js | $.ready |
$.ready
|
gadget-patrolPlus.js | $.ready |
|
gadget-patrolRevisions.js | $.ready |
$.ready
|
gadget-confirmationRollback.js | $.ready |
$.ready
|
gadget-mobileBlock.js | $.ready
|