User:1108-Kiju/global.js

mw.loader.load("https://dev.miraheze.org/wiki/MediaWiki:Twinkle.js?action=raw&ctype=text/javascript"); mw.loader.load('https://ja.wikipedia.org/w/index.php?title=MediaWiki:Gadget-ForkAPage.js&action=raw&ctype=text/javascript'); mw.loader.load('//commons.wikimedia.org/w/index.php?title=MediaWiki:Gadget-HotCat.js&action=raw&ctype=text/javascript'); mw.loader.load('//ja.wikipedia.org/w/index.php?title=MediaWiki:Gadget-popups.js&action=raw&ctype=text/javascript'); mw.loader.load('//ja.wikipedia.org/w/index.php?title=MediaWiki:Gadget-edittop.js&action=raw&ctype=text/javascript'); mw.loader.load('//japlant.miraheze.org/w/index.php?title=User:1108-Kiju/ca.js&action=raw&ctype=text/javascript');

$("#pt-betafeatures").remove; $("#pt-darkmode-link").remove;

$( function {  $( '#mw-panel' ).prepend( $( ' ' ).attr( 'id', 'my-sidebar' ).append(     $( '' ).append( $( '' ).append(         $( '' ).attr( 'href', 'https://meta.miraheze.org/wiki/Special:CentralAuth').text( 'CentralAuth' )        ) )   )  ); } ); mw.loader.load("//en.wikipedia.org/w/index.php?title=User:Enterprisey/diff-permalink.js&action=raw&ctype=text/javascript");

if ( typeof summaryEnterRejectDisable === 'undefined' || summaryEnterRejectDisable == false ) {

$( "#wpSummary" ).keypress( function( e ) {    if ( e.keyCode == 13 )  {    e.preventDefault;     }    }); $( "#wpSave" ).css( "font-weight", "normal" ); }

(function {

var init = function {

var content = document.querySelector('.mw-body-content'); if (!content) return; var selectors = [ 'form[method="post"] input:not([type])', 'form[method="post"] input[type=""]', 'form[method="post"] input[type="text"]', ];       /** @type {NodeListOf} */ var textbox = content.querySelectorAll(selectors.join(',')); // Get text fields in forms for HTTP POST request Array.prototype.forEach.call(textbox, function(el) {           el.addEventListener('keypress', function(e) { if (e.key === 'Enter') { e.preventDefault; }           });        });

};

if (document.readyState !== 'loading') { init; } else { document.addEventListener('DOMContentLoaded', init); }

});