var rurl = ""
var links = document.getElementsByTagName("link")
var link = {}
for(var i=0i<links.lengthi++){
link = links[i]
if(link.rel === "canonical"){
rurl = link.href
break
}
}
alert(rurl)
var rurl = ""
var links = document.getElementsByTagName("link")
var link = {}
for(var i=0i<links.lengthi++){
link = links[i]
if(link.rel === "canonical"){
rurl = link.href
break
}
}
alert(rurl)