这是迅雷的htm文件,哪里是调用主程序的地方?
<script language="VBScript">
Sub AddLink(Url,Info,Location)
On Error Resume Next
set ThunderApi = CreateObject("Xunleibho.CatchRightClick.1")
if err<>0 then
MsgBox("Thunder not properly installed on this PC!")
else
if Info = "" then
Info = "unknown"
end if
DownloadInfo = "#*01#*" + Url + "#*02#*" + Location + "#*03#*" + Info + "#*04#*迅雷4#*05#*"
retValue = ThunderApi.sendUrl(DownloadInfo)
end if
end sub
Sub OnContextMenu()
set srcEvent = external.menuArguments.event
set srcLocation = external.menuArguments.location
set EventElement = external.menuArguments.document.elementFromPoint ( srcEvent.clientX, srcEvent.clientY )
if srcEvent.type = "MenuExtAnchor" then
set srcAnchor = EventElement
do until TypeName(srcAnchor)="HTMLAnchorElement"
set srcAnchor=srcAnchor.parentElement
Loop
Call AddLink(srcAnchor.href,srcAnchor.innerText,srcLocation)
elseif srcEvent.type="MenuExtImage" then
if TypeName(EventElement)="HTMLAreaElement" then
Call AddLink(EventElement.href,EventElement.Alt,srcLocation)
else
set srcImage = EventElement
set srcAnchor = srcImage.parentElement
do until TypeName(srcAnchor)="HTMLAnchorElement"
set srcAnchor=srcAnchor.parentElement
if TypeName(srcAnchor)="Nothing" then
call AddLink(srcImage.href,srcImage.Alt,srcLocation)
exit sub
end if
Loop
Call AddLink(srcAnchor.href,srcImage.Alt,srcLocation)
end if
elseif srcEvent.type="MenuExtUnknown" then
set srcAnchor = EventElement
do until TypeName(srcAnchor)="HTMLAnchorElement"
set srcAnchor=srcAnchor.parentElement
if TypeName(srcAnchor)="Nothing" then
Call AddLink(EventElement.href,EventElement.innerText,srcLocation)
exit sub
end if
Loop
Call AddLink(srcAnchor.href,srcAnchor.innerText,srcLocation)
elseif 1=1 then
MsgBox("Unknown Event Source """ + srcEvent.type + """" + vbCrLf + "Please send description of error to fengliang@sandai.net")
end if
end sub
call OnContextMenu()
</script>