mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Remove redundant type="text/javascript" from <script> elements
In HTML5, <script> elements default to MIME type text/javascript. The HTML5 living standard and MDN recommend against including the attribute. From https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#attr-type > The HTML5 specification urges authors to omit the attribute rather > than provide a redundant MIME type. From https://html.spec.whatwg.org/#the-script-element > Authors should omit the type attribute instead of redundantly setting > it.
This commit is contained in:
@@ -91,7 +91,7 @@ Google Analytics
|
||||
|
||||
{%- block extrahead %}
|
||||
{{ super() }}
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'XXX account number XXX']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
@@ -103,7 +103,7 @@ Google Analytics
|
||||
<div class="footer">This page uses <a href="https://analytics.google.com/">
|
||||
Google Analytics</a> to collect statistics. You can disable it by blocking
|
||||
the JavaScript coming from www.google-analytics.com.
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
(function() {
|
||||
var ga = document.createElement('script');
|
||||
ga.src = ('https:' == document.location.protocol ?
|
||||
@@ -134,7 +134,6 @@ Google Search
|
||||
(function() {
|
||||
var cx = '......';
|
||||
var gcse = document.createElement('script');
|
||||
gcse.type = 'text/javascript';
|
||||
gcse.async = true;
|
||||
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
|
||||
var s = document.getElementsByTagName('script')[0];
|
||||
|
||||
Reference in New Issue
Block a user