This file contains 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
1. Copy/Paste the information below to the clipboard | |
2. Open the spreadsheet whose sheets need to be alphabetised | |
3. Choose Tools > Script editor > Blank (this opens a new tab in the browser) | |
4. Press Control+A followed by Control+V copy and paste the script in | |
5. Press Control+S to save the script | |
6. Choose Run > sortSheets | |
7. Go back to the spreadsheet tab to view the new sorted tab order | |
--Copy everything below this line-- | |
function sortSheets () { |
This file contains 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
// exports playlist to text format, when run on beatport playlist sites | |
let playlist = '' | |
document.querySelectorAll('li.track').forEach(li => { | |
let title = li.querySelector('.buk-track-primary-title').textContent.replace(/\s+/g, ' ').trim() | |
let mix = li.querySelector('.buk-track-remixed').textContent.replace(/\s+/g, ' ').trim() | |
let artist = li.querySelector('.buk-track-artists').textContent.replace(/\s+/g, ' ').trim() | |
if (mix === 'Original Mix') { | |
playlist += `${artist} - ${title}\n` | |
} else { | |
playlist += `${artist} - ${title} (${mix})\n` |