Move scripts to the bottom of the page
This should help speed up page rendering.
This commit is contained in:
Родитель
4fd71c1334
Коммит
b1a8464363
|
@ -15,19 +15,6 @@ const loginform = `
|
|||
<html>
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
<script src="https://login.persona.org/include.js"></script>
|
||||
<script>
|
||||
function login() {
|
||||
navigator.id.get(function(assertion) {
|
||||
if (assertion) {
|
||||
var assertion_field = document.getElementById("assertion-field");
|
||||
assertion_field.value = assertion;
|
||||
var login_form = document.getElementById("login-form");
|
||||
login_form.submit();
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form id="login-form" method="POST">
|
||||
|
@ -35,6 +22,20 @@ const loginform = `
|
|||
</form>
|
||||
|
||||
<p><a href="javascript:login()">Login</a></p>
|
||||
|
||||
<script src="https://login.persona.org/include.js"></script>
|
||||
<script>
|
||||
function login() {
|
||||
navigator.id.get(function(assertion) {
|
||||
if (assertion) {
|
||||
var assertion_field = document.getElementById("assertion-field");
|
||||
assertion_field.value = assertion;
|
||||
var login_form = document.getElementById("login-form");
|
||||
login_form.submit();
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
`
|
||||
|
|
|
@ -4,6 +4,16 @@
|
|||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
<title>django browserid example</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<form id="login-form" method="POST" action="/status/">
|
||||
{% csrf_token %}
|
||||
<input id="assertion-field" type="hidden" name="assertion" value="" />
|
||||
</form>
|
||||
|
||||
<p><a href="javascript:login()">Login</a></p>
|
||||
|
||||
<script src="https://login.persona.org/include.js"></script>
|
||||
<script>
|
||||
function login() {
|
||||
|
@ -16,16 +26,6 @@
|
|||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<form id="login-form" method="POST" action="/status/">
|
||||
{% csrf_token %}
|
||||
<input id="assertion-field" type="hidden" name="assertion" value="" />
|
||||
</form>
|
||||
|
||||
<p><a href="javascript:login()">Login</a></p>
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -4,6 +4,15 @@
|
|||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
<title>tornado browserid example</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<form id="login-form" method="POST" action="status">
|
||||
<input id="assertion-field" type="hidden" name="assertion" value="" />
|
||||
</form>
|
||||
|
||||
<p><a href="javascript:login()">Login</a></p>
|
||||
|
||||
<script src="https://login.persona.org/include.js"></script>
|
||||
<script>
|
||||
function login() {
|
||||
|
@ -16,15 +25,6 @@
|
|||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<form id="login-form" method="POST" action="status">
|
||||
<input id="assertion-field" type="hidden" name="assertion" value="" />
|
||||
</form>
|
||||
|
||||
<p><a href="javascript:login()">Login</a></p>
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -4,6 +4,15 @@
|
|||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
<title>web.py browserid example</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<form id="login-form" method="POST" action="status">
|
||||
<input id="assertion-field" type="hidden" name="assertion" value="" />
|
||||
</form>
|
||||
|
||||
<p><a href="javascript:login()">Login</a></p>
|
||||
|
||||
<script src="https://login.persona.org/include.js"></script>
|
||||
<script>
|
||||
function login() {
|
||||
|
@ -16,15 +25,6 @@
|
|||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<form id="login-form" method="POST" action="status">
|
||||
<input id="assertion-field" type="hidden" name="assertion" value="" />
|
||||
</form>
|
||||
|
||||
<p><a href="javascript:login()">Login</a></p>
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Загрузка…
Ссылка в новой задаче