Skip to content

Commit 928ff50

Browse files
Update Data Browser html file
1 parent e7d7ec3 commit 928ff50

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

config/defaults.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ module.exports = {
1010
'dbPath': './.db',
1111
'port': 8443,
1212
'serverUri': 'https://localhost:8443',
13-
'webid': true
13+
'webid': true,
14+
'dataBrowserPath': 'default'
1415
}

static/databrowser.html

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,19 @@
55
<script type="text/javascript" src="https://linkeddata.github.io/mashlib/dist/mashlib-prealpha.js"></script>
66
<script>
77
document.addEventListener('DOMContentLoaded', function() {
8-
var UI = require('mashlib')
9-
var $rdf = UI.rdf
8+
var UI = Mashlib
109

11-
$rdf.Fetcher.crossSiteProxyTemplate = document.origin + '/xss?uri={uri}';
12-
var uri = window.location.href;
13-
window.document.title = uri;
14-
var kb = UI.store;
15-
var subject = kb.sym(uri);
16-
UI.outline.GotoSubject(subject, true, undefined, true, undefined);
17-
});
10+
UI.rdf.Fetcher.crossSiteProxyTemplate = document.origin + '/proxy?uri={uri}'
11+
12+
UI.authn.checkUser()
13+
.then(function () {
14+
var uri = window.location.href
15+
window.document.title = uri
16+
17+
var subject = UI.rdf.namedNode(uri)
18+
UI.outline.GotoSubject(subject, true, undefined, true, undefined)
19+
})
20+
})
1821
</script>
1922
</head>
2023
<body>

0 commit comments

Comments
 (0)