ROBLOX Soundloader

Download songs from ROBLOX!

目前為 2015-06-07 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         ROBLOX Soundloader
// @namespace    RBLXSNDLDR
// @version      1.1.1
// @description  Download songs from ROBLOX!
// @author       SFOH
// @match        http://www.roblox.com/*
// @grant        none
// ==/UserScript==

function createDownloadBtn(pElement,type,uri){ //where pElement is the frame to add the button to
    if(type==="audio"){
        var b = document.createElement("input");
        console.log(pElement);
        b.setAttribute("class","downloadButton");
        b.setAttribute("type","image");
        b.setAttribute("style","background:url(http://vavvi.com/images/2015/06/ncrr1l5xcu0qbyvwwzye.png) 0px 0px;border:0;margin:0;padding:0;cursor:pointer;color:transparent;position:relative;background-repeat:no-repeat;width:25px;height:25px;left:-25px;top:-25px;z-index:9");
        b.setAttribute("href",uri);
        b.setAttribute("download","");
        b.onmouseenter=function(){
            b.setAttribute("style","background:url(http://vavvi.com/images/2015/06/ncrr1l5xcu0qbyvwwzye.png) -25px 0px;border:0;margin:0;padding:0;cursor:pointer;color:transparent;position:relative;background-repeat:no-repeat;width:25px;height:25px;left:-25px;top:-25px;z-index:9")
        }
        b.onmouseleave=function(){
            b.setAttribute("style","background:url(http://vavvi.com/images/2015/06/ncrr1l5xcu0qbyvwwzye.png) 0px 0px;border:0;margin:0;padding:0;cursor:pointer;color:transparent;position:relative;background-repeat:no-repeat;width:25px;height:25px;left:-25px;top:-25px;z-index:9")
        }
        pElement.appendChild(b);
    }
}

function assetPuller(){
    if(this.document.title.indexOf("by")){ //if the url specifies an asset
        if(this.document.title.indexOf("Audio") != -1){ //if the asset is a sound then
            var objects = document.getElementsByClassName("MediaPlayerIcon Play");
            for	(var i = 0;i < objects.length;i++){
                var playbutton = objects[i];
                var parent = playbutton.parentElement;
                var asseturi = playbutton.getAttribute("data-mediathumb-url");
                createDownloadBtn(parent,"audio",asseturi);
            }
        }
    }
}

assetPuller()