don't use templates inside of script tags

smf-sdk
Fabian Jakobs 2016-01-05 14:09:32 +00:00
rodzic f1bb58e5e2
commit a4c709461f
2 zmienionych plików z 16 dodań i 3 usunięć

Wyświetl plik

@ -1,6 +1,9 @@
<html> <html>
<head> <head>
<meta charset='utf-8'> <meta charset='utf-8'>
<meta id="page-data"
data-retry-in="<%= retryIn %>"
>
<title><%=title%></title> <title><%=title%></title>
<link rel="stylesheet" type="text/css" href="<%=staticPrefix%>/error_handler/style.css" /> <link rel="stylesheet" type="text/css" href="<%=staticPrefix%>/error_handler/style.css" />
</head> </head>
@ -17,9 +20,11 @@
<a href="https://c9.io">Home</a> <a href="https://c9.io">Home</a>
</div> </div>
<script> <script>
var data = document.getElementById("page-data").dataset;
setTimeout(function() { setTimeout(function() {
window.location.reload(); window.location.reload();
}, <%=retryIn%>) }, parseInt(data.retryIn, 10))
</script> </script>
</body> </body>

Wyświetl plik

@ -2,7 +2,13 @@
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta id="page-data"
data-static-prefix="<%= staticPrefix %>"
data-architect-config="<%= JSON.stringify(architectConfig, null, 2) %>"
>
<title>Cloud9</title> <title>Cloud9</title>
<script> <script>
// For node-webkit // For node-webkit
var nRequire = window.require; var nRequire = window.require;
@ -29,7 +35,9 @@
<script src="/configs/require_config.js"></script> <script src="/configs/require_config.js"></script>
<% } %> <% } %>
<script> <script>
var plugins = <%-: architectConfig | JSONToJS %>; var data = document.getElementById("page-data").dataset;
var plugins = JSON.parse(data.architectConfig);
var start = Date.now(); var start = Date.now();
<% if (packed) { %> <% if (packed) { %>