SampleFocus Downloader

Download unlimited samples from SampleFocus

Version vom 22.03.2024. Aktuellste Version

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

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

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

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

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

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         SampleFocus Downloader
// @namespace    http://tampermonkey.net/
// @version      0.1.1
// @description  Download unlimited samples from SampleFocus
// @author       JJTV
// @match        https://samplefocus.com/**
// @icon         https://i.imgur.com/WedmtXe.png
// ==/UserScript==

function removeAllClickEventListeners(elementId) {
    var oldElement = document.getElementById(elementId);
    var newElement = oldElement.cloneNode(true);

    var div = document.createElement('a');
    div.href=oldElement.href;
    div.innerText = "DL";
    div.target = '_blank';

    oldElement.parentNode.replaceChild(div, oldElement);
}

(function() {
    'use strict';

    document.onscroll = () => {
        const sample_cards = [...document.getElementsByClassName("sample-card")];
        sample_cards.forEach((card, idx) => {
            const card_url = card.getElementsByTagName("audio")[0].src
            const download_btn = card.getElementsByClassName("download-sample-link")[0]
            if (!download_btn){
                return;
            }
            download_btn.href = card_url
            download_btn.style.backgroundColor = "green";
            download_btn.id = "ses" + idx;
            removeAllClickEventListeners("ses"+idx);
            console.log("Edited DL Link");
        })
    }
})();