Created
August 5, 2023 21:57
-
-
Save H3wastooshort/d8aed2cef07e912cd327c54d9946121e to your computer and use it in GitHub Desktop.
show usernames on the MS93 music page. made this on 18.9.2021
This file contains hidden or 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 MS93 Music Filename Shower | |
// @version 0.3 | |
// @description Shows the MP3s filename on the MS93 music.php page. | |
// @author hacker3000.cf | |
// @match https://myspace*/music.php | |
// @match https://myspace.windows93.net/music.php | |
// @match https://myspace93a.osyu.sh/music.php | |
// @match https://myspace-a.ziad87.net/music.php | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
var checkExist = setInterval(function() { | |
if (document.querySelector('#player')) { | |
//document.querySelector('#nb').addEventListener('click', window.updateName, false); | |
document.querySelector('#player').addEventListener('durationchange', updateNameNow, false); | |
clearInterval(checkExist); | |
} | |
}, 500); | |
})(); | |
window.updateName = function () { | |
var fnt = document.querySelector('#fileName'); | |
if (fnt) { | |
fnt.parentNode.removeChild(fnt); | |
} | |
var newHTML = document.createElement ('div'); | |
newHTML.innerHTML = '<div id="fileName"> <b>Song Title:</b> <span>PLEASE WAIT...</span></div>'; | |
document.querySelector('.songName').appendChild(newHTML); | |
setTimeout(function() { | |
updateNameNow(); | |
}, 2000); | |
} | |
function updateNameNow() { | |
var filename = document.querySelector('#downloader').getAttribute('download'); | |
console.log(filename); | |
var fnt = document.querySelector('#fileName'); | |
if (fnt) { | |
fnt.parentNode.removeChild(fnt); | |
} | |
var newHTML = document.createElement ('div'); | |
newHTML.innerHTML = '<div id="fileName"> <b>Song Title:</b> <span>'.concat(filename ,'<span></div>'); | |
document.querySelector('.songName').appendChild(newHTML); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment