MediaWiki:Mobile.js:修订间差异

imported>=海豚=
APP重构中
wth
标签移动版编辑 移动版网页编辑
 
(未显示2个用户的3个中间版本)
第13行: 第13行:
     } catch (err) { /* */ }
     } catch (err) { /* */ }
     /* 函数定义体 */
     /* 函数定义体 */
    //用户资料页相关
    function isUserProfile() {
        return mw.config.get('wgCanonicalSpecialPageName') === "UserProfile" && mw.config.get('wgArticleId') === "0";
    }
     //页顶提示模板相关
     //页顶提示模板相关
     function commonBoxs() {
     function commonBoxs() {
第79行: 第75行:
         //页顶提示模板相关
         //页顶提示模板相关
         commonBoxs();
         commonBoxs();
        //用户资料页
        if (isUserProfile()) {
            var cardContainer = $('.card-container'),
                containerImage = cardContainer.find('.card'),
                containerImageFile = containerImage.find('a.image'),
                containerImageCaption = containerImage.find('.caption');
            containerImageCaption.css("padding", "0 8px");
            containerImageFile.before('<div id="#containerImage" class="listThumb list-thumb-placeholder" style="text-align: center;"><img src="https://img.moegirl.org.cn/common/a/a4/Placeholder-upload.png" style="height:32px" /></div>');
        }
         //黑幕
         //黑幕
         $('.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\.com?$/.test(url.host) && url.query.mobileaction !== "toggle_view_desktop") {
                         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;