MediaWiki:Modern.js
表示
お知らせ: 保存した後、ブラウザのキャッシュをクリアしてページを再読み込みする必要があります。
多くの Windows や Linux のブラウザ
- Ctrl を押しながら F5 を押す。
Mac における Safari
Mac における Chrome や Firefox
- ⌘ 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;
}
}
};