Merge "Add tags for undo edits"
[lhc/web/wiklou.git] / resources / src / mediawiki / mediawiki.js
index a661ae5..6a218e3 100644 (file)
                                        // Cache
                                        marker = document.querySelector( 'meta[name="ResourceLoaderDynamicStyles"]' );
                                        if ( !marker ) {
-                                               mw.log( 'Create <meta name="ResourceLoaderDynamicStyles"> dynamically' );
-                                               marker = $( '<meta>' ).attr( 'name', 'ResourceLoaderDynamicStyles' ).appendTo( 'head' )[ 0 ];
+                                               mw.log( 'Created ResourceLoaderDynamicStyles marker dynamically' );
+                                               marker = document.createElement( 'meta' );
+                                               marker.name = 'ResourceLoaderDynamicStyles';
+                                               document.head.appendChild( marker );
                                        }
                                }
                                return marker;
                                if ( nextNode && nextNode.parentNode ) {
                                        nextNode.parentNode.insertBefore( s, nextNode );
                                } else {
-                                       document.getElementsByTagName( 'head' )[ 0 ].appendChild( s );
+                                       document.head.appendChild( s );
                                }
 
                                return s;
                                                                l = document.createElement( 'link' );
                                                                l.rel = 'stylesheet';
                                                                l.href = modules;
-                                                               $( 'head' ).append( l );
+                                                               document.head.appendChild( l );
                                                                return;
                                                        }
                                                        if ( type === 'text/javascript' || type === undefined ) {
                        // If we have an exception object, log it to the warning channel to trigger
                        // proper stacktraces in browsers that support it.
                        if ( e && console.warn ) {
-                               console.warn( String( e ), e );
+                               console.warn( e );
                        }
                }
                /* eslint-enable no-console */