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' ) 或移動版菜單生成後
| |
exlinks | mw.hook( 'wikipage.content' ) |
mw.hook( 'wikipage.content' )
|
sharelink | $.ready |
$.ready
|
toc-custom | $.ready |
|
UTCLiveClock | $.ready |
$.ready
|
hideConversionTab | 移動版語言選單生成後 | |
mobile-Backtotop | $.ready |
$.ready
|
code-prettify | mw.hook( 'wikipage.content' ) |
mw.hook( 'wikipage.content' )
|
ReferenceTooltips | mw.hook( 'wikipage.content' ) |
|
MobileCategories | $.ready
| |
copyLyrics | mw.hook( 'wikipage.content' ) |
mw.hook( 'wikipage.content' )
|
CommentsInLocalTime | mw.hook( 'wikipage.content' ) |
mw.hook( 'wikipage.content' )
|
TalkHelper | CommentsInLocalTime執行完後 | CommentsInLocalTime執行完後 |
stickyHeading | mw.hook( 'wikipage.content' ) |
mw.hook( 'wikipage.content' )
|
custommenu | $.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 |
|
SearchNamespace | $.ready |
移動版搜索框生成後 |
CleanDeleteReasons | $.ready |
$.ready
|
patrolPlus | $.ready |
|
patrolRevisions | $.ready |
$.ready
|
confirmationRollback | $.ready |
$.ready
|
mobileBlock | $.ready
| |
site-lib | 無條件 | 無條件 |
繁簡轉換
全局JS | 轉換方式 | 參數 |
---|---|---|
common.js | 自動 | wgUserVariant
|
mobile.js | 自動 + 手動 | wgUserVariant 或 wgUserLanguage
|
Gadgets | 轉換方式 | 參數 | |
---|---|---|---|
exlinks | 手動 | wgUserLanguage
| |
sharelink | 手動 | wgUserLanguage
| |
toc-custom | 自動 + 手動 | wgUserVariant
| |
UTCLiveClock | |||
hideConversionTab | |||
mobile-Backtotop | |||
code-prettify | |||
ReferenceTooltips | 自動 + 手動 | wgUserVariant 或 wgUserLanguage
| |
MobileCategories | 自動 + 手動 | wgUserVariant 或 wgUserLanguage
| |
copyLyrics | |||
CommentsInLocalTime | 手動 | wgUserVariant
| |
TalkHelper | |||
stickyHeading | |||
custommenu | 自動 + 手動 | wgUserLanguage
| |
editCount | |||
HotCat | 手動 | wgUserVariant
| |
mobile-HotCat | |||
Cat-a-lot | 手動 | wgUserLanguage
| |
Wikiplus | 手動 | wgUserLanguage
| |
PreviewWithVariant | 不轉換 | ||
notEditTopSection | |||
mobileEdit | 手動 | wgUserLanguage
| |
pxruler | 手動 | wgUserLanguage
| |
SearchNamespace | 手動 | wgUserLanguage
| |
CleanDeleteReasons | |||
patrolPlus | 手動 | wgUserLanguage
| |
patrolRevisions | 手動 | wgUserLanguage
| |
confirmationRollback | 手動 | wgUserLanguage
| |
mobileBlock | 手動 | wgUserLanguage
| |
site-lib |
Widgets | 轉換方式 | 參數 |
---|---|---|
bilibili | 自動 | wgUserVariant
|
bgimage | ||
countdown | 自動 | wgUserVariant
|
lyrics | 自動 | wgUserVariant
|
Modules | 轉換方式 | 參數 |
---|---|---|
arguments | ||
lyrics | 自動 | wgUserVariant
|