Remove non-TLS support
This commit is contained in:
1 parent
84c07a912b
commit
b59ef914da
9 files changed
+88
-171
No files matched your search
+16
-19
@@ -1,17 +1,15 @@
|
||||
// The renderer, shared by the two things that ever build a page: the service
|
||||
// worker, which composes every navigation once it is installed, and boot.html,
|
||||
// which composes the one navigation that arrives before there is a worker to
|
||||
// do it.
|
||||
// The renderer: the templates in templates/, and the two things sw.js does
|
||||
// with them -- compose a fragment into the shell, and stand a notice in for a
|
||||
// page that could not be delivered.
|
||||
//
|
||||
// Sharing it is the whole point. A shell only the worker could build is what
|
||||
// made a first visit show a spinner and reload; with the same templates and
|
||||
// the same code reachable from the page, the first visit is already the app
|
||||
// and the worker is what makes the second one fast and the hundredth one
|
||||
// offline.
|
||||
// A file of its own rather than more of sw.js because it is the half with
|
||||
// nothing to do with the network: no routes, no caches, no requests. It was
|
||||
// loaded by boot.html as well once, which composed pages in the browser for a
|
||||
// device that could not install a worker; nothing but the worker builds a page
|
||||
// now.
|
||||
//
|
||||
// Loaded as a plain script by both -- importScripts in the worker, a <script>
|
||||
// tag in the page -- so it defines a global rather than exporting. Nunjucks
|
||||
// must already be loaded.
|
||||
// Loaded with importScripts, so it defines a global rather than exporting.
|
||||
// Nunjucks must already be loaded.
|
||||
(function (scope) {
|
||||
'use strict';
|
||||
|
||||
@@ -123,10 +121,9 @@
|
||||
//
|
||||
// chrome is what the shell needs and the fragment cannot carry: the
|
||||
// bookmark, the navbar picker's model, and the two versions the worker
|
||||
// was built with. All three are null from boot.html, which has no worker
|
||||
// to ask for any of them; the first two render as a hidden slot that
|
||||
// fills itself if one ever appears, and the third renders as nothing,
|
||||
// because no worker is the whole of what there is to report.
|
||||
// was built with. reference is null on the book list, which is the
|
||||
// picker's hidden state; the other two are always there, because the
|
||||
// worker composing this is the thing that knows them.
|
||||
compose: function (fragment, chrome) {
|
||||
var title = (TITLE_RE.exec(fragment) || ['', ''])[1].trim();
|
||||
var content = fragment.replace(TITLE_RE, '');
|
||||
@@ -134,9 +131,9 @@
|
||||
return render(name, {
|
||||
title: title,
|
||||
content: content,
|
||||
mark: (chrome && chrome.mark) || null,
|
||||
reference: (chrome && chrome.reference) || null,
|
||||
version: (chrome && chrome.version) || null
|
||||
mark: chrome.mark,
|
||||
reference: chrome.reference,
|
||||
version: chrome.version
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
Reference in new issue
Block a user