LLWiki正在建设中,欢迎加入我们!
用户:Bhsd
跳转到导航
跳转到搜索
简历
- 2019年12月开始学习JavaScript(无关LL的GitHub项目)。
- 2020年4月开始学习Wikitext(萌娘百科)。
- 2020年6月开始学习CSS(萌娘百科)。
- 2020年7月(本站建站以后)开始学习jQuery。
- 2020年9月开始学习Lua(一个不再使用的模块)。
待办事项
无。
经验总结
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文件 | 桌面版 | 移动版 | 大小(KB) |
---|---|---|---|
common.js | mw.hook( 'wikipage.content' ) 或 $.ready |
||
mobile.js | mw.hook( 'wikipage.content' ) 或移动版菜单生成后
| ||
code-prettify | mw.hook( 'wikipage.content' ) |
mw.hook( 'wikipage.content' )
| |
copyLyrics | mw.hook( 'wikipage.content' ) |
mw.hook( 'wikipage.content' )
| |
exlinks | mw.hook( 'wikipage.content' ) |
mw.hook( 'wikipage.content' )
| |
hideConversionTab | 移动版语言选单生成后 | ||
lyricsTip | |||
MobileDiff | |||
mobile-Backtotop | $.ready |
$.ready
| |
noteTA | mw.hook( 'wikipage.content' ) |
mw.hook( 'wikipage.content' )
| |
ReferenceTooltips | mw.hook( 'wikipage.content' ) |
||
sharelink | $.ready |
$.ready
| |
toc-custom | $.ready |
||
translation | |||
UTCLiveClock | $.ready |
$.ready
| |
CommentsInLocalTime | mw.hook( 'wikipage.content' ) |
mw.hook( 'wikipage.content' )
| |
TalkHelper | CommentsInLocalTime执行完后 | CommentsInLocalTime执行完后 | |
stickyHeading | mw.hook( 'wikipage.content' ) |
mw.hook( 'wikipage.content' )
| |
autocomplete | 编辑区按下Tab键时 | ||
charinsert | $.ready |
$.ready
| |
contentBackup | $.ready |
$.ready
| |
custommenu | $.ready |
移动版菜单生成后 | |
editCount | $.ready |
移动版菜单生成后 | |
mobileEdit | 移动版JS加载完成后,具体时间不好确定,暂定为$.ready 再延迟0.5秒
| ||
notEditTopSection | $.ready
| ||
PreviewWithVariant | TransclusionPreviews执行完后 | TransclusionPreviews执行完后 | |
pxruler | $.ready |
||
TransclusionPreviews | $.ready |
$.ready
| |
Wikiplus | $.ready |
||
Cat-a-lot | $.ready |
||
HotCat | $.ready |
||
mobile-HotCat | MobileCategories执行完后 | ||
HotDefaultSort | $.ready |
||
MobileCategories | $.ready
| ||
uploader | $.ready |
||
SearchNamespace | $.ready |
移动版搜索框生成后 | |
CleanDeleteReasons | $.ready |
$.ready
| |
mobileBlock | $.ready
| ||
patrolPlus | $.ready |
||
patrolRevisions | $.ready |
$.ready
| |
site-lib | 无条件 | 无条件 | |
site-shared |
繁简转换
全局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
|
copyLyrics | ||
noteTA | 自动 + 手动 | wgUserVariant 或 wgUserLanguage
|
CommentsInLocalTime | 手动 | wgUserVariant
|
TalkHelper | ||
stickyHeading | ||
custommenu | 自动 + 手动 | wgUserLanguage
|
contentBackup | 手动 | wgUserLanguage
|
editCount | ||
Wikiplus | 手动 | wgUserLanguage
|
PreviewWithVariant | 不转换 | |
autocomplete | 不转换 + 手动 | wgUserVariant
|
charinsert | 自动 + 手动 | wgUserVariant
|
notEditTopSection | ||
mobileEdit | 手动 | wgUserLanguage
|
pxruler | 手动 | wgUserLanguage
|
TransclusionPreviews | 手动 | wgUserLanguage
|
MobileCategories | 自动 + 手动 | wgUserVariant 或 wgUserLanguage
|
HotCat | 手动 | wgUserVariant
|
mobile-HotCat | ||
Cat-a-lot | 手动 | wgUserLanguage
|
HotDefaultSort | ||
SearchNamespace | 手动 | wgUserLanguage
|
uploader | 手动 | wgUserLanguage
|
CleanDeleteReasons | ||
patrolPlus | 手动 | wgUserLanguage
|
patrolRevisions | 手动 | wgUserLanguage
|
mobileBlock | 手动 | wgUserLanguage
|
site-lib |
Widgets | 转换方式 | 参数 |
---|---|---|
bilibili | 自动 | wgUserVariant
|
bgimage | ||
countdown | 自动 | wgUserVariant
|
lyrics | 自动 | wgUserVariant
|
年表标签/筛选 | ||
songposition | 自动 | wgUserVariant
|
Widget:游戏主界面 |