LLWiki正在建设中,欢迎加入我们

“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和oojs-ui-windows
 
;mw.resizeLyrics()<ref>需要加載[[user:bhsd/widget/lyrics.js|Widget:Lyrics]]</ref>