Last active
October 14, 2022 08:38
-
-
Save pegvin/f7bb575acf4981a35497c5f0ef114355 to your computer and use it in GitHub Desktop.
Download Sounds From Freesound.org Without Login
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Freesound.org download without login (direct link, no login) | |
// @namespace https://greasyfork.org/users/200700 | |
// @version 1.0.0 | |
// @description Download from freesound.org without login; freesound no login | |
// @author SuperOP535 | |
// @match *://freesound.org/people/*/sounds/* | |
// @grant none | |
// @run_at document-load | |
// @source https://greasyfork.org/en/scripts/380743-freesound-org-download-without-login-direct-link-no-login | |
// ==/UserScript== | |
(function() { | |
var ogg = document.getElementsByClassName('ogg_file')[0].href; | |
var mp3 = document.getElementsByClassName('mp3_file')[0].href; | |
var logdl = document.getElementById('download_login_button'); | |
if(logdl) { | |
var filename = logdl.href.split('/').pop().split('.'); filename.pop(); filename = filename.join('.'); | |
var dl = document.getElementById('download'); | |
dl.removeChild(logdl); | |
var MP3 = document.createElement('a'); | |
MP3.innerText = 'Download MP3'; | |
MP3.download = filename + '.mp3'; | |
MP3.href = mp3; | |
MP3.style.float = 'right'; | |
dl.appendChild(MP3); | |
var OGG = document.createElement('a'); | |
OGG.innerText = 'Download OGG'; | |
OGG.download = filename + '.ogg'; | |
OGG.href = ogg; | |
dl.appendChild(OGG); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment