<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>YouTube links</title> </head> <body> YouTube videos by address (23-07-22)<br> <pre id="links_in"> https://www.youtube.com/watch?v=rkkAKN2-pSc https://www.youtube.com/watch?v=F59PRBnx40A https://www.youtube.com/watch?v=OBKLq9YNVtI https://www.youtube.com/watch?v=J635mqk769k https://www.youtube.com/watch?v=LfjbWajXvwA https://www.youtube.com/watch?v=eMDQfSrpLlQ https://www.youtube.com/watch?v=D54jlarArrQ https://www.youtube.com/watch?v=USFr5VeLQ2o https://www.youtube.com/watch?v=7PJ8COUfDg8 </pre> <div id="links_out"></div> <script> var id=document.all function getResponseText(url){ var xhr = new XMLHttpRequest() xhr.open('GET', url, false) xhr.setRequestHeader('Cache-Control', 'no-cache') var text xhr.onload = function(){ text=xhr.responseText } xhr.send() return text } var lines_list = id.links_in.innerText.trim().split("\n") function lines_list_to_html(lines_list){ var html = "" html += "<ol>\n" for(var line of lines_list){ var label = getResponseText("/app/lib/fetch/fetch-html-title.php?URL="+line) html += `<li><a target="_blank" href="${line}">${label}</a></li>\n` } html += "</ol>\n" return html } var html = lines_list_to_html(lines_list) id.links_out.innerHTML = html id.links_in.style.display = 'none' </script> </body> </html>