Greasy Fork

Greasy Fork is available in English.

[timerd] 音乐解析 网易、QQ、酷狗(新增)、 没有广告!!!(定期更新增加新的解析网站)(2019-07-02)更新

音乐解析 网易、QQ音乐解析 欢迎收听!

当前为 2019-07-02 提交的版本,查看 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         [timerd] 音乐解析 网易、QQ、酷狗(新增)、 没有广告!!!(定期更新增加新的解析网站)(2019-07-02)更新
// @namespace    http://timerd.ml
// @version      0.0.3
// @description  音乐解析 网易、QQ音乐解析 欢迎收听!
// @author       timerd
// @include      *://music.163.com/*song*
// @include      *://y.qq.com/*/song/*
// @include      *://*.kugou.com/*
// @require      http://cdn.bootcss.com/jquery/1.8.3/jquery.min.js
// @icon         http://timerd.me/favicon.ico
// @run-at       document-end
// @grant        unsafeWindow
// @license      MIT2.0
// ==/UserScript==


(function () {

    'use strict';
    function addInfrastructure() {
        let style = document.createElement("style");
      
        style.appendChild(document.createTextNode(`
              #mywidget a {
              position: absolute;
              left: -75px;
              transition: 0.3s;
              padding: 15px 30px 15px 15px; 
              text-decoration: none;
              color: white!important;
              border-radius: 0 8px 8px 0;
              font: 20px "Microsoft YaHei",SimHei,helvetica,arial,verdana,tahoma,sans-serif;
              min-width: 80px;
              text-align:right;
              white-space:nowrap;             
            }


            #mywidget a:hover {
                left: 0;
             }    
   
             #vparse {
               background-color: #f44336;
             }

             #myplaybutton {
                 position:absolute; 
                 right:-8px;
                 top: 14px; 
                 width:0px;
                 height:0px;
                 margin:0px;
                 border-width: 16px;
                 border-style: solid;
                 border-color:transparent transparent transparent white;
             }

             #mywidget a img {
             width: 28px;
             height:34px;
             position: absolute;
             top:12px;
             right: 5px;
             align-items: center;
       }`));        

        document.head.appendChild(style);
    }


    let playurl = window.location.href;
    let rArray = playurl.split('?');
    let cWeb = rArray[0];
 

    const musicSites = new Array();
    musicSites[0]=/163(.*)song/i;
    musicSites[1]=/QQ(.*)song/i;
   
    musicSites.every((item) => {
        if (item.test(cWeb)) {
            addInfrastructure();
            var jumpButton = $(`
            <div id="mywidget" href='javascript:void(0)' target='_blank' style="z-index:9999; position:fixed;left:0px;top:280px;">    
                <a href="#" id="vparse">❀音乐解析<div id="myplaybutton"></div></a>
            </div>
            `);
           
            $("body").append(jumpButton);
    
            // bind onclick event
            $("#mywidget").click(function () {
                var openUrl = window.location.href;
                window.open('https://chinese-elements.com/static/m.html?zxm=' + encodeURIComponent(openUrl));
            });
            return false;
        }
        return true;
    });
})()