PSSTAudio.com Downloader

This is a simple script that shows you a direct link to audio file that you want to download.

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name        PSSTAudio.com Downloader
// @description This is a simple script that shows you a direct link to audio file that you want to download.
// @license     Creative Commons Zero v1.0 Universal
// @supportURL  https://github.com/q2p/PSSTAudio-Link-Exporter
// @author      q2p
// @namespace   q2p
// @version     0.4
// @include     https://psstaudio.com/post/*
// @include     https://www.psstaudio.com/post/*
// @grant       none
// @run-at      document-end
// ==/UserScript==

(function() {
	'use strict';
	const page_content = document.getElementsByClassName("page-content")[0];
	const card_body = page_content.getElementsByClassName("card-body")[0];
	const title = card_body.getElementsByClassName("card-title")[0].textContent;
	const description = card_body.getElementsByClassName("card-text")[0].textContent;
	const audio = card_body.getElementsByTagName("audio")[0];
	const audio_src = audio.firstElementChild.src;

	const link_container = document.createElement("div");
	const link = document.createElement("a");
	link.href = audio_src;
	link.download = title+" "+description+".mp3";
	link.textContent = "Download Link";
	link_container.appendChild(link);
	card_body.appendChild(link_container);
})();