Greasy Fork

来自缓存

Greasy Fork is available in English.

中国原创音乐基地免登陆下载

中国原创音乐基地免登陆下载,去除原来点击下载需要登录,鼠标移动到下载按钮处,右键新建标签打开就行。

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name        中国原创音乐基地免登陆下载
// @namespace    https://zhang18.top
// @version      0.1
// @description  中国原创音乐基地免登陆下载,去除原来点击下载需要登录,鼠标移动到下载按钮处,右键新建标签打开就行。
// @author       ZLOE
// @match        http://5sing.kugou.com/yc/*.html
// @grant        GM_xmlhttpRequest
// @require https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js
// 作者博客:https://zhang18.top
// ==/UserScript==

(function() {
    'use strict';
    //获取音乐,单首播放的页面
    function get_music(){
        var id = window.location.href.split('/')[4].split(".")[0]
        try{
        var url = 'http://service.5sing.kugou.com/song/getsongurl?&songid='+id+'&songtype=yc'
        GM_xmlhttpRequest({
            method: "GET",
            url: url,
            onload: function(res) {
                if (res.status == 200) {
                    var text = res.responseText;
                    var a = jQuery.parseJSON(text)
                    var music_url = a.data.squrl
                    console.log(music_url)
                     $('.action_down').after('<a href="'+music_url+'" id="func_Down" class="action_down" target="_blank">下载</a>')
                     $('.action_down').eq(0).remove()

                }
            }
        });
        }catch (erro){
            var urls = 'http://service.5sing.kugou.com/song/getsongurl?&songid='+id+'&songtype=fc'
            GM_xmlhttpRequest({
                method: "GET",
                url: urls,
                onload: function(res) {
                    if (res.status == 200) {
                        var text = res.responseText;
                        var a = jQuery.parseJSON(text)
                        var music_url = a.data.squrl
                        console.log(music_url)
                        $('.action_down').after('<a href="'+music_url+'" id="func_Down" class="action_down" target="_blank">下载</a>')
                        $('.action_down').eq(0).remove()
                    }
                }
        });
        }
    }
    //主控制程序
    get_music()

    // Your code here...
})();