diff --git a/customize.dist/four-oh-four.js b/customize.dist/four-oh-four.js index ab19f577d..bcae8b4b2 100644 --- a/customize.dist/four-oh-four.js +++ b/customize.dist/four-oh-four.js @@ -1,11 +1,12 @@ define([ + 'jquery', '/api/config', '/common/hyperscript.js', '/common/outer/local-store.js', '/customize/messages.js', 'less!/customize/src/less2/pages/page-404.less', -], function (Config, h, LocalStore, Messages) { +], function ($, Config, h, LocalStore, Messages) { var urlArgs = Config.requireConf.urlArgs; var img = h('img#cp-logo', { src: '/customize/cryptpad-new-logo-colors-logoonly.png?' + urlArgs @@ -20,6 +21,14 @@ define([ href: loggedIn? '/drive/': '/', }, loggedIn? Messages.header_logoTitle: Messages.header_homeTitle); + if (Config.httpUnsafeOrigin && Config.httpUnsafeOrigin !== window.location.origin + && window.parent) { + $(link).click(function (e) { + e.preventDefault(); + window.parent.location = Config.httpUnsafeOrigin + $(link).attr('href').slice(1); + }); + } + var content = h('div#cp-main', [ img, brand,