V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
zhixiao
V2EX  ›  问与答

大家有没有发现,最近 google 搜维基百科出来的都是手机站点?

  •  3
     
  •   zhixiao · 2022-06-20 11:03:14 +08:00 · 3866 次点击
    这是一个创建于 648 天前的主题,其中的信息可能已经有所发展或是发生改变。

    虽说 m 站点 pc 看起来效果也还行,但是总有点不爽。。。

    37 条回复    2022-11-03 22:44:26 +08:00
    zocome
        1
    zocome  
       2022-06-20 11:39:11 +08:00   ❤️ 2
    我还以为只有我一个人遇到这种情况,看起来不是个例

    出现 m 站我能理解,但是同一个出口 IP 有的时候是 pc 站有的时候又是 m 站,这就有点迷惑了
    fox
        2
    fox  
       2022-06-20 11:57:27 +08:00
    同 lz
    yanunon
        3
    yanunon  
       2022-06-20 12:25:53 +08:00 via iPhone
    俺也一样
    jdkl
        4
    jdkl  
       2022-06-20 12:27:43 +08:00
    还有豆瓣也是
    virusdefender
        5
    virusdefender  
       2022-06-20 12:29:18 +08:00   ❤️ 1
    +1 不过只遇到一个常用的网站是这样,还以为这个网站的 seo 问题呢
    cnrting
        6
    cnrting  
       2022-06-20 12:44:20 +08:00 via iPhone
    這種情況在 sohu 和網易出現挺久了
    v2tudnew
        7
    v2tudnew  
       2022-06-20 12:52:51 +08:00   ❤️ 7
    zhifanlo
        8
    zhifanlo  
       2022-06-20 13:44:43 +08:00
    同样情况
    butanediol2d
        9
    butanediol2d  
       2022-06-20 13:47:29 +08:00
    很早就发现了,但是好像不是所有维基百科页面都是手机版。
    chotow
        10
    chotow  
       2022-06-20 14:00:23 +08:00 via iPhone
    会不会是维基根据 UA 做自动跳转,谷歌爬虫被指去了移动版 🤔
    longgediyi999
        11
    longgediyi999  
       2022-06-20 16:06:28 +08:00
    我以为改版了 闹半天是移动版
    tpkxywxd
        12
    tpkxywxd  
       2022-06-20 16:55:02 +08:00   ❤️ 1
    的确很讨厌,mobile first 非得牺牲桌面端的用户体验也是过分。推荐安装个 redirector ,然后添加跳转规则:
    from: ^https:\/\/(.*?)\.m\.wikipedia\.org\/(.*)
    to: https://$1.wikipedia.org/$2
    插件地址: https://chrome.google.com/webstore/detail/redirector/pajiegeliagebegjdhebejdlknciafen
    fkdtz
        13
    fkdtz  
       2022-06-20 17:37:30 +08:00
    @v2tudnew 7 楼的油猴不错,但是应该只会在页面是「繁体」+「 m 站」时才会跳转,如果是「简体」+「 m 站」则不会自动跳转。实际上是 include 规则没匹配的原因,可以在代码中自己加一下
    v2tudnew
        14
    v2tudnew  
       2022-06-20 17:44:49 +08:00
    @fkdtz #13 我看了下,好像是有的,https://zh.m.wikipedia.org/zh-cn/*,试了下随便找个词添加 m 确实会跳转。
    v23x
        15
    v23x  
       2022-06-20 17:45:35 +08:00
    的确 感觉好烦..
    v2tudnew
        16
    v2tudnew  
       2022-06-20 17:53:40 +08:00
    @tpkxywxd #12 这个也不错。
    fkdtz
        17
    fkdtz  
       2022-06-20 19:00:22 +08:00
    @v2tudnew /zh-hans 不行。zh-cn 是中文中国,zh-hans 是简体中文。
    实际上给规则写成 https://zh.m.wikipedia.org/* 就完了,不知道作者为啥一个个匹配的 [手动狗头]
    docx
        18
    docx  
       2022-06-20 19:16:24 +08:00 via iPhone
    试了我这边还好,一页 10 条结果,只有 1 条繁体中文的结果是 zh.m.wikipedia.org
    v2tudnew
        19
    v2tudnew  
       2022-06-20 19:25:56 +08:00
    @fkdtz #17 不知道,估计作者没碰到 zh-hans 的 URL 吧,字体变种里面没这个选择(强行插入 WIKI 会提示影响阅读体验。
    通用来说上面那个扩展会好些,这个适合中文人群。
    cpalead
        20
    cpalead  
       2022-06-20 21:09:22 +08:00
    @v2tudnew 试了,不好用,m 站不转发
    v2tudnew
        21
    v2tudnew  
       2022-06-20 21:14:23 +08:00
    @cpalead #20 首先,我不是作者,其次,寻求帮助也要先贴出链接,而不是一句不转发。
    ysc3839
        22
    ysc3839  
       2022-06-20 21:14:54 +08:00 via Android   ❤️ 1
    @tpkxywxd 推荐使用 Header Editor 扩展,这个 Redirector 已经很多年没更新了。Header Editor 不仅能用来跳转,还可以修改请求头,可以避免一些网站根据请求头进行跳转。
    MoonQiu1342
        23
    MoonQiu1342  
       2022-06-20 22:02:41 +08:00 via iPhone
    我也是,Safari 上点开 Wiki 指向的一直是 m 站,每次我只能删掉.m ,我还以为是我自己问题(捂脸)
    MrCurly
        24
    MrCurly  
       2022-06-20 22:06:03 +08:00
    我也发现了,不过不怎么影响阅读,就没管
    explorerproxy
        25
    explorerproxy  
       2022-06-20 22:14:28 +08:00
    不止是维基,很多的网站都是这样,有没有适配了大量站点的脚本,可以强制手机版换成桌面版
    v2tudnew
        26
    v2tudnew  
       2022-06-20 22:39:30 +08:00
    目前#23 的胜出😆,这个能实时预览测试,这点非常好。
    TGl2aWRTQg
        27
    TGl2aWRTQg  
       2022-06-21 00:56:03 +08:00
    我也是,不知道啥情况
    0x400
        28
    0x400  
       2022-06-21 08:39:51 +08:00 via iPhone
    换了✈️ 发现这个问题 不知道是不是碰巧
    cpalead
        29
    cpalead  
       2022-06-21 15:32:51 +08:00   ❤️ 2
    @v2tudnew 我已经( https://greasyfork.org/zh-CN/scripts/439848 )把 bug 修复了
    大家直接把我的脚本导入就行了


    // ==UserScript==
    // @name RedirectChineseWikipedia
    // @name:zh-CN 中文维基重定向
    // @namespace https://zh.wikipedia.org
    // @include https://zh.wikipedia.org/wiki/*
    // @include https://zh.wikipedia.org/zh/*
    // @include https://zh.wikipedia.org/zh-hk/*
    // @include https://zh.wikipedia.org/zh-mo/*
    // @include https://zh.wikipedia.org/zh-tw/*
    // @include https://zh.wikipedia.org/zh-my/*
    // @include https://zh.wikipedia.org/zh-sg/*
    // @include https://zh.wikipedia.org/zh-hans/*
    // @include https://zh.m.wikipedia.org/wiki/*
    // @include https://zh.m.wikipedia.org/zh/*
    // @include https://zh.m.wikipedia.org/zh-hk/*
    // @include https://zh.m.wikipedia.org/zh-mo/*
    // @include https://zh.m.wikipedia.org/zh-tw/*
    // @include https://zh.m.wikipedia.org/zh-my/*
    // @include https://zh.m.wikipedia.org/zh-sg/*
    // @include https://zh.m.wikipedia.org/zh-cn/*
    // @include https://zh.m.wikipedia.org/zh-hans/*
    // @version 0.3
    // @description Force redirect Chinese Wikipedia from other locales to zh-cn (and also from mobile ver to desktop ver)
    // @description:zh-CN 重定向中文维基的其他版本(繁体中文等)到简体中文,同时重定向手机端页面到桌面端页面。
    // @author aisuneko
    // @icon https://zh.wikipedia.org/favicon.ico
    // @license MIT
    // @grant none
    // ==/UserScript==

    (function() {
    'use strict';
    let variants = ["wiki/", "zh/", "zh-hk/", "zh-mo/", "zh-tw/","zh-my/", "zh-sg/", "zh-hans/"];
    let url = window.location.href;
    let desturl = url;
    let header = "zh.wikipedia.org/";
    let mobile_header = "zh.m.wikipedia.org/";
    if(url.search(mobile_header) != -1) desturl = url.replace(mobile_header, header);

    let target = header + "zh-cn/";
    for(let i = 0; i < variants.length; i++){
    let searchstr = header + variants[i];
    if(desturl.search(searchstr) != -1){
    desturl = desturl.replace(searchstr, target);
    break;
    }
    }
    window.location.replace(desturl);
    })();
    v2tudnew
        30
    v2tudnew  
       2022-06-21 19:46:11 +08:00
    @cpalead #29 已经删了,还是 Header Editor 的好用,两条正则搞定中文和外语的问题。
    posizard
        31
    posizard  
       2022-07-14 14:23:33 +08:00
    m 站可以切换语言,pc 站底部有些词条,有类似知识结构的介绍。 强烈希望这两个功能整合一下。
    cpalead
        32
    cpalead  
       2022-10-24 14:30:03 +08:00
    @v2tudnew 能不能把规则分享一下
    v2tudnew
        33
    v2tudnew  
       2022-10-24 15:22:32 +08:00   ❤️ 1
    @cpalead 本来想中文部分都例举出来,但想到反正有排除,zh-后面也不可能是外语。

    匹配类型: 正则表达式

    匹配规则: ^https?:\/\/([a-z]+)\.m\.wikipedia\.org\/

    执行类型: 常规

    重定向至: https://$1.wikipedia.org/


    匹配类型: 正则表达式

    匹配规则: ^https?:\/\/zh\.wikipedia\.org\/(wiki|zh-[a-z]+)\/

    排除规则://zh.wikipedia.org/zh-cn/

    执行类型: 常规

    重定向至: https://zh.wikipedia.org/zh-cn/
    cpalead
        34
    cpalead  
       2022-11-03 18:12:03 +08:00
    @v2tudnew 你这个好用啊,用油猴的脚本,是先把页面加载了,然后再跳转到中文页面,你这个规则,还没加载直接就跳转了!省时间,而且油猴脚本有时候还不生效
    cpalead
        35
    cpalead  
       2022-11-03 19:38:08 +08:00
    @v2tudnew 你这少了一条
    ^https?:\/\/zh\.wikipedia\.org\/(wiki|zh)\/
    因为有些就是 zh 的不是 zh-tw 这样的
    v2tudnew
        36
    v2tudnew  
       2022-11-03 21:15:36 +08:00
    @cpalead ^https?:\/\/zh\.wikipedia\.org\/(wiki|zh|zh-[a-z]+)\/ 确实,但没遇到过啊。😆
    cpalead
        37
    cpalead  
       2022-11-03 22:44:26 +08:00
    @v2tudnew 我刚导入就遇到了,哈哈
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   4047 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 05:16 · PVG 13:16 · LAX 22:16 · JFK 01:16
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.