mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-01-02 21:12:02 +08:00
Change for #864
This commit is contained in:
parent
7feb9a9f41
commit
dba125ad59
1 changed files with 3 additions and 2 deletions
|
@ -1,11 +1,12 @@
|
|||
(doc => {
|
||||
|
||||
const
|
||||
query = path => doc.location.pathname.replace(/\/+$/,'') + '/?/' + path,
|
||||
eId = id => doc.getElementById('rl-'+id),
|
||||
app = eId('app'),
|
||||
admin = app && '1' == app.dataset.admin,
|
||||
layout = doc.cookie.match(/(^|;) ?rllayout=([^;]+)/) || '',
|
||||
redirect = path => doc.location.replace('./?/'+path),
|
||||
redirect = path => doc.location.replace(query(path)),
|
||||
|
||||
showError = msg => {
|
||||
let div = eId('loading-error');
|
||||
|
@ -86,7 +87,7 @@ window.rl = {
|
|||
loadScript: loadScript
|
||||
};
|
||||
|
||||
loadScript(`./?/${admin ? 'Admin' : ''}AppData/0/${Math.random().toString().slice(2)}/`)
|
||||
loadScript(query(`${admin ? 'Admin' : ''}AppData/0/${Math.random().toString().slice(2)}/`))
|
||||
.catch(e => showError(e));
|
||||
|
||||
})(document);
|
||||
|
|
Loading…
Reference in a new issue