「MediaWiki:Mobile.js」の版間の差分
細編集の要約なし タグ: モバイル編集 モバイルウェブ編集 |
細編集の要約なし タグ: モバイル編集 モバイルウェブ編集 |
||
(同じ利用者による、間の14版が非表示) | |||
1行目: | 1行目: | ||
window. | window.___mobileJSLoaded = true; | ||
(function () { | |||
. | var disableMobileUI = false | ||
.then(function ( | || window.localStorage.getItem("disableMobileUI") | ||
var | || window.sessionStorage.getItem("disableMobileUI") | ||
builder.build( | if (disableMobileUI) { | ||
return; | |||
} | |||
var wgScript = mw.config.get("wgScript"); | |||
var builderURL = wgScript | |||
+ "?" | |||
+ new URLSearchParams({ | |||
title: "MediaWiki:MobileUI.js", | |||
action: "raw", | |||
ctype: "text/javascript" | |||
}) | |||
.toString(); | |||
var builderThread = mw.loader | |||
.getScript(builderURL) | |||
.then(function () { | |||
return new MobileUIBuilder(mw) | |||
.prebuild(); | |||
}); | |||
var dataURL = wgScript | |||
+ "?" | |||
+ new URLSearchParams({ | |||
title: "MediaWiki:MobileUI.json", | |||
action: "raw", | |||
ctype: "application/json" | |||
}) | |||
.toString(); | |||
var dataThread = $ | |||
.getJSON(dataURL) | |||
.then(Object); | |||
$ | |||
.when(builderThread, dataThread) | |||
.done(function (builder, data) { | |||
builder.build(data); | |||
}); | |||
})(); |
2020年9月30日 (水) 01:46時点における最新版
window.___mobileJSLoaded = true;
(function () {
var disableMobileUI = false
|| window.localStorage.getItem("disableMobileUI")
|| window.sessionStorage.getItem("disableMobileUI")
if (disableMobileUI) {
return;
}
var wgScript = mw.config.get("wgScript");
var builderURL = wgScript
+ "?"
+ new URLSearchParams({
title: "MediaWiki:MobileUI.js",
action: "raw",
ctype: "text/javascript"
})
.toString();
var builderThread = mw.loader
.getScript(builderURL)
.then(function () {
return new MobileUIBuilder(mw)
.prebuild();
});
var dataURL = wgScript
+ "?"
+ new URLSearchParams({
title: "MediaWiki:MobileUI.json",
action: "raw",
ctype: "application/json"
})
.toString();
var dataThread = $
.getJSON(dataURL)
.then(Object);
$
.when(builderThread, dataThread)
.done(function (builder, data) {
builder.build(data);
});
})();