Sleazy Fork is available in English.

Soundgasm - Window Title Replacer

set window title to current audio

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name         Soundgasm - Window Title Replacer
// @namespace    http://tampermonkey.net/
// @version      2026-06-04
// @description  set window title to current audio
// @author       GlawGlack
// @match        https://*.soundgasm.net/u/*/*
// @grant        none
// @license      unlicense
// ==/UserScript==

const swapDesc = false; // Change to true to swap username and title around

(function() {
	'use strict';

	// Select the node that will be observed for mutations
	const targetNode = document;

	// Options for the observer (which mutations to observe)
	const config = { attributes: true, childList: true, subtree: true };

	// Callback function to execute when mutations are observed
	const callback = function(mutationsList, observer) {
		titleFinder();
	};

	// Create an observer instance linked to the callback function
	const observer = new MutationObserver(titleFinder);

	// Start observing the target node for configured mutations
	observer.observe(targetNode, config);
})();

const splitStr = location.toString().split(".net/u/")[1].split("/")[0];
function titleFinder(mutationsList,observer){
	document.querySelectorAll('[class="jp-title"]').forEach((titleLabel) => {
		if ( !titleLabel || titleLabel.blur === "true") { return; }

		if (!swapDesc){
			if (document.title != splitStr + " - " + titleLabel.innerText + " - soundgasm.net")
			{
				document.title = splitStr + " - " + titleLabel.innerText + " - soundgasm.net";
				return;
			}
		}else{
			if (document.title != titleLabel.innerText + " - " + splitStr + " - soundgasm.net")
			{
				document.title = titleLabel.innerText + " - " + splitStr + " - soundgasm.net";
				return;
			}
		}
		titleLabel.blur = "true";
		return;
	})
}