/** * // ==UserScript== * // @name 一键VIP视频解析、去广告(全网),一站式音乐搜索下载,百度云离线跳转,获取B站封面,淘宝京东优惠券 2020-02-04 更新,报错请及时反馈 * // @namespace http://www.wandhi.com/ * // @version 4.0.0 * // @homepage https://www.wandhi.com/post-647.html * // @supportURL https://www.wandhi.com/post-647.html * // @description 在视频播放页悬浮VIP按钮,可在线播放vip视频;支持优酷vip,腾讯vip,爱奇艺vip,芒果vip,乐视vip等常用视频...一站式音乐搜索解决方案,网易云音乐,QQ音乐,酷狗音乐,酷我音乐,虾米音乐,百度音乐,蜻蜓FM,荔枝FM,喜马拉雅,集成优惠券查询按钮 * // @author MaxZhang * // @icon http://www.wandhi.com//favicon.ico * // @include *://m.youku.com/v* * // @include *://m.youku.com/a* * // @include *://v.youku.com/v_* * // @include *://*.iqiyi.com/v_* * // @include *://*.iqiyi.com/w_* * // @include *://*.iqiyi.com/a_* * // @include *://*.iqiyi.com/adv* * // @include *://*.le.com/ptv/vplay/* * // @include *v.qq.com/x/cover/* * // @include *v.qq.com/x/page/* * // @include *v.qq.com/play* * // @include *v.qq.com/cover* * // @include *://*.tudou.com/listplay/* * // @include *://*.tudou.com/albumplay/* * // @include *://*.tudou.com/programs/view/* * // @include *://*.tudou.com/v* * // @include *://*.mgtv.com/b/* * // @include *://film.sohu.com/album/* * // @include *://tv.sohu.com/v/* * // @include *://*.acfun.cn/v/* * // @include *://*.bilibili.com/video/* * // @include *://*.bilibili.com/anime/* * // @include *://*.bilibili.com/bangumi/play/* * // @include *://*.pptv.com/show/* * // @include *://*.baofeng.com/play/* * // @include *://*.wasu.cn/Play/show* * // @include *://v.yinyuetai.com/video/* * // @include *://v.yinyuetai.com/playlist/* * // @include *://*.wasu.cn/Play/show/* * // @include *://music.taihe.com/song* * // @include *://item.taobao.com/* * // @include *://detail.tmall.com/* * // @include *://detail.tmall.hk/* * // @include *://item.jd.com/* * // @include *://music.163.com/song* * // @include *://music.163.com/m/song* * // @include *://y.qq.com/* * // @include *://*.kugou.com/* * // @include *://*.kuwo.cn/* * // @include *://*.xiami.com/* * // @include *://music.taihe.com/* * // @include *://*.1ting.com/player* * // @include *://www.qingting.fm/* * // @include *://www.lizhi.fm/* * // @include *://music.migu.cn/* * // @include *://www.shangxueba.com/ask/*.html * // @include *://www.ximalaya.com/* * // @include *://www.shangxueba.com/ask/*.html * // @include *://pan.baidu.com/disk/home* * // @include *://yun.baidu.com/disk/home* * // @include *://pan.baidu.com/s/* * // @include *://yun.baidu.com/s/* * // @include *://pan.baidu.com/share/link* * // @include *://yun.baidu.com/share/link* * // @exclude *://*.wandhi.com/* * // @require https://cdn.staticfile.org/jquery/1.12.4/jquery.min.js * // @require https://greasyfork.org/scripts/373336-layer-wandhi/code/layer_wandhi.js?version=637587 * // @require https://cdn.bootcss.com/sweetalert/2.1.2/sweetalert.min.js * // @license GPL License * // @grant GM_setClipboard * // @run-at document-end * // @connect shangxueba365.com * // @grant unsafeWindow * // @grant GM_xmlhttpRequest * // @grant GM_info * // @grant GM.getValue * // @grant GM.setValue * // @grant GM_getValue * // @grant GM_setValue * // @grant GM_notification * // @grant GM_openInTab * // @grant GM_deleteValue * // @grant GM_registerMenuCommand * // @grant GM_unregisterMenuCommand // @downloadURL none * // ==/UserScript== */ (function () { 'use strict'; /*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ /* global Reflect, Promise */ var extendStatics = function(d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); }; function __extends(d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); } var Http = (function () { function Http() { } Http.prototype.ajax = function (request) { GM_xmlhttpRequest(request); }; return Http; }()); var Core = (function () { function Core() { this.head = document.getElementsByTagName('head')[0]; this.topUrl = top.window.location.href; this.url = this.currentUrl(); this.http = new Http(); } Core.prototype.getPar = function (option, url) { if (url === void 0) { url = window.location.search; } var v = url.match(new RegExp("[\?\&]" + option + "=([^\&]+)", "i")); return v == null || v.length < 1 ? "" : v[1]; }; Core.prototype.appendCss = function (url) { var linkCSS = document.createElement("link"); linkCSS.type = "text/css"; linkCSS.rel = "stylesheet"; linkCSS.href = url; this.head.appendChild(linkCSS); }; Core.prototype.accpendCssContent = function (content) { var Style = document.createElement("style"); Style.innerHTML = content; this.head.appendChild(Style); }; Core.prototype.bodyAppendCss = function (url) { $('body').append($('')); }; Core.prototype.bodyAppend = function (html) { $("body").append(html); }; Core.prototype.appendJs = function (url) { var linkScript = document.createElement("script"); linkScript.type = "text/" + ("javascript"); linkScript.src = url; this.head.appendChild(linkScript); }; Core.prototype.bodyAppendJs = function (url) { $('body').append($('')); }; Core.prototype.currentUrl = function () { return window.location.href; }; Core.prototype.Msg = function (msg) { return layer.msg(msg, { icon: 5 }); }; Core.prototype.showContent = function (title, content) { return layer.open({ type: 1, title: title, shade: 0, content: content }); }; Core.prototype.close = function (obj) { layer.close(obj); }; Core.prototype.closeAll = function () { layer.closeAll(); }; return Core; }()); var PluginBase = (function () { function PluginBase() { this.core = new Core(); this.apiRoot = "https://api.wandhi.com/api"; } PluginBase.prototype.linkTest = function (url) { var _this = this; if (!url) { url = this.core.currentUrl(); } var flag = false; this.rules.forEach(function (v, k) { if (v.test(url)) { flag = true; _this.site = k; return false; } return true; }); return flag; }; PluginBase.prototype.Process = function () { this.loader(); this.run(); }; PluginBase.prototype.getData = function (url, callback) { $.getJSON(url, function (d) { callback(d); }); }; PluginBase.prototype.queryData = function (request) { this.core.http.ajax(request); }; return PluginBase; }()); var SiteEnum; (function (SiteEnum) { SiteEnum[SiteEnum["TaoBao"] = 0] = "TaoBao"; SiteEnum[SiteEnum["TMall"] = 1] = "TMall"; SiteEnum[SiteEnum["JingDong"] = 2] = "JingDong"; SiteEnum[SiteEnum["IQiYi"] = 3] = "IQiYi"; SiteEnum[SiteEnum["YouKu"] = 4] = "YouKu"; SiteEnum[SiteEnum["LeShi"] = 5] = "LeShi"; SiteEnum[SiteEnum["TuDou"] = 6] = "TuDou"; SiteEnum[SiteEnum["Tencent_V"] = 7] = "Tencent_V"; SiteEnum[SiteEnum["MangGuo"] = 8] = "MangGuo"; SiteEnum[SiteEnum["SoHu"] = 9] = "SoHu"; SiteEnum[SiteEnum["Acfun"] = 10] = "Acfun"; SiteEnum[SiteEnum["BiliBili"] = 11] = "BiliBili"; SiteEnum[SiteEnum["M1905"] = 12] = "M1905"; SiteEnum[SiteEnum["PPTV"] = 13] = "PPTV"; SiteEnum[SiteEnum["YinYueTai"] = 14] = "YinYueTai"; SiteEnum[SiteEnum["WangYi"] = 15] = "WangYi"; SiteEnum[SiteEnum["Tencent_M"] = 16] = "Tencent_M"; SiteEnum[SiteEnum["KuGou"] = 17] = "KuGou"; SiteEnum[SiteEnum["KuWo"] = 18] = "KuWo"; SiteEnum[SiteEnum["XiaMi"] = 19] = "XiaMi"; SiteEnum[SiteEnum["TaiHe"] = 20] = "TaiHe"; SiteEnum[SiteEnum["QingTing"] = 21] = "QingTing"; SiteEnum[SiteEnum["LiZhi"] = 22] = "LiZhi"; SiteEnum[SiteEnum["MiGu"] = 23] = "MiGu"; SiteEnum[SiteEnum["XiMaLaYa"] = 24] = "XiMaLaYa"; })(SiteEnum || (SiteEnum = {})); var Common; (function (Common) { var Menu = (function () { function Menu() { this.core = new Core(); this.site = /tv.wandhi.com/i; this.userAgent = navigator.userAgent; this.menusClass = ['first', 'second', 'third', 'fourth', 'fifth']; this.menuSelecter = "#Wandhi-nav"; } Menu.prototype.loader = function () { this.core.appendCss("//cdn.wandhi.com/style/tv/asidenav.css"); }; Menu.prototype.getBody = function (option) { return "
"; }; Menu.prototype.Init = function (menus, callback) { var _this = this; if (this.site.test(this.core.topUrl)) { return; } this.loader(); var str = ""; menus.forEach(function (element, index) { str += "" + element.show + ""; }); this.core.bodyAppend(this.getBody(str)); /Safari|iPhone/i.test(this.userAgent) && /chrome/i.test(this.userAgent) && $("#Wandhi-nav").addClass("no-filter"); var drags = { down: !1, x: 0, y: 0, winWid: 0, winHei: 0, clientX: 0, clientY: 0 }; var asideNav = $(this.menuSelecter)[0]; $("body").on("mousedown", "#Wandhi-nav", function (a) { var getCss = function (a, e) { return a.currentStyle ? a.currentStyle[e] : document.defaultView.getComputedStyle(a, !1)[e]; }; drags.down = !0, drags.clientX = a.clientX, drags.clientY = a.clientY, drags.x = parseInt(getCss(this, "left")), drags.y = parseInt(getCss(this, "top")), drags.winHei = $(window).height(), drags.winWid = $(window).width(), $(document).on("mousemove", function (a) { var e = a.clientX - drags.clientX, t = a.clientY - drags.clientY; asideNav = asideNav || $("#Wandhi-nav")[0]; asideNav.style.top = drags.y + t + "px"; asideNav.style.left = drags.x + e + "px"; }); }).on("mouseup", "#Wandhi-nav", function () { drags.down = !1, $(document).off("mousemove"); }); callback.call(this); }; return Menu; }()); Common.Menu = Menu; })(Common || (Common = {})); var MusicService = (function (_super) { __extends(MusicService, _super); function MusicService() { var _this = _super.call(this) || this; _this.rules = new Map([ [SiteEnum.WangYi, /163(.*)song/i], [SiteEnum.Tencent_M, /y.QQ(.*)song/i], [SiteEnum.KuGou, /kugou(.*)song/i], [SiteEnum.KuWo, /kuwo(.*)yinyue/i], [SiteEnum.XiaMi, /xiami/i], [SiteEnum.TaiHe, /taihe.com/i], [SiteEnum.QingTing, /qingting/i], [SiteEnum.LiZhi, /lizhi/i], [SiteEnum.MiGu, /migu/i], [SiteEnum.XiMaLaYa, /ximalaya/i], ]); _this.menu = new Common.Menu(); return _this; } MusicService.prototype.loader = function () { this.core.appendCss("//lib.baomitu.com/layer/3.1.1/theme/default/layer.css"); }; MusicService.prototype.run = function () { this.menu.Init([ { title: "\u7535\u5F71\u641C\u7D22", show: "\u7535\u5F71\u4F18\u60E0\u5238 | \u5238\u540E | \u6709 \u6548 \u671F | \u64CD\u4F5C |
---|---|---|---|
\u6B63\u5728\u67E5\u8BE2\u4F18\u60E0\u4FE1\u606F\uFF0C\u8BF7\u7A0D\u5019... |