]> git.joonet.de Git - adminer.git/commitdiff
Delete type="text/javascript" from <script> as it is the default in HTML5
authorJakub Vrana <jakub@vrana.cz>
Thu, 11 Jan 2018 13:10:46 +0000 (14:10 +0100)
committerJakub Vrana <jakub@vrana.cz>
Thu, 11 Jan 2018 13:13:43 +0000 (14:13 +0100)
26 files changed:
adminer/create.inc.php
adminer/database.inc.php
adminer/db.inc.php
adminer/dump.inc.php
adminer/include/adminer.inc.php
adminer/include/connect.inc.php
adminer/include/design.inc.php
adminer/include/editing.inc.php
adminer/include/functions.inc.php
adminer/plugin.php
adminer/processlist.inc.php
adminer/schema.inc.php
adminer/scheme.inc.php
adminer/select.inc.php
adminer/sql.inc.php
adminer/trigger.inc.php
adminer/user.inc.php
compile.php
editor/db.inc.php
editor/include/adminer.inc.php
plugins/edit-calendar.php
plugins/login-sqlite.php
plugins/tables-filter.php
plugins/tinymce.php
plugins/version-noverify.php
plugins/wymeditor.php

index e57290dd8162ffe3eb77840f93479556c10721fd..2b9ebb284afb68270973d9d7c3ce08c55f1c1b6c 100644 (file)
@@ -163,7 +163,7 @@ foreach ($engines as $engine) {
 <p>
 <?php if (support("columns") || $TABLE == "") { ?>
 <?php echo lang('Table name'); ?>: <input name="name" maxlength="64" value="<?php echo h($row["name"]); ?>" autocapitalize="off">
-<?php if ($TABLE == "" && !$_POST) { ?><script type='text/javascript'>focus(qs('#form')['name']);</script><?php } ?>
+<?php if ($TABLE == "" && !$_POST) { ?><script>focus(qs('#form')['name']);</script><?php } ?>
 <?php echo ($engines ? "<select name='Engine' onchange='helpClose();'" . on_help("getTarget(event).value", 1) . ">" . optionlist(array("" => "(" . lang('engine') . ")") + $engines, $row["Engine"]) . "</select>" : ""); ?>
  <?php echo ($collations && !preg_match("~sqlite|mssql~", $jush) ? html_select("Collation", array("" => "(" . lang('collation') . ")") + $collations, $row["Collation"]) : ""); ?>
  <input type="submit" value="<?php echo lang('Save'); ?>">
@@ -187,7 +187,7 @@ edit_fields($row["fields"], $collations, "TABLE", $foreign_keys, $comments);
 <p>
 <?php echo lang('Auto Increment'); ?>: <input type="number" name="Auto_increment" size="6" value="<?php echo h($row["Auto_increment"]); ?>">
 <?php echo checkbox("defaults", 1, true, lang('Default values'), "columnShow(this.checked, 5)", "jsonly"); ?>
-<?php if (!$_POST["defaults"]) { ?><script type="text/javascript">editingHideDefaults()</script><?php } ?>
+<?php if (!$_POST["defaults"]) { ?><script>editingHideDefaults()</script><?php } ?>
 <?php echo (support("comment")
        ? "<label><input type='checkbox' name='comments' value='1' class='jsonly' onclick=\"columnShow(this.checked, 6); toggle('Comment'); if (this.checked) this.form['Comment'].focus();\"" . ($comments ? " checked" : "") . ">" . lang('Comment') . "</label>"
                . ' <input name="Comment" id="Comment" value="' . h($row["Comment"]) . '" maxlength="' . ($connection->server_info >= 5.5 ? 2048 : 60) . '"' . ($comments ? '' : ' class="hidden"') . '>'
index 98349f91d08bf64393497acb8d188b98c48259c3..57a6643c64df2dc61491e2e252db6a19cf41cee4 100644 (file)
@@ -66,7 +66,7 @@ echo ($_POST["add_x"] || strpos($name, "\n")
        'mssql' => "ms187963.aspx",
 )) : "");
 ?>
-<script type='text/javascript'>focus(qs('#name'));</script>
+<script>focus(qs('#name'));</script>
 <input type="submit" value="<?php echo lang('Save'); ?>">
 <?php
 if (DB != "") {
index 36c62737df2a4f8a4b9905ab294b18c8b54e77bf..8a99310a914cda7affb47b17ded9440849bfbafb 100644 (file)
@@ -140,7 +140,7 @@ if ($adminer->homepage()) {
                                echo "</div></fieldset>\n";
                        }
                        echo "</form>\n";
-                       echo "<script type='text/javascript'>tableCheck();</script>\n";
+                       echo "<script>tableCheck();</script>\n";
                }
 
                echo '<p class="links"><a href="' . h(ME) . 'create=">' . lang('Create table') . "</a>\n";
@@ -221,7 +221,7 @@ if ($adminer->homepage()) {
                }
 
                if ($tables_list) {
-                       echo "<script type='text/javascript'>ajaxSetHtml('" . js_escape(ME) . "script=db');</script>\n";
+                       echo "<script>ajaxSetHtml('" . js_escape(ME) . "script=db');</script>\n";
                }
        }
 }
index 7af973a5094c2d22b053745e7361b3be696c8c81..0dd819a02641b28197a0d46f7e280471fb009e75 100644 (file)
@@ -189,7 +189,7 @@ if (DB != "") {
        echo $views;
 
        if ($tables_list) {
-               echo "<script type='text/javascript'>ajaxSetHtml('" . js_escape(ME) . "script=db');</script>\n";
+               echo "<script>ajaxSetHtml('" . js_escape(ME) . "script=db');</script>\n";
        }
 
 } else {
index dfcc0f07f66cee5cb0afa41df657b7279b7b5215..28293372a7a82420e808ba7b43842255740d771b 100644 (file)
@@ -94,7 +94,7 @@ class Adminer {
 <tr><th><?php echo lang('Password'); ?><td><input type="password" name="auth[password]">
 <tr><th><?php echo lang('Database'); ?><td><input name="auth[db]" value="<?php echo h($_GET["db"]); ?>" autocapitalize="off">
 </table>
-<script type="text/javascript">
+<script>
 focus(qs('#username'));
 </script>
 <?php
@@ -399,7 +399,7 @@ focus(qs('#username'));
                echo "<fieldset><legend>" . lang('Action') . "</legend><div>";
                echo "<input type='submit' value='" . lang('Select') . "'>";
                echo " <span id='noindex' title='" . lang('Full table scan') . "'></span>";
-               echo "<script type='text/javascript'>\n";
+               echo "<script>\n";
                echo "var indexColumns = ";
                $columns = array();
                foreach ($indexes as $index) {
@@ -869,15 +869,15 @@ focus(qs('#username'));
                                $tables = table_status('', true);
                        }
                        ?>
-<script type="text/javascript" src="../externals/jush/modules/jush.js"></script>
-<script type="text/javascript" src="../externals/jush/modules/jush-textarea.js"></script>
-<script type="text/javascript" src="../externals/jush/modules/jush-txt.js"></script>
-<script type="text/javascript" src="../externals/jush/modules/jush-js.js"></script>
+<script src="../externals/jush/modules/jush.js"></script>
+<script src="../externals/jush/modules/jush-textarea.js"></script>
+<script src="../externals/jush/modules/jush-txt.js"></script>
+<script src="../externals/jush/modules/jush-js.js"></script>
 <?php
                        if (support("sql")) {
                                ?>
-<script type="text/javascript" src="../externals/jush/modules/jush-<?php echo $jush; ?>.js"></script>
-<script type="text/javascript">
+<script src="../externals/jush/modules/jush-<?php echo $jush; ?>.js"></script>
+<script>
 <?php
                                if ($tables) {
                                        $links = array();
index 3efa9ed385400583e92148885e86751559a916a6..061475a1ef2434665156ede42f50c08825e7ba0e 100644 (file)
@@ -61,7 +61,7 @@ function connect_error() {
                                        . "</div></fieldset>\n"
                                : ""
                        );
-                       echo "<script type='text/javascript'>tableCheck();</script>\n";
+                       echo "<script>tableCheck();</script>\n";
                        echo "<input type='hidden' name='token' value='$token'>\n";
                        echo "</form>\n";
                }
index 17263fd6774b397f464a031737ee6e8ff5e8fb02..291273c881d1f5b1f12057fda33f0137e6e0b088 100644 (file)
@@ -19,13 +19,12 @@ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") {
 <!DOCTYPE html>
 <html lang="<?php echo $LANG; ?>" dir="<?php echo lang('ltr'); ?>">
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<meta http-equiv="Content-Script-Type" content="text/javascript">
 <meta name="robots" content="noindex">
 <meta name="referrer" content="origin-when-crossorigin">
 <title><?php echo $title_page; ?></title>
 <link rel="stylesheet" type="text/css" href="../adminer/static/default.css">
-<script type="text/javascript" src="../adminer/static/functions.js"></script>
-<script type="text/javascript" src="static/editing.js"></script>
+<script src="../adminer/static/functions.js"></script>
+<script src="static/editing.js"></script>
 <?php if ($adminer->head()) { ?>
 <link rel="shortcut icon" type="image/x-icon" href="../adminer/static/favicon.ico">
 <link rel="apple-touch-icon" href="../adminer/static/favicon.ico">
@@ -35,7 +34,7 @@ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") {
 <?php } ?>
 
 <body class="<?php echo lang('ltr'); ?> nojs" onkeydown="bodyKeydown(event);" onclick="bodyClick(event);"<?php echo (isset($_COOKIE["adminer_version"]) ? "" : " onload=\"verifyVersion('$VERSION');\""); ?>>
-<script type="text/javascript">
+<script>
 document.body.className = document.body.className.replace(/ nojs/, ' js');
 var offlineMessage = '<?php echo js_escape(lang('You are offline.')); ?>';
 </script>
@@ -132,6 +131,6 @@ function page_footer($missing = "") {
 <div id="menu">
 <?php $adminer->navigation($missing); ?>
 </div>
-<script type="text/javascript">setupSubmitHighlight(document);</script>
+<script>setupSubmitHighlight(document);</script>
 <?php
 }
index 715d7f3e3bc2567582c862a8b9d7f8b3dc968841..2d5545f57bc5690b5b4834532088de462d601021 100644 (file)
@@ -253,7 +253,7 @@ function edit_fields($fields, $collations, $type = "TABLE", $foreign_keys = arra
 <td id="label-default"><?php echo lang('Default value'); ?>
 <?php echo (support("comment") ? "<td id='label-comment'" . ($comments ? "" : " class='hidden'") . ">" . lang('Comment') : ""); ?>
 <?php } ?>
-<td><?php echo "<input type='image' class='icon' name='add[" . (support("move_col") ? 0 : count($fields)) . "]' src='../adminer/static/plus.gif' alt='+' title='" . lang('Add next') . "'>"; ?><script type="text/javascript">row_count = <?php echo count($fields); ?>;</script>
+<td><?php echo "<input type='image' class='icon' name='add[" . (support("move_col") ? 0 : count($fields)) . "]' src='../adminer/static/plus.gif' alt='+' title='" . lang('Add next') . "'>"; ?><script>row_count = <?php echo count($fields); ?>;</script>
 </thead>
 <tbody onkeydown="return editingKeydown(event);">
 <?php
index 81951fae07755b649dbfd5f2c6cf8c0536407819..8eb7f8521bf2729e6048f3289b88ddaf1a8c0b4c 100644 (file)
@@ -1215,7 +1215,7 @@ function slow_query($query) {
        if (support("kill") && is_object($connection2 = connect()) && ($db == "" || $connection2->select_db($db))) {
                $kill = $connection2->result(connection_id()); // MySQL and MySQLi can use thread_id but it's not in PDO_MySQL
                ?>
-<script type="text/javascript">
+<script>
 var timeout = setTimeout(function () {
        ajax('<?php echo js_escape(ME); ?>script=kill', function () {
        }, 'token=<?php echo $token; ?>&kill=<?php echo $kill; ?>');
@@ -1229,7 +1229,7 @@ var timeout = setTimeout(function () {
        flush();
        $return = @get_key_vals($query, $connection2, $timeout); // @ - may be killed
        if ($connection2) {
-               echo "<script type='text/javascript'>clearTimeout(timeout);</script>\n";
+               echo "<script>clearTimeout(timeout);</script>\n";
                ob_flush();
                flush();
        }
@@ -1383,7 +1383,7 @@ function edit_form($TABLE, $fields, $row, $update) {
                }
        }
        echo ($update ? "<input type='submit' name='delete' value='" . lang('Delete') . "'" . confirm() . ">\n"
-               : ($_POST || !$fields ? "" : "<script type='text/javascript'>focus(qsa('td', qs('#form'))[1].firstChild);</script>\n")
+               : ($_POST || !$fields ? "" : "<script>focus(qsa('td', qs('#form'))[1].firstChild);</script>\n")
        );
        if (isset($_GET["select"])) {
                hidden_fields(array("check" => (array) $_POST["check"], "clone" => $_POST["clone"], "all" => $_POST["all"]));
index d948600f19ba3cc8630d0009ac5f6cb5d55b5d04..7267f55e3d9318e9bf815fb7ac1aacb824149759 100644 (file)
@@ -17,7 +17,7 @@ function adminer_object() {
                new AdminerDumpXml,
                new AdminerDumpAlter,
                //~ new AdminerSqlLog("past-" . rtrim(`git describe --tags --abbrev=0`) . ".sql"),
-               //~ new AdminerEditCalendar("<script type='text/javascript' src='../externals/jquery-ui/jquery-1.4.4.js'></script>\n<script type='text/javascript' src='../externals/jquery-ui/ui/jquery.ui.core.js'></script>\n<script type='text/javascript' src='../externals/jquery-ui/ui/jquery.ui.widget.js'></script>\n<script type='text/javascript' src='../externals/jquery-ui/ui/jquery.ui.datepicker.js'></script>\n<script type='text/javascript' src='../externals/jquery-ui/ui/jquery.ui.mouse.js'></script>\n<script type='text/javascript' src='../externals/jquery-ui/ui/jquery.ui.slider.js'></script>\n<script type='text/javascript' src='../externals/jquery-timepicker/jquery-ui-timepicker-addon.js'></script>\n<link rel='stylesheet' href='../externals/jquery-ui/themes/base/jquery.ui.all.css'>\n<style type='text/css'>\n.ui-timepicker-div .ui-widget-header { margin-bottom: 8px; }\n.ui-timepicker-div dl { text-align: left; }\n.ui-timepicker-div dl dt { height: 25px; }\n.ui-timepicker-div dl dd { margin: -25px 0 10px 65px; }\n.ui-timepicker-div td { font-size: 90%; }\n</style>\n", "../externals/jquery-ui/ui/i18n/jquery.ui.datepicker-%s.js"),
+               //~ new AdminerEditCalendar("<script src='../externals/jquery-ui/jquery-1.4.4.js'></script>\n<script src='../externals/jquery-ui/ui/jquery.ui.core.js'></script>\n<script src='../externals/jquery-ui/ui/jquery.ui.widget.js'></script>\n<script src='../externals/jquery-ui/ui/jquery.ui.datepicker.js'></script>\n<script src='../externals/jquery-ui/ui/jquery.ui.mouse.js'></script>\n<script src='../externals/jquery-ui/ui/jquery.ui.slider.js'></script>\n<script src='../externals/jquery-timepicker/jquery-ui-timepicker-addon.js'></script>\n<link rel='stylesheet' href='../externals/jquery-ui/themes/base/jquery.ui.all.css'>\n<style type='text/css'>\n.ui-timepicker-div .ui-widget-header { margin-bottom: 8px; }\n.ui-timepicker-div dl { text-align: left; }\n.ui-timepicker-div dl dt { height: 25px; }\n.ui-timepicker-div dl dd { margin: -25px 0 10px 65px; }\n.ui-timepicker-div td { font-size: 90%; }\n</style>\n", "../externals/jquery-ui/ui/i18n/jquery.ui.datepicker-%s.js"),
                //~ new AdminerTinymce("../externals/tinymce/jscripts/tiny_mce/tiny_mce_dev.js"),
                //~ new AdminerWymeditor(array("../externals/wymeditor/src/jquery/jquery.js", "../externals/wymeditor/src/wymeditor/jquery.wymeditor.js", "../externals/wymeditor/src/wymeditor/jquery.wymeditor.explorer.js", "../externals/wymeditor/src/wymeditor/jquery.wymeditor.mozilla.js", "../externals/wymeditor/src/wymeditor/jquery.wymeditor.opera.js", "../externals/wymeditor/src/wymeditor/jquery.wymeditor.safari.js")),
                new AdminerFileUpload(""),
index 6ddeb7bc442af231c7dc1f85b6b0cd2eb90a3d54..8f8e9638a609fb0894a7702c4d7700a62a5a7301 100644 (file)
@@ -44,7 +44,7 @@ foreach (process_list() as $i => $row) {
 }
 ?>
 </table>
-<script type='text/javascript'>tableCheck();</script>
+<script>tableCheck();</script>
 <p>
 <?php
 if (support("kill")) {
index dea8a5d0b4d97130fae38c501bbf2f3ec4884004..6f58a2b46a0e59310bc0a050c3673b82c6b3f3f0 100644 (file)
@@ -49,7 +49,7 @@ foreach (table_status('', true) as $table => $table_status) {
 
 ?>
 <div id="schema" style="height: <?php echo $top; ?>em;" onselectstart="return false;">
-<script type="text/javascript">
+<script>
 var tablePos = {<?php echo implode(",", $table_pos_js) . "\n"; ?>};
 var em = qs('#schema').offsetHeight / <?php echo $top; ?>;
 document.onmousemove = schemaMousemove;
index c7d17d6e509ba88eb47e1ff64594e39410034587..fc588dd68147adc42af12bf16b9f62ec106f087a 100644 (file)
@@ -27,7 +27,7 @@ if (!$row) {
 
 <form action="" method="post">
 <p><input name="name" id="name" value="<?php echo h($row["name"]); ?>" autocapitalize="off">
-<script type='text/javascript'>focus(qs('#name'));</script>
+<script>focus(qs('#name'));</script>
 <input type="submit" value="<?php echo lang('Save'); ?>">
 <?php
 if ($_GET["ns"] != "") {
index 46f297cf438903df33b4928d8c1ae389a7252a8c..3e7afd0f902b120e0b7e530eef8a5613b2f2b402 100644 (file)
@@ -519,7 +519,7 @@ if (!$columns && support("table")) {
                                echo "</div></fieldset>\n";
                        }
 
-                       echo (!$group && $select ? "" : "<script type='text/javascript'>tableCheck();</script>\n");
+                       echo (!$group && $select ? "" : "<script>tableCheck();</script>\n");
                }
 
                if ($adminer->selectImportPrint()) {
index ddd385a2a993f6890d26c674277818e408b76a10..c51476c49310775827a8edc9a53bf32afc739350 100644 (file)
@@ -208,7 +208,7 @@ if (!isset($_GET["import"])) {
        }
        echo "<p>";
        textarea("query", $q, 20);
-       echo ($_POST ? "" : "<script type='text/javascript'>qs('textarea').focus();</script>\n");
+       echo ($_POST ? "" : "<script>qs('textarea').focus();</script>\n");
        echo "<p>$execute\n";
        echo lang('Limit rows') . ": <input type='number' name='limit' class='size' value='" . h($_POST ? $_POST["limit"] : $_GET["limit"]) . "'>\n";
        
index 42afb976c10ed0c399ec27404b5b08333eff0ad4..94b98ba936d4af700582385ee9f7cdf97faa8642 100644 (file)
@@ -40,7 +40,7 @@ page_header(($name != "" ? lang('Alter trigger') . ": " . h($name) : lang('Creat
 <tr><th><?php echo lang('Type'); ?><td><?php echo html_select("Type", $trigger_options["Type"], $row["Type"]); ?>
 </table>
 <p><?php echo lang('Name'); ?>: <input name="Trigger" value="<?php echo h($row["Trigger"]); ?>" maxlength="64" autocapitalize="off">
-<script type="text/javascript">qs('#form')['Timing'].onchange();</script>
+<script>qs('#form')['Timing'].onchange();</script>
 <p><?php textarea("Statement", $row["Statement"]); ?>
 <p>
 <input type="submit" value="<?php echo lang('Save'); ?>">
index 4d9afd9f81efd83f288e2225e8a58779e9cf2b3a..9442c4872291a9d2e1621fe98e01206fa5e394df 100644 (file)
@@ -135,7 +135,7 @@ if ($_POST) {
 <tr><th><?php echo lang('Server'); ?><td><input name="host" maxlength="60" value="<?php echo h($row["host"]); ?>" autocapitalize="off">
 <tr><th><?php echo lang('Username'); ?><td><input name="user" maxlength="16" value="<?php echo h($row["user"]); ?>" autocapitalize="off">
 <tr><th><?php echo lang('Password'); ?><td><input name="pass" id="pass" value="<?php echo h($row["pass"]); ?>">
-<?php if (!$row["hashed"]) { ?><script type="text/javascript">typePassword(qs('#pass'));</script><?php } ?>
+<?php if (!$row["hashed"]) { ?><script>typePassword(qs('#pass'));</script><?php } ?>
 <?php echo checkbox("hashed", 1, $row["hashed"], lang('Hashed'), "typePassword(this.form['pass'], this.checked);"); ?>
 </table>
 
index 9982cb7552c5c5cc9cdad4ef05b7bc4d0e5a11f1..5e635ec9b14f3db72f4eb2008420b316cd68d589 100755 (executable)
@@ -393,11 +393,11 @@ if ($_SESSION["lang"]) {
        $file = str_replace("<?php switch_lang(); ?>\n", "", $file);
        $file = str_replace('<?php echo $LANG; ?>', $_SESSION["lang"], $file);
 }
-$file = str_replace('<script type="text/javascript" src="static/editing.js"></script>' . "\n", "", $file);
-$file = str_replace('<script type="text/javascript" src="../externals/jush/modules/jush-textarea.js"></script>' . "\n", "", $file);
-$file = str_replace('<script type="text/javascript" src="../externals/jush/modules/jush-txt.js"></script>' . "\n", "", $file);
-$file = str_replace('<script type="text/javascript" src="../externals/jush/modules/jush-js.js"></script>' . "\n", "", $file);
-$file = str_replace('<script type="text/javascript" src="../externals/jush/modules/jush-<?php echo $jush; ?>.js"></script>' . "\n", "", $file);
+$file = str_replace('<script src="static/editing.js"></script>' . "\n", "", $file);
+$file = str_replace('<script src="../externals/jush/modules/jush-textarea.js"></script>' . "\n", "", $file);
+$file = str_replace('<script src="../externals/jush/modules/jush-txt.js"></script>' . "\n", "", $file);
+$file = str_replace('<script src="../externals/jush/modules/jush-js.js"></script>' . "\n", "", $file);
+$file = str_replace('<script src="../externals/jush/modules/jush-<?php echo $jush; ?>.js"></script>' . "\n", "", $file);
 $file = str_replace('<link rel="stylesheet" type="text/css" href="../externals/jush/jush.css">' . "\n", "", $file);
 $file = preg_replace_callback("~compile_file\\('([^']+)'(?:, '([^']*)')?\\)~", 'compile_file', $file); // integrate static files
 $replace = 'h(preg_replace("~\\\\\\\\?.*~", "", ME)) . "?file=\\1&amp;version=' . $VERSION . ($driver ? '&amp;driver=' . $driver : '');
index a3349601cd0928a36edb4211e1a98ca167086463..352880e96ff5b55a32061ef840e3c4d0bc24e976 100644 (file)
@@ -21,6 +21,6 @@ if ($adminer->homepage()) {
        }
        
        echo "</table>\n";
-       echo "<script type='text/javascript'>tableCheck();</script>\n";
+       echo "<script>tableCheck();</script>\n";
        echo "</form>\n";
 }
index e0dd13833635ce9b93e4bf1b069a4179ae8fe8ee..0416dfa468090579f374335e084692d894455790 100644 (file)
@@ -58,7 +58,7 @@ class Adminer {
 <tr><th><?php echo lang('Username'); ?><td><input type="hidden" name="auth[driver]" value="server"><input name="auth[username]" id="username" value="<?php echo h($_GET["username"]); ?>" autocapitalize="off">
 <tr><th><?php echo lang('Password'); ?><td><input type="password" name="auth[password]">
 </table>
-<script type="text/javascript">
+<script>
 focus(qs('#username'));
 </script>
 <?php
index c485af3d76d5d403538b64abe59e6bbd58fad035..f4eca5156234282066f6a7ed39ea756cdabde4b5 100644 (file)
@@ -16,7 +16,7 @@ class AdminerEditCalendar {
        * @param string text to append before first calendar usage
        * @param string path to language file, %s stands for language code
        */
-       function __construct($prepend = "<script type='text/javascript' src='jquery-ui/jquery.js'></script>\n<script type='text/javascript' src='jquery-ui/jquery-ui.js'></script>\n<script type='text/javascript' src='jquery-ui/jquery-ui-timepicker-addon.js'></script>\n<link rel='stylesheet' type='text/css' href='jquery-ui/jquery-ui.css'>\n", $langPath = "jquery-ui/i18n/jquery.ui.datepicker-%s.js") {
+       function __construct($prepend = "<script src='jquery-ui/jquery.js'></script>\n<script src='jquery-ui/jquery-ui.js'></script>\n<script src='jquery-ui/jquery-ui-timepicker-addon.js'></script>\n<link rel='stylesheet' type='text/css' href='jquery-ui/jquery-ui.css'>\n", $langPath = "jquery-ui/i18n/jquery.ui.datepicker-%s.js") {
                $this->prepend = $prepend;
                $this->langPath = $langPath;
        }
@@ -27,8 +27,8 @@ class AdminerEditCalendar {
                        $lang = get_lang();
                        $lang = ($lang == "zh" ? "zh-CN" : ($lang == "zh-tw" ? "zh-TW" : $lang));
                        if ($lang != "en" && file_exists(sprintf($this->langPath, $lang))) {
-                               printf("<script type='text/javascript' src='$this->langPath'></script>\n", $lang);
-                               echo "<script type='text/javascript'>jQuery(function () { jQuery.timepicker.setDefaults(jQuery.datepicker.regional['$lang']); });</script>\n";
+                               printf("<script src='$this->langPath'></script>\n", $lang);
+                               echo "<script>jQuery(function () { jQuery.timepicker.setDefaults(jQuery.datepicker.regional['$lang']); });</script>\n";
                        }
                }
        }
@@ -37,7 +37,7 @@ class AdminerEditCalendar {
                if (preg_match("~date|time~", $field["type"])) {
                        $dateFormat = "changeYear: true, dateFormat: 'yy-mm-dd'"; //! yy-mm-dd regional
                        $timeFormat = "showSecond: true, timeFormat: 'HH:mm:ss.lcZ', timeInput: true";
-                       return "<input id='fields-" . h($field["field"]) . "' value='" . h($value) . "'" . (@+$field["length"] ? " maxlength='" . (+$field["length"]) . "'" : "") . "$attrs><script type='text/javascript'>jQuery('#fields-" . js_escape($field["field"]) . "')."
+                       return "<input id='fields-" . h($field["field"]) . "' value='" . h($value) . "'" . (@+$field["length"] ? " maxlength='" . (+$field["length"]) . "'" : "") . "$attrs><script>jQuery('#fields-" . js_escape($field["field"]) . "')."
                                . ($field["type"] == "time" ? "timepicker({ $timeFormat })"
                                : (preg_match("~time~", $field["type"]) ? "datetimepicker({ $dateFormat, $timeFormat })"
                                : "datepicker({ $dateFormat })"
index b0e175b24d3ffaeab472ad4e71b3dc1f01f359a0..1d8bf0b849af4de5b72a2fdd739702ed3522f238 100644 (file)
@@ -14,7 +14,7 @@ class AdminerLoginSqlite {
 
        function loginForm() {
                ?>
-<script type="text/javascript">
+<script>
 addEventListener('load', function () {
        var driver = qs('name="auth[driver]"');
        if (isTag(driver, 'select')) {
index 4c14b672deb933486d6b44b1be4aeadeff6736ce..b68c23da533e9fe3de3d8d030b7bfa6b638f76b9 100644 (file)
@@ -23,7 +23,7 @@ foreach ($tables as $table => $status) {
 }
 ?>
 </ul>
-<script type="text/javascript">
+<script>
 var tablesFilterTimeout = null;
 var tablesFilterValue = '';
 
index 1bd52c7a6b37ada2d2ccb34fee2ec881621d324f..e83d22d1e7cf310e8eab078f7c7ac8976e928bb0 100644 (file)
@@ -28,8 +28,8 @@ class AdminerTinymce {
                        }
                }
                ?>
-<script type="text/javascript" src="<?php echo h($this->path); ?>"></script>
-<script type="text/javascript">
+<script src="<?php echo h($this->path); ?>"></script>
+<script>
 tinyMCE.init({
        mode: 'none',
        theme: 'advanced',
@@ -68,7 +68,7 @@ tinyMCE.init({
 
        function editInput($table, $field, $attrs, $value) {
                if (preg_match("~text~", $field["type"]) && preg_match("~_html~", $field["field"])) {
-                       return "<textarea$attrs id='fields-" . h($field["field"]) . "' rows='12' cols='50'>" . h($value) . "</textarea><script type='text/javascript'>
+                       return "<textarea$attrs id='fields-" . h($field["field"]) . "' rows='12' cols='50'>" . h($value) . "</textarea><script>
 tinyMCE.remove(tinyMCE.get('fields-" . js_escape($field["field"]) . "') || { });
 tinyMCE.execCommand('mceAddControl', true, 'fields-" . js_escape($field["field"]) . "');
 qs('#form').onsubmit = function () {
index 41593d3448577c1b9fc3d14466e3695ec7ab8735..6d3d7a9bfb7b06a35a58c5594a274383faddaa9e 100644 (file)
@@ -10,7 +10,7 @@ class AdminerVersionNoverify {
        
        function navigation($missing) {
                ?>
-<script type="text/javascript">
+<script>
 verifyVersion = function () {
 };
 </script>
index 7551924cd7ce7b428930153b91126c11b05f67aa..3dc2217dc8781b392c5513866b554f48c8c26497 100644 (file)
@@ -22,7 +22,7 @@ class AdminerWymeditor {
 
        function head() {
                foreach ($this->scripts as $script) {
-                       echo "<script type='text/javascript' src='" . h($script) . "'></script>\n";
+                       echo "<script src='" . h($script) . "'></script>\n";
                }
        }
 
@@ -55,7 +55,7 @@ class AdminerWymeditor {
                                $lang = get_lang();
                                $lang = ($lang == "zh" || $lang == "zh-tw" ? "zh_cn" : $lang);
                        }
-                       return "<textarea$attrs id='fields-" . h($field["field"]) . "' rows='12' cols='50'>" . h($value) . "</textarea><script type='text/javascript'>
+                       return "<textarea$attrs id='fields-" . h($field["field"]) . "' rows='12' cols='50'>" . h($value) . "</textarea><script>
 jQuery('#fields-" . js_escape($field["field"]) . "').wymeditor({ updateSelector: '#form [type=\"submit\"]', lang: '$lang'" . ($this->options ? ", $this->options" : "") . " });
 </script>";
                }