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执行完后 |
繁简转换
全局JS | 转换方式 | 参数 |
---|---|---|
common.js | ||
mobile.js |
Widgets | 转换方式 | 参数 |
---|---|---|
bilibili | ||
bgimage | ||
countdown | ||
lyrics |
Modules | 转换方式 | 参数 |
---|---|---|
arguments | ||
lyrics | 未解决 |