Good day, but is there such a javascript that scans the links array and displays links to the online video? Well, for example, there is a page http://site.ru/ on it there is an online video, and when you run this script, it displays a direct link to download this video with a thumbnail. Please do not kick much just started to learn javascript and nothing is clear.

    2 answers 2

    for(var i = 0; i < document.links.length; ++i) { if(/_videoLink_/.test(document.links[i].href)) { //вставка ссылки согласно API сайта с видео } } 

    Instead of _videoLink_ you need an expression for a link to a video, for example: youtube\.com\/watch\?v=

      If I understand correctly, then you want to run the script locally, so that he would bring you links to the video from the page http://site.ru? If so, using JS will make it not so easy :) The script above implies that it will be inserted into the page http://site.ru