Commit: 6ba762f8663b6c615aad0290a5eb0213ba90cac3 Author: Peter Kokot <peterko...@gmail.com> Wed, 24 Oct 2018 20:37:57 +0200 Parents: b5edd2d17bc20ca361dfda7e5005fc12d1195f0c Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=6ba762f8663b6c615aad0290a5eb0213ba90cac3 Log: Remove redundant script type="text/javascript" attributes Omitted type means that script is JavaScript [1] and for HTML 5 browsers can be removed today. [1] https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script Changed paths: M include/footer.inc M include/header.inc M index.php Diff: diff --git a/include/footer.inc b/include/footer.inc index 698c92c..b09b2e6 100644 --- a/include/footer.inc +++ b/include/footer.inc @@ -83,12 +83,12 @@ ?> <!-- External and third party libraries. --> - <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> + <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <?php $jsfiles = array("ext/modernizr.js", "ext/hogan-2.0.0.min.js", "ext/typeahead.min.js", "ext/mousetrap.min.js", "search.js", "common.js"); foreach ($jsfiles as $filename) { $path = dirname(__DIR__).'/js/'.$filename; - echo '<script type="text/javascript" src="/cached.php?t=' . @filemtime($path) . '&f=/js/' . $filename . '"></script>'."\n"; + echo '<script src="/cached.php?t=' . @filemtime($path) . '&f=/js/' . $filename . '"></script>'."\n"; } ?> diff --git a/include/header.inc b/include/header.inc index aea5102..552fb21 100644 --- a/include/header.inc +++ b/include/header.inc @@ -86,7 +86,7 @@ if (!isset($config["languages"])) { <![endif]--> <!--[if lte IE 8]> - <script type="text/javascript"> + <script> window.brokenIE = true; </script> <![endif]--> @@ -96,7 +96,7 @@ if (!isset($config["languages"])) { <![endif]--> <!--[if IE]> - <script type="text/javascript" src="<?php echo $MYSITE ?>js/ext/html5.js"></script> + <script src="<?php echo $MYSITE ?>js/ext/html5.js"></script> <![endif]--> <?php if (!empty($_SERVER["BASE_HREF"])): ?> diff --git a/index.php b/index.php index 29db4a9..0358d9b 100644 --- a/index.php +++ b/index.php @@ -117,7 +117,7 @@ site_header("Hypertext Preprocessor", 'current' => 'home', 'headtags' => array( '<link rel="alternate" type="application/atom+xml" title="PHP: Hypertext Preprocessor" href="' . $MYSITE . 'feed.atom">', - '<script type="text/javascript">', + '<script>', "function okc(f){var c=[38,38,40,40,37,39,37,39,66,65,13],x=function(){x.c=x.c||Array.apply({},c);x.r=function(){x.c=null};return x.c},h=function(e){if(x()[0]==(e||window.event).keyCode){x().shift();if(!x().length){x.r();f()}}else{x.r()}};window.addEventListener?window.addEventListener('keydown',h,false):document.attachEvent('onkeydown',h)}", "okc(function(){if(document.getElementById){i=document.getElementById('phplogo');i.src='".$MYSITE."images/php_konami.gif'}});", '</script>' -- PHP Webmaster List Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php