Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

小提示: 腾讯公益404页面返回自定义链接已经失效 #1136

Closed
LeonXtp opened this issue Sep 23, 2016 · 5 comments
Closed

小提示: 腾讯公益404页面返回自定义链接已经失效 #1136

LeonXtp opened this issue Sep 23, 2016 · 5 comments

Comments

@LeonXtp
Copy link

LeonXtp commented Sep 23, 2016

Expected behavior (预期行为)

显示自定义的返回文本,点击返回自定义的 URL

Actual behavior (实际行为)

显示返回腾讯网,点击返回腾讯主页

Steps to reproduce the behavior (重现步骤)

请参考你的文档中的效果页面: http://www.ixirong.com/404.html

NexT Informations

Add the ✔ sign before an item which is affected by this behavior.

NexT Version:

  • Master
  • Latest Release ✔ 5.0.1
  • Old version -

NexT Scheme:

  • All schemes
  • Muse
  • Mist✔
  • Pisces

Other Informations (Like Browser, System, Screenshots)

Windows10, Chrome 53.0.2785.116

@Neveryu
Copy link

Neveryu commented Sep 23, 2016

手动改一下返回的链接到自己的主页不就是了吗

@klgd
Copy link

klgd commented Sep 30, 2016

@Neveryu 如何手动改?

@LeonXtp
Copy link
Author

LeonXtp commented Oct 17, 2016

@Neveryu 改了是无效的,我只是提醒一下作者,这个404不可用了,应该是腾讯把这个改了

@lixiansky
Copy link

@LeonXtp 腾讯的公益404页面Bug Fix

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <meta name="author" content="songjinzhong,songjz.ecnu@gmail.com">
    <title>404</title>
    <!-- 记住把下面的 homePageName、homePageUrl 改成你想需要的内容 -->
    <script type="text/javascript" src="http://www.qq.com/404/search_children.js" homePageName="返回渔人的主页" homePageUrl="/" charset="utf-8">
    </script>
    <script type="text/javascript">
        ! function() {
            function a(a, b) {
                return (/string|function/.test(typeof b) ? h : g)(a, b)
            }
            function b(a, c) {
                return "string" != typeof a && (c = typeof a, "number" === c ? a += "" : a = "function" === c ? b(a.call(a)) : ""), a
            }
            function c(a) {
                return l[a]
            }
            function d(a) {
                return b(a).replace(/&(?![\w#]+;)|[<>"']/g, c)
            }
            function e(a, b) {
                if (m(a))
                    for (var c = 0, d = a.length; d > c; c++) b.call(a, a[c], c, a);
                else
                    for (c in a) b.call(a, a[c], c)
            }
            function f(a, b) {
                var c = /(\/)[^/]+\1\.\.\1/,
                    d = ("./" + a).replace(/[^/]+$/, ""),
                    e = d + b;
                for (e = e.replace(/\/\.\//g, "/"); e.match(c);) e =
                    e.replace(c, "/");
                return e
            }
            function g(b, c) {
                var d = a.get(b) || i({
                    filename: b,
                    name: "Render Error",
                    message: "Template not found"
                });
                return c ? d(c) : d
            }
            function h(a, b) {
                if ("string" == typeof b) {
                    var c = b;
                    b = function() {
                        return new k(c)
                    }
                }
                var d = j[a] = function(c) {
                    try {
                        return new b(c, a) + ""
                    } catch (d) {
                        return i(d)()
                    }
                };
                return d.prototype = b.prototype = n, d.toString = function() {
                    return b + ""
                }, d
            }
            function i(a) {
                var b = "{Template Error}",
                    c = a.stack || "";
                if (c) c = c.split("\n").slice(0, 2).join("\n");
                else
                    for (var d in a) c += "<" + d + ">\n" + a[d] + "\n\n";
                return function() {
                    return "object" == typeof console && console.error(b + "\n\n" + c), b
                }
            }
            var j = a.cache = {},
                k = this.String,
                l = {
                    "<": "&#60;",
                    ">": "&#62;",
                    '"': "&#34;",
                    "'": "&#39;",
                    "&": "&#38;"
                },
                m = Array.isArray || function(a) {
                    return "[object Array]" === {}.toString.call(a)
                },
                n = a.utils = {
                    $helpers: {},
                    $include: function(a, b, c) {
                        return a = f(c, a), g(a, b)
                    },
                    $string: b,
                    $escape: d,
                    $each: e
                },
                o = a.helpers = n.$helpers;
            a.get = function(a) {
                    return j[a.replace(/^\.\//, "")]
                }, a.helper = function(a, b) {
                    o[a] = b
                }, "function" == typeof define ? define(function() {
                    return a
                }) :
                "undefined" != typeof exports ? module.exports = a : this.template = a, a("body", function(a) {
                    var b = this,
                        c = (b.$helpers, b.$escape),
                        /*
                        * 记住把下面的 homePageName、homePageUrl 改成你想需要的内容
                        */
                        d = "/",
                        e = "返回渔人的主页",
                        f = a.topid,
                        g = a.topimg,
                        h = a.topname,
                        i = a.topgender,
                        j = a.topbirth,
                        l = a.toplostdate,
                        m = a.toplostplace,
                        n = a.toplostdesc,
                        o = a.toplink,
                        p = b.$each,
                        q = a.otherdata,
                        r = (a.otheritem, a.index, "");
                    return r += '<div class="mod_404"> <div class="wrapper" id="mainWrap"> <div class="mod_hd"> <h1 class="title"><span class="title_inner">404,您访问的页面找不回来了,但我们可以一起帮他们回家!</span></h1> <div class="desc"><a href="',
                        r += c(d), r += '" class="desc_link">', r += c(e), r += '</a></div> </div> <div class="mod_bd"> <div class="child_box"> <div class="mod_404_child child_in" data-id="', r += c(f), r += '" id="top_', r += c(f), r += '"> <div class="child_main cf"> <div class="child_avatar"><img src="', r += c(g), r += '" onload="imagezoom(this, 160, 216);" style="opacity:0"></div> <div class="child_info"> <div class="info_name"> <h2><span class="name_inner">', r += c(h), r += '</span><span class="info_sex">(', r += c(i), r += ')</span></h2> </div> <div class="info_item info_birth"><span class="info_lbl">出生日期:</span><span class="item_inner">',
                        r += c(j), r += '</span></div> <div class="info_item info_time"><span class="info_lbl">失踪时间:</span><span class="item_inner">', r += c(l), r += '</span></div> <div class="info_item info_address"><span class="info_lbl">失踪地点:</span><span class="item_inner">', r += c(m), r += '</span></div> <div class="info_item info_desc"><span class="info_lbl">失踪人特征描述:</span><span class="item_inner">', r += c(n), r += '</span></div> <a href="', r += c(o),
                        r += '" class="link_view" title="查看详情"><span class="link_inner">查看详情</span></a> </div> </div> <div class="child_bottom cf"> <div class="bottom_logo"> <ul class="logo_list"> <li><a href="http://e.t.qq.com/Tencent-Volunteers" title="腾讯志愿者"><img src="http://qzone.qq.com/gy/404/style/image/logo_tencentvolunteers.png"></a></li> <li><a href="http://bbs.baobeihuijia.com/forum.php" title="宝贝回家"><img src="http://qzone.qq.com/gy/404/style/image/logo_baobeihuijia.png"></a></li> </ul> </div> <div class="bottom_right"> <div class="mod_share" onmouseover="this.className += \' mod_share_hover\';" onmouseout="this.className = this.className.replace(\' mod_share_hover\',\'\')"> <span class="share_inner">分享</span> <ul class="share_list"> <li><a href="javascript:void(0);" class="share_link" onclick="share(\'weibo\');return false;" title="腾讯微博"><span class="link_inner">腾讯微博</span><i class="ico_tencentweibo"></i></a></li> <li><a href="javascript:void(0);" class="share_link" onclick="share(\'qzone\');return false;" title="QQ空间"><span class="link_inner">QQ空间</span><i class="ico_qzone"></i></a></li> <li><a href="javascript:void(0);" class="share_link" onclick="share(\'sina\');return false;" title="新浪微博"><span class="link_inner">新浪微博</span><i class="ico_sinaweibo"></i></a></li> <li><a href="javascript:void(0);" class="share_link" onclick="share(\'weixin\');return false;" title="微信"><span class="link_inner">微信</span><i class="ico_weixin"></i></a></li> </ul> <span style="clear: both;"></span> </div> </div> </div> </div> <i class="ico_corner"></i> </div> </div> <div class="mod_fd"> <div class="mod_404_children"> <ul class="children_list"> ',
                        p(q, function(a) {
                            r += ' <li class="', r += c(f == a._id ? "current" : ""), r += '"><a href="javascript:;" onclick="toThis(\'', r += c(a._id), r += '\');" title="', r += c(a.name), r += '" ><img src="', r += c(a.child_pic), r += '"></a></li> '
                        }), r += " </ul> </div> </div> </div> </div>", new k(r)
                })
        }();
    </script>


  </head>
  <body>
    <!--body is here
        当 IE 认为这个404页面是不友好的,就不会跳转,所有下面的 404 默认提示
    -->
<h1 style="font-size:30px;">
404
</h1>



  </body>
</html>

@ivan-nginx
Copy link
Collaborator

@LeonXtp dont understand u, write in English if not solved. If solved, close it please. Thank's!

@LeonXtp LeonXtp closed this as completed Aug 1, 2017
larrylizhao pushed a commit to larrylizhao/hexo-theme-next that referenced this issue Sep 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants