Yun Pan WAP Redirect

重定向百度云盘的 WAP 页面到普通页面

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         Yun Pan WAP Redirect
// @description  重定向百度云盘的 WAP 页面到普通页面
// @author       wenLiangcan
// @version      0.3
// @namespace    https://github.com/wenLiangcan
// @homepage     https://github.com/wenLiangcan/Userscripts
// @license      GPL version 3 (http://www.gnu.org/licenses/gpl.txt)
// @copyright    Copyright © 2014-2016 wenLiangcan
// @updateURL
// @downloadURL
// @include      http://*
// @include      https://*
// @run-at       document-end
// @grant        none
// ==/UserScript==

(function() {
    if (/^http:\/\/(pan|yun)\.baidu\.com\/wap\/link\?.*?$/.test(document.URL)) {
        window.location.href = document.URL.replace('wap', 'share');
    }
    else if (/^http:\/\/pan\.baidu\.com\/wap\/share\/.*?$/.test(document.URL)) {
        window.location.href = document.URL.replace('wap/', '');
    }
    else if (/^http:\/\/pan\.baidu\.com\/wap\/album\/.*?$/.test(document.URL)) {
        window.location.href = document.URL.replace('wap', 'pcloud');
    }
})();