コメント |
@DIV
<meta http-equiv="content-type" content="text/html; charset=SHIFT_JIS">
<SCRIPT language="VBScript">
Dim WshShell,RegName,strLocation,obj,doc
Set WshShell = CreateObject("WScript.Shell")
RegName = "Twitter 用 Twilog ジャンプ"
' *************************************************
' ウインドウサイズ
' *************************************************
' SHIFTとCTRL用変数
Dim keyflg1,keyflg2,keyflg3
keyflg1 = False
keyflg2 = False
keyflg3 = False
Function setObj( src )
Set obj = src
End Function
Function uninstall()
Dim Fso
Set Fso = CreateObject( "Scripting.FileSystemObject" )
strFile = WshShell.RegRead( "HKCU\Software\Microsoft\Internet Explorer\MenuExt\"&RegName&"\" )
if confirm("アンインストールしてよろしいですか?") then
on error resume next
Call Fso.DeleteFile( strFile )
WshShell.RegDelete "HKCU\Software\Microsoft\Internet Explorer\MenuExt\"&RegName&"\"
on error goto 0
uninstall = True
Exit Function
end if
uninstall = False
Exit Function
End Function
</SCRIPT>
<SCRIPT language="JavaScript">
setObj(external.menuArguments.event.srcElement);
</SCRIPT>
<html>
<head>
<title>Twitter 用 Twilog ジャンプ(&M)</title>
<meta http-equiv="content-type" content="text/html; charset=SHIFT_JIS">
<base target="_self">
</head>
<BODY>
<INPUT id="btn" type=button onClick='keyflg1=window.event.shiftKey:keyflg2=window.event.ctrlKey:keyflg3=window.event.altKey'>
</BODY>
</html>
<SCRIPT language="VBScript">
' ボタンの呼び出し
document.getElementById("btn").click()
if keyflg1 and keyflg2 and keyflg3 then
if uninstall() then
alert("アンインストールを実行しましたので、IE を再起動して下さい")
else
alert("アンインストールをキャンセルしました")
end if
else
on error resume next
' *************************************************
' アンカーの処理( レジストリ 0x20 )
' obj は、カーソル下のオブジェクト
' *************************************************
tag = obj.tagName
if Err.Number <> 0 then
str = "カーソル下のオブジェクトを取得できませんでした"
else
tag = Ucase( tag )
' *************************************************
' リンクの場合
' *************************************************
if tag = "A" then
aData = Split(obj.href&"","/")
if Left(obj.href&"",20) = "https://twitter.com/" or Left(obj.href&"",19) = "http://twitter.com/" then
stra = "http://twilog.org/" & aData(3)
Set a_exist = external.menuArguments.document.getElementById("a_jumper")
if a_exist is nothing then
Set aobj = external.menuArguments.document.createElement("a")
Call aobj.setAttribute("href",stra)
Call aobj.setAttribute("target","_blank")
Call aobj.setAttribute("id","a_jumper")
external.menuArguments.document.body.appendChild(aobj)
aobj.click()
else
a_exist.href = stra
a_exist.click()
end if
end if
end if
end if
on error goto 0
end if
</SCRIPT>
@END |