Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
document.addEventListener('DOMContentLoaded', function () {
const panes = require('mashlib')
const UI = panes.UI
// Set up cross-site proxy
const $rdf = UI.rdf
$rdf.Fetcher.crossSiteProxyTemplate = document.origin + '/xss/?uri={uri}'
// Authenticate the user
UI.authn.checkUser()
.then(function () {
// Set up the view for the current subject
const kb = UI.store
const uri = window.location.href
const subject = kb.sym(uri)
const outliner = panes.getOutliner(document)
outliner.GotoSubject(subject, true, undefined, true, undefined)
})
})