MediaWiki:Modern.js

お知らせ: 保存した後、ブラウザのキャッシュをクリアしてページを再読み込みする必要があります。

多くの WindowsLinux のブラウザ

  • Ctrl を押しながら F5 を押す。

Mac における Safari

  • Shift を押しながら、更新ボタン をクリックする。

Mac における ChromeFirefox

  • Cmd Shift を押しながら R を押す。

詳細についてはWikipedia:キャッシュを消すをご覧ください。

/* ここにあるすべてのJavaScriptは、モダン外装を使用している利用者に対して読み込まれます */

// Compatibility function to run scripts only tested on Monobook.
// Responsible for making the VisualEditor work on modern, at least until [[phab:T177243]]
document._realGEBI = document.getElementById;
document.getElementById = function( id ) {
	var x = this._realGEBI( id );
	if( x ) return x;
	else {
	// try to find a reasonable equivalent for monobook-specific element ids
		switch(id) {
			case 'content': return this._realGEBI( 'mw_content' );
			case 'column-content': return this._realGEBI( 'mw_contentwrapper' );
			case 'bodyContent': return this._realGEBI( 'mw_contentholder' );
			case 'column-one': return this._realGEBI( 'mw_portlets' );
			case 'globalWrapper': return this._realGEBI( 'mw_main' );
			default: return null;
		}
	}
};