ViewTube/SaveTube Test

Another script question

Hi sebaro,

I'm interested in that script but it won't work in my 3.x Greasemonkey for the mobile layout. Is there a way to simplify it with "vanilla" javascript as I see it's requiring use of jquery. To me it seems achievable more simple but in all honesty that's a total guess as I need drastic help. I've tried messing around with but cannot achieve the result as I only took a template and switched some things around hoping for it to function correctly.

What I want to achieve is:

Keep this kind of playlist link untouched.

Remove everything from &list= onward for this.

First line:
document.addEventListener('DOMContentLoaded', modifyLinks, false);

Second line:
Change targetNode to "document.body".
Replace console.log with "modifyLinks()".
Remove "observer.disconnect();".

Error report
Couldn't get the videos content.

Try test version above.

Couldn't get the videos content.

Try test version above.

Size mismatch
For what it's worth... I found out that when I get this download error
(see above:
it's when the default download option is High Definition MP4.

If I change this to Low Resolution MP4, I'm presented with an array (3, 4 or 5) of files to download. Out of these usually one will be the right one. So far, anyway.

As I said in the reply, sometimes high resolution streams are not available at first for new videos, it takes a while to upload/transcode if the video is large. Somtimes the HD stream is broken, they use the adaptive/dash streams so they don't care for progressive streams.

I don't understand the array part.

Robert J.
Sorry, couldn't come back earlier. What I meant is that when High Definition MP4 is available, clicking on the down arrow automatically starts the download (FlashGot + DownThemAll). If it's Low Definition MP4, on the other hand, I have to use Ctl + Mouse click (on a Mac) to get a contextual menu that half of the time shows either FlashGot's pre-defined engine (? in my case DTA Turbo, but it could be curl or something else), or only a contextual menu entry named "FlashGot All". Selecting this opens DownThemAll with an array of anything from 2 to 5 selectable URLs with names made of such long non-descript codes that I find it much easier to select and download them all. At the end only one of the downloaded files is a valid video.

Quite difficult to explain, all this, sorry for not being able to be more clear. If I could upload a screen shot or two it would be easier. But there's no problem per se in the way it's working.

YouTube sets an attachment header only for HD/720, which means the browser will show a download window just for this, for the rest, because it supports their content-type (video/mp4) it opens them. So in the script I had to show a link to the video so the user can download the video (right-click + save as).

SaveTube has a workaround using Web API to force download but it has to do it in background and it needs enough cache. If your browser version is recent, open script's settings and set "Show Save Link" to off. For small videos this should work fine.

Robert J.
OK, I'll try that. Maybe not on my usual browser, slightly antiquated, but on those I use for emergencies. FYI, or rather for the sake of other users, I *think* that your "(right-click + save as)" isd the Windows equivalent of my Mac's "Ctl + click -> save as".

Btw, do you have a repository of the earlier Q&A exchanges, where users could try and search before bothering you?

The Mac mouse doesn't have the second/right button but the OS supports 2 button mice.

I think the script's web page has all the documentation on how to use it, the only thing that's not there is how a browser works because the user has to know that a browser (this includes user script, addon, extension) has some limitations/restrictions compared to other applications.