Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
shanxing2 committed Feb 24, 2022
1 parent 3bc1e81 commit f0239ea
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
18 changes: 18 additions & 0 deletions source/FrmWeb.vb
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,22 @@ Public Class FrmWeb
End If
End If
End Sub

Private Sub Web1_DocumentCompleted(sender As Object, e As WebBrowserDocumentCompletedEventArgs) Handles Web1.DocumentCompleted
If Web1.Document Is Nothing Then Return

' 将所有的链接的目标,指向本窗体
For Each archor As HtmlElement In Web1.Document.Links
archor.SetAttribute("target", "_self")
Next

' 将所有的FORM的提交目标,指向本窗体
For Each form As HtmlElement In Web1.Document.Forms
form.SetAttribute("target", "_self")
Next
End Sub

Private Sub Web1_NewWindow(sender As Object, e As CancelEventArgs) Handles Web1.NewWindow
e.Cancel = True
End Sub
End Class
10 changes: 5 additions & 5 deletions source/违规网盘文件检测.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<MinimumRequiredVersion>1.0.0.1</MinimumRequiredVersion>
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
<WebPage>publish.htm</WebPage>
<ApplicationRevision>6</ApplicationRevision>
<ApplicationRevision>7</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut>
Expand Down Expand Up @@ -238,22 +238,22 @@
<ItemGroup>
<PublishFile Include="Interop.NETWORKLIST">
<Visible>False</Visible>
<PublishState>Exclude</PublishState>
<IncludeHash>True</IncludeHash>
<Group>
</Group>
<TargetPath>
</TargetPath>
<PublishState>Exclude</PublishState>
<IncludeHash>True</IncludeHash>
<FileType>Assembly</FileType>
</PublishFile>
<PublishFile Include="stdole">
<Visible>False</Visible>
<PublishState>Exclude</PublishState>
<IncludeHash>True</IncludeHash>
<Group>
</Group>
<TargetPath>
</TargetPath>
<PublishState>Exclude</PublishState>
<IncludeHash>True</IncludeHash>
<FileType>Assembly</FileType>
</PublishFile>
</ItemGroup>
Expand Down

0 comments on commit f0239ea

Please sign in to comment.