Index: trunk/extensions/Wikidata/Wikidata.hooks.php |
— | — | @@ -4,20 +4,16 @@ |
5 | 5 | |
6 | 6 | public static function onBeforePageDisplay( &$out, &$skin ) { |
7 | 7 | global $wgLang, $wgScriptPath; |
8 | | - $out->addScript( "<script type='text/javascript' src='$wgScriptPath/extensions/Wikidata/OmegaWiki/suggest.js'></script>" ); |
9 | | - $out->addScript( "<script type='text/javascript' src='$wgScriptPath/extensions/Wikidata/OmegaWiki/omegawiki-ajax.js'></script>" ); |
10 | 8 | |
11 | | - if ( $wgLang->isRTL() ) { |
12 | | - $rtl = '-rtl'; |
| 9 | + $out->addScriptFile ( "{$wgScriptPath}/extensions/Wikidata/OmegaWiki/suggest.js"); |
| 10 | + $out->addScriptFile ( "{$wgScriptPath}/extensions/Wikidata/OmegaWiki/omegawiki-ajax.js"); |
13 | 11 | |
14 | | - # FIXME: Why are we including Gadget CSS here, this is Wikidata? |
15 | | - $wgOut->addHTML( '<style type="text/css">/*<![CDATA[*/ @import "/index.php?title=MediaWiki:Gadget-rtl.css&action=raw&ctype=text/css"; /*]]>*/</style>' ); |
16 | | - } else { |
17 | | - $rtl = ''; |
18 | | - } |
| 12 | + $rtl = '' ; |
| 13 | + if ( $wgLang->isRTL() ) $rtl = '-rtl'; |
19 | 14 | |
20 | | - $out->addLink( array( 'rel' => 'stylesheet', 'type' => 'text/css', 'media' => 'screen', 'href' => "$wgScriptPath/extensions/Wikidata/OmegaWiki/suggest$rtl.css" ) ); |
21 | | - $out->addLink( array( 'rel' => 'stylesheet', 'type' => 'text/css', 'media' => 'screen', 'href' => "$wgScriptPath/extensions/Wikidata/OmegaWiki/tables$rtl.css" ) ); |
| 15 | + $out->addStyle("{$wgScriptPath}/extensions/Wikidata/OmegaWiki/suggest{$rtl}.css", 'screen'); |
| 16 | + $out->addStyle("{$wgScriptPath}/extensions/Wikidata/OmegaWiki/tables{$rtl}.css", 'screen'); |
| 17 | + |
22 | 18 | return true; |
23 | 19 | } |
24 | 20 | |