Sort menu for arist channels on YouTube

add the sort menu to artist channels, as it is hidden from them

< Feedback on Sort menu for arist channels on YouTube

Review: OK - script works, but has bugs

§
Posted: 21-10-2022

Is it possible to change this script so it doesn't load external resources? The Firemonkey extension does not support GM_getResourceText for html.

philfiruAuthor
§
Posted: 22-10-2022

You will need to manually change line 36 from:

html.innerHTML = GM_getResourceText("html");

to something like this:

html.innerHTML = 'raw HTML code from the external URL';

for the current version it should be (untested):

html.innerHTML = '<div class="adeleine-sort-menu-wrapper"> <a class="adeleine-sort-menu"> <svg viewBox="0 0 24 24" preserveAspectRatio="xMidYMid meet" focusable="false" style="display: block;" class="style-scope yt-icon"><g class="style-scope yt-icon"><path d="M21,6H3V5h18V6z M15,11H3v1h12V11z M9,17H3v1h6V17z" class="style-scope yt-icon"></path></g></svg> Sort by </a> <ul class="dropdown"> <li> <a href="videos?view=0&sort=p&flow=grid"> Most popular </a> </li> <li> <a href="videos?view=0&sort=da&flow=grid"> Date added (oldest) </a> </li> <li> <a href="videos?view=0&sort=dd&flow=grid"> Date added (newest) </a> </li> </ul></div>';

Post reply

Sign in to post a reply.