Skip to content

Commit 82534c5

Browse files
committed
An improved version of getting origin from webId
1 parent eca386c commit 82534c5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

default-templates/new-account/index.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ <h1>Account settings</h1>
8787
});
8888

8989
function getOriginFromWebId(webId) {
90+
if (window.URL.prototype) {
91+
return new URL(webId).origin;
92+
}
9093
var uriParts = webId.split('/');
9194
return uriParts[0] + '//' + uriParts[2];
9295
}

0 commit comments

Comments
 (0)