16,874
个编辑
LLWiki正在建设中,欢迎加入我们!
(→Gadget(小工具)和全站JS: //使用页面/文本对比查看器快速编辑) |
(→LLWiki添加的全局變量和方法: //使用页面/文本对比查看器快速编辑) |
||
;<code>mw.safeRedirect(api, title, target, [summary])</code><ref name="site-lib" />
:检查繁简转换后的页面是否存在后创建新重定向。api为mw.Api对象;title为重定向页标题;target为重定向目标页标题;summary为可选摘要。页面已存在时抛出<code lang="js">'pageExists'</code>,API请求失败时抛出<code lang="js">'createFailure'</code>或<code lang="js">'queryFailure'</code>。需要mediawiki.api和mediawiki.util。
;<code>mw.confirm(text, flags)</code><ref name="site-lib" />
;<code>mw.tipsy($container, target, [params])</code><ref name="site-lib" />
:借助OO.ui.PopupWidget对象生成一个手机版也有效的tooltip。$container为外部容器的jQuery对象,target为目标元素的选择器,params为建立OO.ui.PopupWidget对象时的参数,默认为<code lang="js">{padded: true, width: null}</code>,可以覆盖。需要oojs-ui-core
;mw.resizeLyrics()<ref>需要加載[[user:bhsd/widget/lyrics.js|Widget:Lyrics]]</ref>
|