Skip to content
Snippets Groups Projects
Commit 1118cc56 authored by John McLear's avatar John McLear
Browse files

move everything to headers

parent 4a125368
Branches
No related tags found
No related merge requests found
...@@ -12,7 +12,9 @@ exports.expressCreateServer = function (hook_name, args, cb) { ...@@ -12,7 +12,9 @@ exports.expressCreateServer = function (hook_name, args, cb) {
//serve index.html under / //serve index.html under /
args.app.get('/', function(req, res) args.app.get('/', function(req, res)
{ {
res.send(eejs.require("ep_etherpad-lite/templates/index.html")); sendPadHeaderFiles(res, function(){
res.send(eejs.require("ep_etherpad-lite/templates/index.html"));
});
}); });
//serve robots.txt //serve robots.txt
...@@ -78,3 +80,21 @@ exports.expressCreateServer = function (hook_name, args, cb) { ...@@ -78,3 +80,21 @@ exports.expressCreateServer = function (hook_name, args, cb) {
} }
function sendPadHeaderFiles(res, callback){
res.set('Link', '<static/js/require-kernel.js>; rel=prefetch \, \
<javascripts/lib/ep_etherpad-lite/static/js/pad.js?callback=require.define>; rel=prefetch \, \
<javascripts/lib/ep_etherpad-lite/static/js/ace2_common.js?callback=require.define>; rel=prefetch \, \
<javascripts/lib/ep_etherpad-lite/static/js/ace2_inner.js?callback=require.define>; rel=prefetch \, \
<javascripts/lib/unorm/lib/unorm.js?callback=require.define>; rel=prefetch \, \
<static/custom/pad.js>; rel=prefetch \, \
<static/js/html10n.js>; rel=prefetch \, \
<static/js/l10n.js>; rel=prefetch \, \
<static/css/pad.css>; rel=prefetch \, \
<static/custom/pad.css>; rel=prefetch \, \
<static/css/iframe_editor.css>; rel=prefetch \, \
<pluginfw/plugin-definitions.json>; rel=prefetch \, \
<locales.json>; rel=prefetch \, \
<static/font/fontawesome-etherpad.woff>; rel=prefetch');
callback();
}
...@@ -33,23 +33,6 @@ ...@@ -33,23 +33,6 @@
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
<link rel="shortcut icon" href="<%=settings.favicon%>"> <link rel="shortcut icon" href="<%=settings.favicon%>">
<link rel="localizations" type="application/l10n+json" href="locales.json"> <link rel="localizations" type="application/l10n+json" href="locales.json">
<link rel="prefetch" href="static/css/pad.css">
<link rel="prefetch" href="static/custom/pad.css">
<link rel="prefetch" href="static/js/require-kernel.js">
<link rel="prefetch" href="javascripts/lib/ep_etherpad-lite/static/js/pad.js?callback=require.define">
<link rel="prefetch" href="javascripts/lib/ep_etherpad-lite/static/js/ace2_common.js?callback=require.define">
<link rel="prefetch" href="javascripts/lib/ep_etherpad-lite/static/js/ace2_inner.js?callback=require.define">
<link rel="prefetch" href="javascripts/lib/unorm/lib/unorm.js?callback=require.define">
<link rel="prefetch" href="static/custom/pad.js">
<link rel="prefetch" href="pluginfw/plugin-definitions.json">
<link rel="prefetch" href="locales.json">
<link rel="prefetch" href="static/font/fontawesome-etherpad.woff">
<!--
No point prefetching these as we load them below??...
<link rel="prefetch" href="static/js/html10n.js">
<link rel="prefetch" href="static/js/l10n.js">
-->
<script type="text/javascript" src="static/js/html10n.js"></script> <script type="text/javascript" src="static/js/html10n.js"></script>
<script type="text/javascript" src="static/js/l10n.js"></script> <script type="text/javascript" src="static/js/l10n.js"></script>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment