Youtube-tools-extension icon indicating copy to clipboard operation
Youtube-tools-extension copied to clipboard

Reduce script impact on UI

Open maxdd opened this issue 2 years ago • 21 comments

Hello MDCM, first of all amazing work. I was really struggling to find a decent script that was still working properly. I was wondering whether you can plan a light release where one can simply have a configuration page similar to "Enhance for youtube" and enable and disable all the visual changes.

Regards,

maxdd avatar Aug 11 '23 11:08 maxdd

Ok Thank you so much

DeveloperMDCM avatar Aug 11 '23 20:08 DeveloperMDCM

Really nice script, thank you.

The request by @maxdd would be great addition, it would reduce clutter of features one does not use.

It would also be nice to have a direct one click download button (with default options set) without having to do the 3-4 step process. 1- Hi Mp4 2- Select Quality 3- Click on Download to prepare the data 4- Click on Download again to download.

Is it possible to have an option to download the plain text of the more section? with youtube redirect links cleansed to point to the link directly?

badabing2005 avatar Aug 20 '23 12:08 badabing2005

In the meantime I have created this basic code to be injected via "Enhancer for Youtube" which subtitues the download button (with some issues) with the url MDCM is using. Although it would be a better integration and less clicking effort

let myWindow;

function waitForEl(el) {
  return new Promise((resolve, reject) => {
    const intervalId = setInterval(() => {
      if (document.querySelector(el)) {
        clearInterval(intervalId);
        resolve();
      }
    }, 500);
  });
}

waitForEl("#flexible-item-buttons > ytd-download-button-renderer > ytd-button-renderer > yt-button-shape > button").then(() => {
  console.log("loaded");
  button = document.querySelector("#flexible-item-buttons > ytd-download-button-renderer > ytd-button-renderer > yt-button-shape > button")
  button.onclick = function Function() {
    console.log("clicked");
    myWindow = window.open("https://loader.to/api/button/?url=" + window.location.href + "&f=mp3", "download_video", "width=200,height=100");
  }
});

maxdd avatar Aug 21 '23 06:08 maxdd

@maxdd Thanks I added the extension and pasted this code into Custom script section, saved. When I'm on a youtube video, clicking on the Custom Script button image does nothing. What I am missing?

Thanks

badabing2005 avatar Aug 21 '23 20:08 badabing2005

After you clicked the custom script you should click on the YouTube download button. Be sure the page is large enough to see it because it doesn't work otherwise

maxdd avatar Aug 21 '23 21:08 maxdd

Tried that, nothing happens, and the page is full screen on a 4k monitor, I can't go any larger :) I even tried to auto-load the script option, that did not work either.

badabing2005 avatar Aug 21 '23 21:08 badabing2005

Today update the script Auto download MP4, PM3 and optimization Hoy actualizare el script Descarga automática MP4, PM3 y optimización

DeveloperMDCM avatar Aug 22 '23 16:08 DeveloperMDCM

Thanks where do we update the script from? Both here at Github and GreasyFork Update is from last week.

Thanks for your continued improvements.

badabing2005 avatar Aug 22 '23 19:08 badabing2005

Tried that, nothing happens, and the page is full screen on a 4k monitor, I can't go any larger :) I even tried to auto-load the script option, that did not work either.

You just have to put it here and hit Save image

then you press on the "<>" symbol and hit Download (a new small pop-up will open so that you can click download)

image

image

image

I dont think the language is an issue but i cantry on an English one

maxdd avatar Aug 23 '23 06:08 maxdd

Thanks That's where I had it too, but I didn't realize you were modifying the standard Download button. I was clicking on Tampermonkey script buttons. Incidentally I'm more interested in the mp4 (default resolution), I see that you using the Download link to get mp3.

badabing2005 avatar Aug 23 '23 11:08 badabing2005

In my script you can take the url and where it says "mp3" you put the format you want. If you use mp4 instead it will download it as a video 720p

maxdd avatar Aug 23 '23 12:08 maxdd

In my script you can take the url and where it says "mp3" you put the format you want. If you use mp4 instead it will download it as a video 720p

OK Thanks, that worked, appreciated.

badabing2005 avatar Aug 23 '23 14:08 badabing2005

@maxdd Interesting that Download link works on Chrome, but it never shows up on Firefox.

badabing2005 avatar Aug 23 '23 14:08 badabing2005

@maxdd Interesting that Download link works on Chrome, but it never shows up on Firefox.

I've used Chrome to code it, never tried on Firefox. Btw you can use other format to go higher than 720p ofc.

maxdd avatar Aug 23 '23 14:08 maxdd

I will take into account all the suggestions for the next update Tendré en cuenta todas la sugerencias para la próxima actualización

DeveloperMDCM avatar Aug 23 '23 20:08 DeveloperMDCM

Script update

DeveloperMDCM avatar Sep 01 '23 07:09 DeveloperMDCM

The icons only appear if you hover on the area where the icons are supposed to be. You would need to know where they are, I found it accidentally, at first I thought the script was not working. Perhaps it has something to do with light mode instead of dark mode.

image

badabing2005 avatar Sep 01 '23 12:09 badabing2005

Ok fixed v 1.8.2

DeveloperMDCM avatar Sep 01 '23 15:09 DeveloperMDCM

Thanks, Just double checking, this is UI Look change right? No one click download option right? Or no options to include / not include certain buttons. I know the latter can be achieved by commenting out certain lines.

badabing2005 avatar Sep 01 '23 17:09 badabing2005

Ok tell me what new options could be added in another update and corrections

DeveloperMDCM avatar Sep 01 '23 18:09 DeveloperMDCM

Thank you very much, see this. https://github.com/DeveloperMDCM/Youtube-tools-extension/issues/9#issuecomment-1685271605

I would love to be able to download mp4 with a single click, the default resolution of 720, without going through several clicks. Click the button and the download should start. And if there are flags / defines on top of the script or any way to turn off / not show some of the buttons, it would be awesome.

badabing2005 avatar Sep 01 '23 19:09 badabing2005