| Index: trunk/phase3/skins/Standard.php |
| — | — | @@ -21,11 +21,11 @@ |
| 22 | 22 | * |
| 23 | 23 | */ |
| 24 | 24 | function getHeadScripts() { |
| 25 | | - global $wgStylePath; |
| | 25 | + global $wgStylePath, $wgJsMimeType; |
| 26 | 26 | |
| 27 | 27 | $s = parent::getHeadScripts(); |
| 28 | 28 | if ( 3 == $this->qbSetting() ) { # Floating left |
| 29 | | - $s .= "<script language='javascript' type='text/javascript' " . |
| | 29 | + $s .= "<script language='javascript' type='$wgJsMimeType' " . |
| 30 | 30 | "src='{$wgStylePath}/common/sticky.js'></script>\n"; |
| 31 | 31 | } |
| 32 | 32 | return $s; |
| Index: trunk/phase3/skins/disabled/Amethyst.pt |
| — | — | @@ -7,13 +7,13 @@ |
| 8 | 8 | <style type="text/css" media="screen,projection">/*<![CDATA[*/ @import "${stylepath}/${stylename}/main.css"; /*]]>*/</style> |
| 9 | 9 | <link rel="stylesheet" type="text/css" media="print" href="${stylepath}/common/commonPrint.css" /> |
| 10 | 10 | <!--[if IE]><style type="text/css" media="all">@import "${stylepath}/${stylename}/IEFixes.css";</style> |
| 11 | | - <script type="text/javascript" src="${stylepath}/common/IEFixes.js"></script> |
| | 11 | + <script type="${jsmimetype}" src="${stylepath}/common/IEFixes.js"></script> |
| 12 | 12 | <meta http-equiv="imagetoolbar" content="no" /><![endif]--> |
| 13 | | - <script tal:condition="jsvarurl" type="text/javascript" tal:attributes="src jsvarurl"></script> |
| 14 | | - <script type="text/javascript" src="${stylepath}/common/wikibits.js"></script> |
| | 13 | + <script tal:condition="jsvarurl" type="${jsmimetype}" tal:attributes="src jsvarurl"></script> |
| | 14 | + <script type="${jsmimetype}" src="${stylepath}/common/wikibits.js"></script> |
| 15 | 15 | <style tal:condition="usercss" type="text/css">/*<![CDATA[*/ ${usercss} /*]]>*/</style> |
| 16 | | - <script tal:condition="userjs" type="text/javascript" tal:attributes="src userjs"></script><script |
| 17 | | - tal:condition="userjsprev" type="text/javascript">/*<![CDATA[*/${userjsprev}/*]]>*/</script> |
| | 16 | + <script tal:condition="userjs" type="${jsmimetype}" tal:attributes="src userjs"></script><script |
| | 17 | + tal:condition="userjsprev" type="${jsmimetype}">/*<![CDATA[*/${userjsprev}/*]]>*/</script> |
| 18 | 18 | </head> |
| 19 | 19 | <body tal:attributes="ondblclick body-ondblclick|default; class nsclass|default"> |
| 20 | 20 | <div id="globalWrapper"> |
| — | — | @@ -59,7 +59,7 @@ |
| 60 | 60 | <div class="portlet" id="p-logo"> |
| 61 | 61 | <a style="background-image: url(${logopath});" href="${nav_urls/mainpage/href}" i18n:attributes="title string:mainpage"></a> |
| 62 | 62 | </div> |
| 63 | | - <script type="text/javascript"> if (window.isMSIE55) fixalpha(); </script> |
| | 63 | + <script type="${jsmimetype}"> if (window.isMSIE55) fixalpha(); </script> |
| 64 | 64 | <div class="portlet" id="p-nav"> |
| 65 | 65 | <h5 i18n:translate="string:navigation">Navigation</h5> |
| 66 | 66 | <div class="pBody"> |
| Index: trunk/phase3/skins/disabled/HTMLDump.php |
| — | — | @@ -105,10 +105,10 @@ |
| 106 | 106 | <!--[if lt IE 5.5000]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE50Fixes.css";</style><![endif]--> |
| 107 | 107 | <!--[if IE 5.5000]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE55Fixes.css";</style><![endif]--> |
| 108 | 108 | <!--[if IE 6]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE60Fixes.css";</style><![endif]--> |
| 109 | | - <!--[if IE]><script type="text/javascript" src="<?php $this->text('stylepath') ?>/common/IEFixes.js"></script> |
| | 109 | + <!--[if IE]><script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('stylepath') ?>/common/IEFixes.js"></script> |
| 110 | 110 | <meta http-equiv="imagetoolbar" content="no" /><![endif]--> |
| 111 | | - <?php if($this->data['jsvarurl' ]) { ?><script type="text/javascript" src="<?php $this->text('jsvarurl' ) ?>"></script><?php } ?> |
| 112 | | - <script type="text/javascript" src="<?php $this->text('stylepath' ) ?>/common/wikibits.js"></script> |
| | 111 | + <?php if($this->data['jsvarurl' ]) { ?><script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('jsvarurl' ) ?>"></script><?php } ?> |
| | 112 | + <script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('stylepath' ) ?>/common/wikibits.js"></script> |
| 113 | 113 | </head> |
| 114 | 114 | <body |
| 115 | 115 | <?php if($this->data['nsclass' ]) { ?>class="<?php $this->text('nsclass') ?>"<?php } ?>> |
| — | — | @@ -148,7 +148,7 @@ |
| 149 | 149 | href="<?php echo htmlspecialchars($this->data['nav_urls']['mainpage']['href'])?>" |
| 150 | 150 | title="<?php $this->msg('mainpage') ?>"></a> |
| 151 | 151 | </div> |
| 152 | | - <script type="text/javascript"> if (window.isMSIE55) fixalpha(); </script> |
| | 152 | + <script type="<?php $this->text('jsmimetype') ?>"> if (window.isMSIE55) fixalpha(); </script> |
| 153 | 153 | <div class="portlet" id="p-nav"> |
| 154 | 154 | <h5><?php $this->msg('navigation') ?></h5> |
| 155 | 155 | <div class="pBody"> |
| Index: trunk/phase3/skins/disabled/Chick.pt |
| — | — | @@ -5,11 +5,11 @@ |
| 6 | 6 | <div tal:replace="structure headlinks"></div> |
| 7 | 7 | <title tal:content="pagetitle">Exciting xhtml slimfast</title> |
| 8 | 8 | <style type="text/css" media="screen,projection">/*<![CDATA[*/ @import "${stylepath}/${stylename}/main.css"; /*]]>*/</style> |
| 9 | | - <script tal:condition="jsvarurl" type="text/javascript" tal:attributes="src jsvarurl"></script> |
| 10 | | - <script type="text/javascript" src="${stylepath}/common/wikibits.js"></script> |
| | 9 | + <script tal:condition="jsvarurl" type="${jsmimetype}" tal:attributes="src jsvarurl"></script> |
| | 10 | + <script type="${jsmimetype}" src="${stylepath}/common/wikibits.js"></script> |
| 11 | 11 | <style tal:condition="usercss" tal:content="structure usercss" type="text/css"></style> |
| 12 | | - <script tal:condition="userjs" type="text/javascript" tal:attributes="src userjs"></script><script |
| 13 | | - tal:condition="userjsprev" tal:content="structure userjsprev" type="text/javascript"></script> |
| | 12 | + <script tal:condition="userjs" type="${jsmimetype}" tal:attributes="src userjs"></script><script |
| | 13 | + tal:condition="userjsprev" tal:content="structure userjsprev" type="${jsmimetype}"></script> |
| 14 | 14 | </head> |
| 15 | 15 | <body> |
| 16 | 16 | <a name="top"></a> |
| Index: trunk/phase3/skins/disabled/MonoBook.pt |
| — | — | @@ -9,13 +9,13 @@ |
| 10 | 10 | <!--[if lt IE 5.5000]><style type="text/css"> @import "${stylepath}/${stylename}/IE50Fixes.css"; </style><![endif]--> |
| 11 | 11 | <!--[if IE 5.5000]><style type="text/css"> @import "${stylepath}/${stylename}/IE55Fixes.css"; </style><![endif]--> |
| 12 | 12 | <!--[if IE 6]><style type="text/css"> @import "${stylepath}/${stylename}/IE60Fixes.css"; </style><![endif]--> |
| 13 | | - <!--[if IE]><script type="text/javascript" src="${stylepath}/common/IEFixes.js"></script> |
| | 13 | + <!--[if IE]><script type="${jsmimetype}" src="${stylepath}/common/IEFixes.js"></script> |
| 14 | 14 | <meta http-equiv="imagetoolbar" content="no" /><![endif]--> |
| 15 | | - <script tal:condition="jsvarurl" type="text/javascript" tal:attributes="src jsvarurl"></script> |
| 16 | | - <script type="text/javascript" src="${stylepath}/common/wikibits.js"></script> |
| | 15 | + <script tal:condition="jsvarurl" type="${jsmimetype}" tal:attributes="src jsvarurl"></script> |
| | 16 | + <script type="${jsmimetype}" src="${stylepath}/common/wikibits.js"></script> |
| 17 | 17 | <style tal:condition="usercss" tal:content="structure usercss" type="text/css"></style> |
| 18 | | - <script tal:condition="userjs" type="text/javascript" tal:attributes="src userjs"></script><script |
| 19 | | - tal:condition="userjsprev" tal:content="structure userjsprev" type="text/javascript"></script> |
| | 18 | + <script tal:condition="userjs" type="${jsmimetype}" tal:attributes="src userjs"></script><script |
| | 19 | + tal:condition="userjsprev" tal:content="structure userjsprev" type="${jsmimetype}"></script> |
| 20 | 20 | </head> |
| 21 | 21 | <body tal:attributes="ondblclick body_ondblclick|default; class nsclass|default"> |
| 22 | 22 | <div id="globalWrapper"> |
| — | — | @@ -61,7 +61,7 @@ |
| 62 | 62 | <div class="portlet" id="p-logo"> |
| 63 | 63 | <a style="background-image: url(${logopath});" href="${nav_urls/mainpage/href}" i18n:attributes="title string:mainpage"></a> |
| 64 | 64 | </div> |
| 65 | | - <script type="text/javascript"> if (window.isMSIE55) fixalpha(); </script> |
| | 65 | + <script type="${jsmimetype}"> if (window.isMSIE55) fixalpha(); </script> |
| 66 | 66 | <div class="portlet" id="p-nav"> |
| 67 | 67 | <h5 i18n:translate="string:navigation">Navigation</h5> |
| 68 | 68 | <div class="pBody"> |
| Index: trunk/phase3/skins/disabled/WikimediaWiki.pt |
| — | — | @@ -7,13 +7,13 @@ |
| 8 | 8 | <style type="text/css" media="screen,projection">/*<![CDATA[*/ @import "${stylepath}/${stylename}/main.css"; /*]]>*/</style> |
| 9 | 9 | <link rel="stylesheet" type="text/css" media="print" href="${stylepath}/common/commonPrint.css" /> |
| 10 | 10 | <!--[if IE]><style type="text/css" media="all">@import "${stylepath}/${stylename}/common/IEFixes.css";</style> |
| 11 | | - <script type="text/javascript" src="${stylepath}/IEFixes.js"></script> |
| | 11 | + <script type="${jsmimetype}" src="${stylepath}/IEFixes.js"></script> |
| 12 | 12 | <meta http-equiv="imagetoolbar" content="no" /><![endif]--> |
| 13 | | - <script tal:condition="jsvarurl" type="text/javascript" tal:attributes="src jsvarurl"></script> |
| 14 | | - <script type="text/javascript" src="${stylepath}/common/wikibits.js"></script> |
| | 13 | + <script tal:condition="jsvarurl" type="${jsmimetype}" tal:attributes="src jsvarurl"></script> |
| | 14 | + <script type="${jsmimetype}" src="${stylepath}/common/wikibits.js"></script> |
| 15 | 15 | <style tal:condition="usercss" type="text/css">/*<![CDATA[*/ ${usercss} /*]]>*/</style> |
| 16 | | - <script tal:condition="userjs" type="text/javascript" tal:attributes="src userjs"></script><script |
| 17 | | - tal:condition="userjsprev" type="text/javascript">/*<![CDATA[*/${userjsprev}/*]]>*/</script> |
| | 16 | + <script tal:condition="userjs" type="${jsmimetype}" tal:attributes="src userjs"></script><script |
| | 17 | + tal:condition="userjsprev" type="${jsmimetype}">/*<![CDATA[*/${userjsprev}/*]]>*/</script> |
| 18 | 18 | </head> |
| 19 | 19 | <body tal:attributes="ondblclick body-ondblclick|default; class nsclass|default"> |
| 20 | 20 | <div id="globalWrapper"> |
| — | — | @@ -59,7 +59,7 @@ |
| 60 | 60 | <div class="portlet" id="p-logo"> |
| 61 | 61 | <a style="background-image: url(${logopath});" href="${nav_urls/mainpage/href}" i18n:attributes="title string:mainpage"></a> |
| 62 | 62 | </div> |
| 63 | | - <script type="text/javascript"> if (window.isMSIE55) fixalpha(); </script> |
| | 63 | + <script type="${jsmimetype}"> if (window.isMSIE55) fixalpha(); </script> |
| 64 | 64 | <div class="portlet" id="p-nav"> |
| 65 | 65 | <h5 i18n:translate="string:navigation">Navigation</h5> |
| 66 | 66 | <div class="pBody"> |
| Index: trunk/phase3/skins/MonoBook.php |
| — | — | @@ -61,13 +61,13 @@ |
| 62 | 62 | <!--[if lt IE 5.5000]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE50Fixes.css";</style><![endif]--> |
| 63 | 63 | <!--[if IE 5.5000]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE55Fixes.css";</style><![endif]--> |
| 64 | 64 | <!--[if IE 6]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE60Fixes.css";</style><![endif]--> |
| 65 | | - <!--[if IE]><script type="text/javascript" src="<?php $this->text('stylepath') ?>/common/IEFixes.js"></script> |
| | 65 | + <!--[if IE]><script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('stylepath') ?>/common/IEFixes.js"></script> |
| 66 | 66 | <meta http-equiv="imagetoolbar" content="no" /><![endif]--> |
| 67 | | - <?php if($this->data['jsvarurl' ]) { ?><script type="text/javascript" src="<?php $this->text('jsvarurl' ) ?>"></script><?php } ?> |
| 68 | | - <script type="text/javascript" src="<?php $this->text('stylepath' ) ?>/common/wikibits.js"></script> |
| | 67 | + <?php if($this->data['jsvarurl' ]) { ?><script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('jsvarurl' ) ?>"></script><?php } ?> |
| | 68 | + <script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('stylepath' ) ?>/common/wikibits.js"></script> |
| 69 | 69 | <?php if($this->data['usercss' ]) { ?><style type="text/css"><?php $this->html('usercss' ) ?></style><?php } ?> |
| 70 | | - <?php if($this->data['userjs' ]) { ?><script type="text/javascript" src="<?php $this->text('userjs' ) ?>"></script><?php } ?> |
| 71 | | - <?php if($this->data['userjsprev']) { ?><script type="text/javascript"><?php $this->html('userjsprev') ?></script><?php } ?> |
| | 70 | + <?php if($this->data['userjs' ]) { ?><script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('userjs' ) ?>"></script><?php } ?> |
| | 71 | + <?php if($this->data['userjsprev']) { ?><script type="<?php $this->text('jsmimetype') ?>"><?php $this->html('userjsprev') ?></script><?php } ?> |
| 72 | 72 | </head> |
| 73 | 73 | <body <?php if($this->data['body_ondblclick']) { ?>ondblclick="<?php $this->text('body_ondblclick') ?>"<?php } ?> |
| 74 | 74 | <?php if($this->data['body_onload' ]) { ?>onload="<?php $this->text('body_onload') ?>"<?php } ?> |
| — | — | @@ -122,7 +122,7 @@ |
| 123 | 123 | href="<?php echo htmlspecialchars($this->data['nav_urls']['mainpage']['href'])?>" |
| 124 | 124 | title="<?php $this->msg('mainpage') ?>"></a> |
| 125 | 125 | </div> |
| 126 | | - <script type="text/javascript"> if (window.isMSIE55) fixalpha(); </script> |
| | 126 | + <script type="<?php $this->text('jsmimetype') ?>"> if (window.isMSIE55) fixalpha(); </script> |
| 127 | 127 | <div class="portlet" id="p-nav"> |
| 128 | 128 | <h5><?php $this->msg('navigation') ?></h5> |
| 129 | 129 | <div class="pBody"> |
| Index: trunk/phase3/includes/Linker.php |
| — | — | @@ -718,11 +718,12 @@ |
| 719 | 719 | |
| 720 | 720 | /** @todo document */ |
| 721 | 721 | function tocList($toc) { |
| | 722 | + global $wgJsMimeType; |
| 722 | 723 | return "<table id='toc' class='toc'><tr><td>" |
| 723 | 724 | . "<div id='toctitle'><h2>" . wfMsgForContent('toc') . "</h2></div>\n" |
| 724 | 725 | . $toc |
| 725 | 726 | . "</ul>\n</td></tr></table>\n" |
| 726 | | - . '<script type="text/javascript">' |
| | 727 | + . '<script type="'.$wgJsMimeType.'">' |
| 727 | 728 | . ' if (window.showTocToggle) {' |
| 728 | 729 | . ' var tocShowText = "' . wfEscapeJsString( wfMsgForContent('showtoc') ) . '";' |
| 729 | 730 | . ' var tocHideText = "' . wfEscapeJsString( wfMsgForContent('hidetoc') ) . '";' |
| Index: trunk/phase3/includes/EditPage.php |
| — | — | @@ -628,7 +628,8 @@ |
| 629 | 629 | * it will fall through to the normal form submission method. |
| 630 | 630 | */ |
| 631 | 631 | if( $wgLivePreview ) { |
| 632 | | - $wgOut->addHTML( '<script type="text/javascript" src="' . |
| | 632 | + global $wgJsMimeType; |
| | 633 | + $wgOut->addHTML( '<script type="'.$wgJsMimeType.'" src="' . |
| 633 | 634 | htmlspecialchars( $wgStylePath . '/common/preview.js' ) . |
| 634 | 635 | '"></script>' . "\n" ); |
| 635 | 636 | $liveAction = $wgTitle->getLocalUrl( 'action=submit&wpPreview=true&live=true' ); |
| — | — | @@ -923,7 +924,7 @@ |
| 924 | 925 | * The necessary JavaScript code can be found in style/wikibits.js. |
| 925 | 926 | */ |
| 926 | 927 | function getEditToolbar() { |
| 927 | | - global $wgStylePath, $wgLang, $wgMimeType; |
| | 928 | + global $wgStylePath, $wgLang, $wgMimeType, $wgJsMimeType; |
| 928 | 929 | |
| 929 | 930 | /** |
| 930 | 931 | * toolarray an array of arrays which each include the filename of |
| — | — | @@ -1015,7 +1016,7 @@ |
| 1016 | 1017 | 'key' => 'R' |
| 1017 | 1018 | ) |
| 1018 | 1019 | ); |
| 1019 | | - $toolbar ="<script type='text/javascript'>\n/*<![CDATA[*/\n"; |
| | 1020 | + $toolbar ="<script type='$wgJsMimeType'>\n/*<![CDATA[*/\n"; |
| 1020 | 1021 | |
| 1021 | 1022 | $toolbar.="document.writeln(\"<div id='toolbar'>\");\n"; |
| 1022 | 1023 | foreach($toolarray as $tool) { |
| Index: trunk/phase3/includes/RawPage.php |
| — | — | @@ -20,8 +20,8 @@ |
| 21 | 21 | class RawPage { |
| 22 | 22 | |
| 23 | 23 | function RawPage( $article ) { |
| 24 | | - global $wgRequest, $wgInputEncoding, $wgSquidMaxage; |
| 25 | | - $allowedCTypes = array('text/x-wiki', 'text/javascript', 'text/css', 'application/x-zope-edit'); |
| | 24 | + global $wgRequest, $wgInputEncoding, $wgSquidMaxage, $wgJsMimeType; |
| | 25 | + $allowedCTypes = array('text/x-wiki', $wgJsMimeType, 'text/css', 'application/x-zope-edit'); |
| 26 | 26 | $this->mArticle =& $article; |
| 27 | 27 | $this->mTitle =& $article->mTitle; |
| 28 | 28 | |
| — | — | @@ -38,7 +38,7 @@ |
| 39 | 39 | } else if ($gen == 'js') { |
| 40 | 40 | $this->mGen = $gen; |
| 41 | 41 | if($smaxage == '') $smaxage = $wgSquidMaxage; |
| 42 | | - if($ctype == '') $ctype = 'text/javascript'; |
| | 42 | + if($ctype == '') $ctype = $wgJsMimeType; |
| 43 | 43 | } else { |
| 44 | 44 | $this->mGen = false; |
| 45 | 45 | } |
| Index: trunk/phase3/includes/SkinTemplate.php |
| — | — | @@ -145,7 +145,7 @@ |
| 146 | 146 | function outputPage( &$out ) { |
| 147 | 147 | global $wgTitle, $wgArticle, $wgUser, $wgLang, $wgContLang, $wgOut; |
| 148 | 148 | global $wgScript, $wgStylePath, $wgLanguageCode, $wgContLanguageCode, $wgUseNewInterlanguage; |
| 149 | | - global $wgMimeType, $wgOutputEncoding, $wgUseDatabaseMessages, $wgRequest; |
| | 149 | + global $wgMimeType, $wgJsMimeType, $wgOutputEncoding, $wgUseDatabaseMessages, $wgRequest; |
| 150 | 150 | global $wgDisableCounters, $wgLogo, $action, $wgFeedClasses; |
| 151 | 151 | global $wgMaxCredits, $wgShowCreditsIfMax; |
| 152 | 152 | global $wgPageShowWatchingUsers; |
| — | — | @@ -218,6 +218,7 @@ |
| 219 | 219 | $tpl->set( 'feeds', false ); |
| 220 | 220 | } |
| 221 | 221 | $tpl->setRef( 'mimetype', $wgMimeType ); |
| | 222 | + $tpl->setRef( 'jsmimetype', $wgJsMimeType ); |
| 222 | 223 | $tpl->setRef( 'charset', $wgOutputEncoding ); |
| 223 | 224 | $tpl->set( 'headlinks', $out->getHeadLinks() ); |
| 224 | 225 | $tpl->setRef( 'wgScript', $wgScript ); |
| — | — | @@ -898,7 +899,7 @@ |
| 899 | 900 | $fname = 'SkinTemplate::setupUserJs'; |
| 900 | 901 | wfProfileIn( $fname ); |
| 901 | 902 | |
| 902 | | - global $wgRequest, $wgAllowUserJs; |
| | 903 | + global $wgRequest, $wgAllowUserJs, $wgJsMimeType; |
| 903 | 904 | $action = $wgRequest->getText('action'); |
| 904 | 905 | |
| 905 | 906 | if( $wgAllowUserJs && $this->loggedin ) { |
| — | — | @@ -906,7 +907,7 @@ |
| 907 | 908 | # XXX: additional security check/prompt? |
| 908 | 909 | $this->userjsprev = '/*<![CDATA[*/ ' . $wgRequest->getText('wpTextbox1') . ' /*]]>*/'; |
| 909 | 910 | } else { |
| 910 | | - $this->userjs = $this->makeUrl($this->userpage.'/'.$this->skinname.'.js', 'action=raw&ctype=text/javascript&dontcountme=s'); |
| | 911 | + $this->userjs = $this->makeUrl($this->userpage.'/'.$this->skinname.'.js', 'action=raw&ctype='.$wgJsMimeType.'&dontcountme=s'); |
| 911 | 912 | } |
| 912 | 913 | } |
| 913 | 914 | wfProfileOut( $fname ); |
| Index: trunk/phase3/includes/DefaultSettings.php |
| — | — | @@ -374,6 +374,7 @@ |
| 375 | 375 | $wgLegacyEncoding = false; |
| 376 | 376 | |
| 377 | 377 | $wgMimeType = 'text/html'; |
| | 378 | +$wgJsMimeType = 'text/javascript'; |
| 378 | 379 | $wgDocType = '-//W3C//DTD XHTML 1.0 Transitional//EN'; |
| 379 | 380 | $wgDTD = 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'; |
| 380 | 381 | |
| Index: trunk/phase3/includes/Skin.php |
| — | — | @@ -172,14 +172,14 @@ |
| 173 | 173 | } |
| 174 | 174 | |
| 175 | 175 | function getHeadScripts() { |
| 176 | | - global $wgStylePath, $wgUser, $wgContLang, $wgAllowUserJs; |
| 177 | | - $r = "<script type=\"text/javascript\" src=\"{$wgStylePath}/common/wikibits.js\"></script>\n"; |
| | 176 | + global $wgStylePath, $wgUser, $wgContLang, $wgAllowUserJs, $wgJsMimeType; |
| | 177 | + $r = "<script type=\"{$wgJsMimeType}\" src=\"{$wgStylePath}/common/wikibits.js\"></script>\n"; |
| 178 | 178 | if( $wgAllowUserJs && $wgUser->isLoggedIn() ) { |
| 179 | 179 | $userpage = $wgUser->getUserPage(); |
| 180 | 180 | $userjs = htmlspecialchars( $this->makeUrl( |
| 181 | 181 | $userpage->getPrefixedText().'/'.$this->getSkinName().'.js', |
| 182 | | - 'action=raw&ctype=text/javascript')); |
| 183 | | - $r .= '<script type="text/javascript" src="'.$userjs."\"></script>\n"; |
| | 182 | + 'action=raw&ctype='.$wgJsMimeType)); |
| | 183 | + $r .= '<script type="'.$wgJsMimeType.'" src="'.$userjs."\"></script>\n"; |
| 184 | 184 | } |
| 185 | 185 | return $r; |
| 186 | 186 | } |
| Index: trunk/phase3/RELEASE-NOTES |
| — | — | @@ -147,6 +147,7 @@ |
| 148 | 148 | * (bug 1739) A new magicword, {{REVISIONID}} give you the article or diff database |
| 149 | 149 | revision id, useful for proper citation. |
| 150 | 150 | * (bug 1998) Updated the Russian translation. |
| | 151 | +* (bug 2064) Configurable JavaScript mimetype with $wgJsMimeType |
| 151 | 152 | * It's now possible to invert the namespace selection at Special:Allpages and Special:Contributions |
| 152 | 153 | * No longer using sorbs.net to check for open proxies by default. |
| 153 | 154 | * What was $wgDisableUploads is now $wgEnableUploads, and should be set to true if one wishes to enable uploads. |