转载自zqz0012005的博客- '防止Google对搜索结果重定向
-
- On Error Resume Next
- Set sh = CreateObject("Shell.Application")
- do
- RemoveGoogleRedirect
- WScript.sleep 1000*3
- loop
-
- function RemoveGoogleRedirect()
- Dim wnds, wnd, document, el, sc
- Set wnds = sh.Windows()
- For Each wnd In wnds
- if InStr(1,wnd.LocationURL,"http://www.google.com.hk",1) then
- set document = wnd.document
- if document.readyState="complete" then
- set el = Nothing
- set el = document.getElementById("RemoveGoogleRedirect")
- if el Is Nothing then
- set sc = document.createElement("script")
- sc.id = "RemoveGoogleRedirect"
- sc.text = "function rwt(){return true;}"
- document.body.appendChild(sc)
- end if
- end if
- End If
- Next
- end function
复制代码
|