Skip to content

Commit 4a09fde

Browse files
committed
Fix subframes affecting navigated URL
1 parent 2abdb4b commit 4a09fde

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ This project uses the [StandardJS](https://standardjs.com/) code style. Please f
7575
- [x] `ctrl+[` and `ctrl+]` for navigating history
7676
- [x] `ctrl+l` for selecting the navigation bar
7777
- [ ] saveAs context menu (using fetch and fs.createWriteStream())
78+
- [ ] Persist windows on application quit
7879
- [ ] fetch API for hyperdrives [GH issue](https://github.com/cliqz-oss/dat-webext/issues/159)
7980
- [ ] Creating an archive (scoped to page origin)
8081
- [ ] PUT/DELETE methods for files / folders

app/protocols/hyper-protocol.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ module.exports = async function createHandler () {
55
const sdk = await SDK()
66
const fetch = datFetch(sdk)
77
return async function protocolHandler ({ url }, sendResponse) {
8-
console.log('Loading', url)
98
const response = await fetch(url)
109

1110
const { status: statusCode, body: data, headers: responseHeaders } = response

app/ui/script.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ frontbutton.addEventListener('click', () => {
4545

4646
webview.addEventListener('did-start-navigation', ({ detail }) => {
4747
const url = detail[1]
48+
const isMainFrame = detail[3]
49+
if(!isMainFrame) return
4850
urlbar.value = url
4951
if (firstLoad && (toNavigate === DEFAULT_PAGE)) {
5052
urlbar.focus()

0 commit comments

Comments
 (0)