MediaWiki:Gadget-mobileNav.js:修订间差异
imported>=海豚= 创建页面,内容为“→MobileNav.js by User:NHJR: (function ($, mw) { //加载内链脚本 function loadScript(scriptPath){ var pageTitle = encodeURIComponent(scriptPath); mw…” |
imported>=海豚= 无编辑摘要 |
||
| 第9行: | 第9行: | ||
var pageTitle = encodeURIComponent(scriptPath); | var pageTitle = encodeURIComponent(scriptPath); | ||
mw.loader.load("https://www.hmoegirl.com/index.php?title=" + pageTitle + "&action=raw&ctype=text/javascript"); | mw.loader.load("https://www.hmoegirl.com/index.php?title=" + pageTitle + "&action=raw&ctype=text/javascript"); | ||
} | |||
//是否为移动版 | |||
var isMobile = window.location.href.indexOf("m.hmoegirl.com") != -1; | |||
function mobile(onMobile){ | |||
if(isMobile){ | |||
onMobile(); | |||
} | |||
} | |||
function desktop(onDesktop){ | |||
if(!isMobile){ | |||
onDesktop(); | |||
} | |||
} | } | ||