Greasy Fork

Greasy Fork is available in English.

cnBeta移动版跳转到电脑板

从cnbeta的移动版网页跳转到电脑版网页

当前为 2018-01-25 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         cnBeta移动版跳转到电脑板
// @namespace    http://greasyfork.icu/zh-CN/scripts/23158-cnbeta移动版跳转到电脑板/
// @version      0.1
// @description  从cnbeta的移动版网页跳转到电脑版网页
// @author       张明浩
// @match        http://m.cnbeta.com/view/*
// @require        http://libs.baidu.com/jquery/2.1.1/jquery.js
// ==/UserScript==

(function() {


    //修改底部链接
    $(".footer_version").empty();
    $(".footer_version").append("<a href='/mobile/wap'>文字版</a><a class='cur'>触屏版</a>");
    var url = window.location.href;
    var txt1=url.substring(25);
    var txt2 = "<a href='http://www.cnbeta.com/articles/"+txt1+"' >电脑端</a>";
    $(".footer_version").append(txt2);

    //修改浮动按钮
    $(".footer_top").empty();
    var txt3 = "<a class='j_backTop gotop' href='http://www.cnbeta.com/articles/"+txt1+"' >电脑端</a>";
    $(".footer_top").append(txt3);


})();