MediaWiki:Mobile.js:修订间差异
imported>Irukaza 无编辑摘要 |
wth 标签:移动版编辑 移动版网页编辑 |
||
| (未显示同一用户的1个中间版本) | |||
| 第13行: | 第13行: | ||
} catch (err) { /* */ } | } catch (err) { /* */ } | ||
/* 函数定义体 */ | /* 函数定义体 */ | ||
//页顶提示模板相关 | //页顶提示模板相关 | ||
function commonBoxs() { | function commonBoxs() { | ||
| 第79行: | 第75行: | ||
//页顶提示模板相关 | //页顶提示模板相关 | ||
commonBoxs(); | commonBoxs(); | ||
//黑幕 | //黑幕 | ||
$('.heimu a').on("click", function() { | $('.heimu a').on("click", function() { | ||
| 第102行: | 第89行: | ||
if (ele instanceof HTMLAnchorElement) { | if (ele instanceof HTMLAnchorElement) { | ||
var url = new mw.Uri(ele.href); | var url = new mw.Uri(ele.href); | ||
if (/www\.hmoegirl\. | if (/www\.hmoegirl\.info?$/.test(url.host) && url.query.mobileaction !== "toggle_view_desktop") { | ||
url.host = mw.config.get("wgServer").replace(/^(?:(?:https?:)?\/\/)?www/, "m"); | url.host = mw.config.get("wgServer").replace(/^(?:(?:https?:)?\/\/)?www/, "m"); | ||
ele.href = url; | ele.href = url; | ||