Remove unneeded type attribute for <script>
This commit is contained in:
parent
74eb4059d6
commit
76b0493fb0
|
@ -51,18 +51,18 @@
|
||||||
|
|
||||||
{{#if mathjax_support}}
|
{{#if mathjax_support}}
|
||||||
<!-- MathJax -->
|
<!-- MathJax -->
|
||||||
<script async type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
<script async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<!-- Provide site root to javascript -->
|
<!-- Provide site root to javascript -->
|
||||||
<script type="text/javascript">
|
<script>
|
||||||
var path_to_root = "{{ path_to_root }}";
|
var path_to_root = "{{ path_to_root }}";
|
||||||
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "{{ preferred_dark_theme }}" : "{{ default_theme }}";
|
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "{{ preferred_dark_theme }}" : "{{ default_theme }}";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- Work around some values being stored in localStorage wrapped in quotes -->
|
<!-- Work around some values being stored in localStorage wrapped in quotes -->
|
||||||
<script type="text/javascript">
|
<script>
|
||||||
try {
|
try {
|
||||||
var theme = localStorage.getItem('mdbook-theme');
|
var theme = localStorage.getItem('mdbook-theme');
|
||||||
var sidebar = localStorage.getItem('mdbook-sidebar');
|
var sidebar = localStorage.getItem('mdbook-sidebar');
|
||||||
|
@ -78,7 +78,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- Set the theme before any content is loaded, prevents flash -->
|
<!-- Set the theme before any content is loaded, prevents flash -->
|
||||||
<script type="text/javascript">
|
<script>
|
||||||
var theme;
|
var theme;
|
||||||
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
|
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
|
||||||
if (theme === null || theme === undefined) { theme = default_theme; }
|
if (theme === null || theme === undefined) { theme = default_theme; }
|
||||||
|
@ -90,7 +90,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- Hide / unhide sidebar before it is displayed -->
|
<!-- Hide / unhide sidebar before it is displayed -->
|
||||||
<script type="text/javascript">
|
<script>
|
||||||
var html = document.querySelector('html');
|
var html = document.querySelector('html');
|
||||||
var sidebar = 'hidden';
|
var sidebar = 'hidden';
|
||||||
if (document.body.clientWidth >= 1080) {
|
if (document.body.clientWidth >= 1080) {
|
||||||
|
@ -171,7 +171,7 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
|
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
|
||||||
<script type="text/javascript">
|
<script>
|
||||||
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
|
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
|
||||||
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
|
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
|
||||||
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
|
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
|
||||||
|
@ -221,7 +221,7 @@
|
||||||
|
|
||||||
{{#if live_reload_endpoint}}
|
{{#if live_reload_endpoint}}
|
||||||
<!-- Livereload script (if served using the cli tool) -->
|
<!-- Livereload script (if served using the cli tool) -->
|
||||||
<script type="text/javascript">
|
<script>
|
||||||
const wsProtocol = location.protocol === 'https:' ? 'wss:' : 'ws:';
|
const wsProtocol = location.protocol === 'https:' ? 'wss:' : 'ws:';
|
||||||
const wsAddress = wsProtocol + "//" + location.host + "/" + "{{{live_reload_endpoint}}}";
|
const wsAddress = wsProtocol + "//" + location.host + "/" + "{{{live_reload_endpoint}}}";
|
||||||
const socket = new WebSocket(wsAddress);
|
const socket = new WebSocket(wsAddress);
|
||||||
|
@ -240,7 +240,7 @@
|
||||||
|
|
||||||
{{#if google_analytics}}
|
{{#if google_analytics}}
|
||||||
<!-- Google Analytics Tag -->
|
<!-- Google Analytics Tag -->
|
||||||
<script type="text/javascript">
|
<script>
|
||||||
var localAddrs = ["localhost", "127.0.0.1", ""];
|
var localAddrs = ["localhost", "127.0.0.1", ""];
|
||||||
|
|
||||||
// make sure we don't activate google analytics if the developer is
|
// make sure we don't activate google analytics if the developer is
|
||||||
|
@ -258,43 +258,43 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if playground_line_numbers}}
|
{{#if playground_line_numbers}}
|
||||||
<script type="text/javascript">
|
<script>
|
||||||
window.playground_line_numbers = true;
|
window.playground_line_numbers = true;
|
||||||
</script>
|
</script>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if playground_copyable}}
|
{{#if playground_copyable}}
|
||||||
<script type="text/javascript">
|
<script>
|
||||||
window.playground_copyable = true;
|
window.playground_copyable = true;
|
||||||
</script>
|
</script>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if playground_js}}
|
{{#if playground_js}}
|
||||||
<script src="{{ path_to_root }}ace.js" type="text/javascript" charset="utf-8"></script>
|
<script src="{{ path_to_root }}ace.js" charset="utf-8"></script>
|
||||||
<script src="{{ path_to_root }}editor.js" type="text/javascript" charset="utf-8"></script>
|
<script src="{{ path_to_root }}editor.js" charset="utf-8"></script>
|
||||||
<script src="{{ path_to_root }}mode-rust.js" type="text/javascript" charset="utf-8"></script>
|
<script src="{{ path_to_root }}mode-rust.js" charset="utf-8"></script>
|
||||||
<script src="{{ path_to_root }}theme-dawn.js" type="text/javascript" charset="utf-8"></script>
|
<script src="{{ path_to_root }}theme-dawn.js" charset="utf-8"></script>
|
||||||
<script src="{{ path_to_root }}theme-tomorrow_night.js" type="text/javascript" charset="utf-8"></script>
|
<script src="{{ path_to_root }}theme-tomorrow_night.js" charset="utf-8"></script>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if search_js}}
|
{{#if search_js}}
|
||||||
<script src="{{ path_to_root }}elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
|
<script src="{{ path_to_root }}elasticlunr.min.js" charset="utf-8"></script>
|
||||||
<script src="{{ path_to_root }}mark.min.js" type="text/javascript" charset="utf-8"></script>
|
<script src="{{ path_to_root }}mark.min.js" charset="utf-8"></script>
|
||||||
<script src="{{ path_to_root }}searcher.js" type="text/javascript" charset="utf-8"></script>
|
<script src="{{ path_to_root }}searcher.js" charset="utf-8"></script>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<script src="{{ path_to_root }}clipboard.min.js" type="text/javascript" charset="utf-8"></script>
|
<script src="{{ path_to_root }}clipboard.min.js" charset="utf-8"></script>
|
||||||
<script src="{{ path_to_root }}highlight.js" type="text/javascript" charset="utf-8"></script>
|
<script src="{{ path_to_root }}highlight.js" charset="utf-8"></script>
|
||||||
<script src="{{ path_to_root }}book.js" type="text/javascript" charset="utf-8"></script>
|
<script src="{{ path_to_root }}book.js" charset="utf-8"></script>
|
||||||
|
|
||||||
<!-- Custom JS scripts -->
|
<!-- Custom JS scripts -->
|
||||||
{{#each additional_js}}
|
{{#each additional_js}}
|
||||||
<script type="text/javascript" src="{{ ../path_to_root }}{{this}}"></script>
|
<script src="{{ ../path_to_root }}{{this}}"></script>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|
||||||
{{#if is_print}}
|
{{#if is_print}}
|
||||||
{{#if mathjax_support}}
|
{{#if mathjax_support}}
|
||||||
<script type="text/javascript">
|
<script>
|
||||||
window.addEventListener('load', function() {
|
window.addEventListener('load', function() {
|
||||||
MathJax.Hub.Register.StartupHook('End', function() {
|
MathJax.Hub.Register.StartupHook('End', function() {
|
||||||
window.setTimeout(window.print, 100);
|
window.setTimeout(window.print, 100);
|
||||||
|
@ -302,7 +302,7 @@
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
{{else}}
|
{{else}}
|
||||||
<script type="text/javascript">
|
<script>
|
||||||
window.addEventListener('load', function() {
|
window.addEventListener('load', function() {
|
||||||
window.setTimeout(window.print, 100);
|
window.setTimeout(window.print, 100);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue