[Glitch] Change public accounts pages to mount the web UI

Port 839f893168 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Eugen Rochko
2022-10-20 14:35:29 +02:00
committed by Claire
parent 6013eeea4c
commit 9363e5c24e
47 changed files with 164 additions and 1104 deletions

View File

@ -12,14 +12,6 @@ const perf = require('flavours/glitch/performance');
function main() {
perf.start('main()');
if (window.history && history.replaceState) {
const { pathname, search, hash } = window.location;
const path = pathname + search + hash;
if (!(/^\/web($|\/)/).test(path)) {
history.replaceState(null, document.title, `/web${path}`);
}
}
return ready(async () => {
const mountNode = document.getElementById('mastodon');
const props = JSON.parse(mountNode.getAttribute('data-props'));