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
| var mainListe = document.getElementsByClassName('ant-table-tbody')[0].children; | |
| var harvestedTunes = []; | |
| for(i = 0; i < mainListe.length ; i++){ | |
| let currentSong = mainListe[i]; | |
| let albumAndArtist = currentSong.children[0].innerText.split('\n'); | |
| let tune = currentSong.children[1].innerText.split('\n'); | |
| let duration = currentSong.children[2].innerText.split('\n'); | |
| harvestedTunes.push([albumAndArtist[0], albumAndArtist[2], tune[0], duration[0]]); | |
| } |
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
| var waitForContentSeconds = 10; | |
| var bottomTrials = 0; | |
| var pageHeight = 0; | |
| function grabYoutubeList() { | |
| var AllNodes = [...document.getElementsByTagName('ytmusic-shelf-renderer')[0].getElementsByTagName('ytmusic-responsive-list-item-renderer')]; | |
| AllNodes.shift(); // remove first "blend" element | |
| var harvestedTunes = AllNodes.map(t => { | |
| var items = [...t.children[3].getElementsByTagName('yt-formatted-string')].map(n => n.getAttribute('title').replace(/"/g,'”')); | |
| return `"${items[0]}", "${items[1]}", "${items[2]}"<br>\n`; | |
| }); |
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
| Number.prototype.minDigits = function (d) { | |
| if ('number' !== typeof d) { | |
| return this.toString(); | |
| } | |
| var s = this.toString().split('.'); | |
| while (s[0].length < d) { | |
| s[0] = '0' + s[0]; | |
| } | |
| return s[0] + (s[1] ? '.' + s[1] : ''); | |
| } |
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
| (function (window) { | |
| var transitions = { | |
| 'transition': 'transitionend', | |
| 'WebkitTransition': 'webkitTransitionEnd', | |
| 'MozTransition': 'transitionend', | |
| 'OTransition': 'otransitionend' | |
| }, | |
| elem = document.createElement('div'); | |
| for(var t in transitions){ |