Index: trunk/extensions/WebFonts/resources/ext.webfonts.js |
— | — | @@ -108,8 +108,7 @@ |
109 | 109 | fontFormats = [], |
110 | 110 | version = fontconfig.version || "0.0", |
111 | 111 | versionSuffix = "?version=" + version + '&20111213', |
112 | | - styleString = "<style type='text/css'>" |
113 | | - + "@font-face { font-family: '"+fontFamily+"';\n", |
| 112 | + styleString = "@font-face { font-family: '"+fontFamily+"';\n", |
114 | 113 | ua = navigator.userAgent; |
115 | 114 | |
116 | 115 | if ( fontconfig.eot !== undefined ) { |
— | — | @@ -140,10 +139,8 @@ |
141 | 140 | styleString += fontFormats.join() + ";\n"; |
142 | 141 | styleString += "\tfont-weight: normal;}"; |
143 | 142 | |
144 | | - styleString += "\n</style>\n"; |
145 | 143 | // inject the css to the head of the page. |
146 | | - // mw.util.addCSS wont work with fontface, and crashes IE. |
147 | | - $( styleString ).appendTo( 'head' ); |
| 144 | + mw.util.addCSS( styleString ); |
148 | 145 | }, |
149 | 146 | |
150 | 147 | /** |