Index: trunk/extensions/WebFonts/resources/ext.webfonts.js |
— | — | @@ -105,7 +105,7 @@ |
106 | 106 | var base = mw.config.get( 'wgExtensionAssetsPath' ) + '/WebFonts/fonts/'; |
107 | 107 | var fontFormats = []; |
108 | 108 | var styleString = |
109 | | - "@font-face {\n" |
| 109 | + "<style type='text/css'>\n@font-face {\n" |
110 | 110 | + "\tfont-family: '"+fontFamily+"';\n"; |
111 | 111 | |
112 | 112 | if ( 'eot' in fontconfig ) { |
— | — | @@ -134,10 +134,10 @@ |
135 | 135 | } |
136 | 136 | |
137 | 137 | styleString += fontFormats.join() + ";\n" |
138 | | - styleString += "\tfont-weight: normal;\n}\n"; |
| 138 | + styleString += "\tfont-weight: normal;\n}\n</style>\n"; |
139 | 139 | |
140 | | - //inject the css to the head of the page. |
141 | | - mw.util.addCSS( styleString ); |
| 140 | + //inject the css to the head of the page. |
| 141 | + $( styleString ).appendTo( 'head' ); |
142 | 142 | }, |
143 | 143 | |
144 | 144 | /** |
Index: trunk/extensions/WebFonts/WebFonts.php |
— | — | @@ -46,7 +46,7 @@ |
47 | 47 | 'localBasePath' => $dir, |
48 | 48 | 'remoteExtPath' => 'WebFonts', |
49 | 49 | 'messages' => array( 'webfonts-load', 'webfonts-reset' ), |
50 | | - 'dependencies' => array( 'mediawiki.util', 'jquery.cookie', 'ext.webfonts.fontlist'), |
| 50 | + 'dependencies' => array( 'jquery.cookie', 'ext.webfonts.fontlist'), |
51 | 51 | ); |
52 | 52 | |
53 | 53 | $wgResourceModules['ext.webfonts.fontlist'] = array( |