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' ) 或移動版菜單生成後
| |
site-lib | 無條件 | 無條件 |
exlinks | mw.hook( 'wikipage.content' ) |
mw.hook( 'wikipage.content' )
|
sharelink | $.ready |
$.ready
|
toc-custom | $.ready |
|
UTCLiveClock | $.ready |
$.ready
|
hideConversionTab | 移動版語言選單生成後 | |
mobile-Backtotop | $.ready |
$.ready
|
CommentsInLocalTime | mw.hook( 'wikipage.content' ) |
mw.hook( 'wikipage.content' )
|
code-prettify | mw.hook( 'wikipage.content' ) |
mw.hook( 'wikipage.content' )
|
ReferenceTooltips | mw.hook( 'wikipage.content' ) |
|
stickyHeading | mw.hook( 'wikipage.content' ) |
mw.hook( 'wikipage.content' )
|
MobileCategories | $.ready
| |
editCount | $.ready |
移動版菜單生成後 |
HotCat | $.ready |
|
mobile-HotCat | MobileCategories執行完後 | |
Cat-a-lot | $.ready |
|
Wikiplus | $.ready |
|
PreviewWithVariant | $.ready |
$.ready
|
notEditTopSection | $.ready
| |
mobileEdit | 移動版JS加載完成後,具體時間不好確定,暫定為$.ready 再延遲0.5秒
| |
pxruler | $.ready |
|
CleanDeleteReasons | $.ready |
$.ready
|
patrolPlus | $.ready |
|
patrolRevisions | $.ready |
$.ready
|
confirmationRollback | $.ready |
$.ready
|
mobileBlock | $.ready
| |
SearchNamespace | $.ready |
移動版搜索框生成後 |
TalkHelper | CommentsInLocalTime執行完後 | CommentsInLocalTime執行完後 |