11// ==UserScript==
2- // @name Spotifuck v6
2+ // @name Spotifuck Userscript
33// @namespace https://github.com/Myst1cX/spotifuck-userscript
4- // @version 6.3
4+ // @version 6.4
55// @description Full Spotifuck 1.6.4 UI hack (with minor tweaks) + playback control + silent ad blocking port on open.spotify.com
66// @author Myst1cX (adapted from Spotifuck app)
77// @match https://open.spotify.com/*
2323 * - Auto-close library on item selection
2424 * - UI improvements (sidebar, search bar, playback controls)
2525 * - Video ad detection and blocking
26+ * - Silent audio ad blocking (from v5)
2627 * - CSS hacks for better mobile experience
2728 */
2829
2930( function ( ) {
3031 'use strict' ;
3132
32- console . log ( '🎵 Spotifuck v6 - APK v1.6.4 Port' ) ;
33+ console . log ( '🎵 Spotifuck v6.4 - APK v1.6.4 Port' ) ;
3334
3435 // Global state variables
3536 let ulFlag = false ; // Unlock flag
@@ -390,6 +391,27 @@ aside[data-testid=now-playing-bar]{background:#000!important;box-shadow:none;bor
390391 console . log ( '#CSS Injected' ) ;
391392 }
392393
394+ /**
395+ * silentAudioAdBlocker - Intercept fetch() to block audio ads
396+ * Ported from v5 for silent audio ad blocking functionality
397+ */
398+ ( function silentAudioAdBlocker ( ) {
399+ const originalFetch = window . fetch ;
400+ const silentAudioBlob = new Blob ( [ new Uint8Array ( 44 ) ] , { type : 'audio/wav' } ) ;
401+ window . fetch = function ( resource , init ) {
402+ const url = ( typeof resource === 'string' ) ? resource : resource . url ;
403+ if ( url && url . includes ( 'audio/mpeg' ) ) {
404+ console . log ( '[Spotifuck] Blocking audio ad:' , url ) ;
405+ return Promise . resolve ( new Response ( silentAudioBlob , {
406+ status : 200 ,
407+ statusText : 'OK' ,
408+ headers : { 'Content-Type' : 'audio/wav' }
409+ } ) ) ;
410+ }
411+ return originalFetch . apply ( this , arguments ) ;
412+ } ;
413+ } ) ( ) ;
414+
393415 // Initialize immediately
394416 injectCSS ( ) ;
395417 firstFuck ( ) ;
@@ -403,5 +425,5 @@ aside[data-testid=now-playing-bar]{background:#000!important;box-shadow:none;bor
403425 console . log ( '#Cleanup: Interval cleared' ) ;
404426 } ) ;
405427
406- console . log ( '🚀 Spotifuck v6 Ready (APK v1.6.4 Port) ' ) ;
428+ console . log ( '🚀 Spotifuck Userscript v6.4 Initialized ' ) ;
407429} ) ( ) ;
0 commit comments