~/.eth0/ 

This is my code. There is a lot like it, but this is mine.

Bookmarklet to replace artist and song title tags in YouTube uploads

If you have a YouTube channel you can set a default value for your titles and descriptions. Unfortunately, YouTube doesn’t provide a way of templating it.

This bookmarklet replaces {{ARTIST}} and {{TITLE}} tags in your titles and descriptions with parts parsed from the original filename. In my case, I always use the same pattern:

{{DATE}} {{ARTIST}} - {{TITLE}}.mp4

If you want to use your own pattern or add more tags to it, just modify it to suit your needs. In my case, for example, I don’t use the date part so I just ignore it.

youtube-set-artist-title.url Link
javascript:(function(){let [_, artist, title] = document.querySelector(‘ytcp-video-metadata-editor’).__data.video.originalFilename.match(/[-0-9]+ (.+) - (.+)\.mp4/);if (artist == ‘AC:DC’) artist = ‘AC/DC’;document.querySelectorAll(‘:is(.title, .description) ytcp-social-suggestions-textbox’).forEach(item => {item.field.value = item.field.value.replaceAll(‘{{ARTIST}}’, artist).replaceAll(‘{{TITLE}}’, title); item.onFieldChange();});document.querySelector(‘ytcp-button#save’).click();})()