Commit 388e37c7 authored by jan.koester's avatar jan.koester
Browse files

test

parent 7ba92885
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -3,6 +3,26 @@
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script>
    // Set a dynamic <base> so relative asset/API URLs resolve correctly whether
    // the editor is mounted at the domain root or behind a proxy prefix
    // (e.g. /editor), with or without a trailing slash. Must run before any
    // <link>/<script> below so the browser uses the base for those too.
    (function(){
        var p = location.pathname, base;
        if (p.charAt(p.length - 1) === '/') {
            base = p;
        } else {
            var last = p.substring(p.lastIndexOf('/') + 1);
            if (last.indexOf('.') !== -1 || last === 'login' || last === 'index') {
                base = p.substring(0, p.lastIndexOf('/') + 1);
            } else {
                base = p + '/';
            }
        }
        document.write('<base href="' + base + '">');
    })();
    </script>
    <title data-i18n="I18N_BLOGI_WEBEDITOR">Blogi WebEditor</title>
    <link rel="stylesheet" href="css/editor.css">
</head>
+20 −0
Original line number Diff line number Diff line
@@ -3,6 +3,26 @@
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script>
    // Set a dynamic <base> so relative asset/API URLs resolve correctly whether
    // the editor is mounted at the domain root or behind a proxy prefix
    // (e.g. /editor), with or without a trailing slash. Must run before any
    // <link>/<script> below so the browser uses the base for those too.
    (function(){
        var p = location.pathname, base;
        if (p.charAt(p.length - 1) === '/') {
            base = p;
        } else {
            var last = p.substring(p.lastIndexOf('/') + 1);
            if (last.indexOf('.') !== -1 || last === 'login' || last === 'index') {
                base = p.substring(0, p.lastIndexOf('/') + 1);
            } else {
                base = p + '/';
            }
        }
        document.write('<base href="' + base + '">');
    })();
    </script>
    <title>blogi editor - Login</title>
    <link rel="stylesheet" href="css/editor.css">
    <style>