/    Sign up×
Community /Pin to ProfileBookmark

How I change this script?


That code extracts image links. Don´t forget to copy and paste that code for your clipboard.?

Any suggestion to change it to extract “.html” links instead image links will be welcome!?




function extractlinks(){
if (document.all||document.getElementById){
if (document.all) {var imgs=document.all.tags(“img”)}
if (document.getElementById){var imgs=document.getElementsByTagName(“img”)}

var total=imgs.length
var win2=window.open(“”,””,”menubar,scrollbars,status”)

var txtlink1
var imgTxtLink

win2.document.write(“<h2> Total Images = “+total+”</h2><br>”)
var imgcnt=0
for (i=0;i<total;i++){

//imgTxtLink = imgs[i].innerHTML
imgTxtLink = imgs[i].src

win2.document.write(‘<fieldset>Image (‘+ i + ‘)= …txtLink1==>’ + txtLink1 + ‘ </fieldset> ‘)
win2.document.write(‘<fieldset>Image (‘+ i + ‘)= …imgTxtLink==>’ + imgTxtLink + ‘ </fieldset> ‘)
win2.document.write(‘<fieldset>Image (‘+ i + ‘)= …IMG==>’ + imgs[i] + ‘ </fieldset><br> ‘)




<BUTTON onclick=”extractlinks()”; >List Page Links</BUTTON> </BODY></HTML>



to post a comment

0Be the first to comment 😎



Help @lebronletchev spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 9.23,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ

legal: ({
terms: of use,
privacy: policy
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
recent_tips: (
tipper: @ddiebold17,
tipped: article
amount: 1000 SATS,

tipper: @Mqlinka19,
tipped: live stream
amount: 4900 SATS,

tipper: @Mqlinka19,
tipped: article
amount: 10 SATS,