Minecraft Wiki

Minecraft 위키가 Weird Gloop으로 이사를 시작합니다. 현재는 영어 위키만 적용된 사항이며, 한국어는 추후 이사 예정이니 참고해주세요.


새로 오신 분들은 길라잡이위키 규칙을 꼭 읽어주세요.

문서 작성번역을 도와주시면 이 위키에 큰 힘이 됩니다.

READ MORE

Minecraft Wiki
Advertisement
다른 언어

참고: 설정을 저장한 후에 바뀐 점을 확인하기 위해서는 브라우저의 캐시를 새로 고쳐야 합니다.

  • 파이어폭스 / 사파리: ⇧ Shift 키를 누르면서 새로 고침을 클릭하거나, Ctrl-F5 또는 Ctrl-R을 입력 (Mac에서는 ⌘-R)
  • 구글 크롬: Ctrl-Shift-R키를 입력 (Mac에서는 ⌘-Shift-R)
  • 인터넷 익스플로러: Ctrl 키를 누르면서 새로 고침을 클릭하거나, Ctrl-F5를 입력.
  • 오페라: 메뉴 → 설정(맥의 경우 오페라 → 환경 설정)으로 이동한 다음 개인 정보 보호 및 보안 → 검색 데이터 지우기 → 캐시한 영상 및 파일을 누름.
$( function() {
'use strict';

/**
 * Add an edit button which loads the sprite editor
 *
 * If spriteaction=edit is in the URL, the editor will be loaded
 * immediately, otherwise it will wait for the button to be clicked.
 */
var editPage = $( '#sprite-editor-message' ).data( 'page' ) || null;
if ( !$( '#spritedoc' ).length && !editPage ) {
	return;
}

var $spriteEditLink;
var $spriteEditTab;
    
// Temporary: FandomDesktop-specific changes
if ( $( ".skin-fandomdesktop" ).length > 0 ) {
	var $editButton = $( '#ca-edit-side-tool' );
	if ( !$editButton.length ) {
		$editButton = $( '#ca-viewsource-side-tool' );
	}
	
	$spriteEditLink = $( '<a>' )
	    .attr( 'id', 'ca-spriteedit' )
	    .attr( 'href', mw.util.getUrl( editPage, { spriteaction: 'edit' } ) )
	    .attr( 'title', 'Edit sprite' )
	    .addClass( 'page-side-tool' )
	    .html('<svg width="24" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M4 3a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V5a2 2 0 00-2-2H4zm12 12H4l4-8 3 6 2-4 3 6z" clip-rule="evenodd"></path></svg>');
	    // It's the "Photograph" icon from Heroicons – https://heroicons.dev/
	    
	$spriteEditLink.insertAfter( $editButton );
	$spriteEditTab = $spriteEditLink;
} else {
	var $editTab = $( '#ca-edit' );
	if ( !$editTab.length ) {
		$editTab = $( '#ca-viewsource' );
	}
	$spriteEditLink = $( '<a>' ).text( '스프라이트 편집' ).attr( 'href',
		mw.util.getUrl( editPage, { spriteaction: 'edit' } )
	);
	$spriteEditTab = $( '<li>' )
	    .attr( 'id', 'ca-spriteedit' )
	    .addClass( 'page-side-tool' )
	    .append(
		    $( '<span>' ).append( $spriteEditLink )
	    );
	
	$spriteEditTab.insertAfter( $editTab );
}

// Page to sprite edit is not here, so no need to bind events
if ( editPage ) {
	return;
}

var loadSpriteEditor = function() {
	$spriteEditTab.add( '#ca-view' ).toggleClass( 'selected' );
	
	return mw.loader.using( 'ext.gadget.spriteEdit' );
};
if ( location.search.match( '[?&]spriteaction=edit' ) ) {
	loadSpriteEditor();
	return;
}

var $win = $( window );
$spriteEditLink.one( 'click.spriteEditLoader', function( e ) {
	// Initially add the history so it is not delayed waiting
	// for the editor to load. The editor will handle it from now.
	history.pushState( {}, '', this.href );
	
	loadSpriteEditor().then( function() {
		$win.off( '.spriteEditLoader' );
	} );
	
	e.preventDefault();
} );

// If the page is reloaded while the editor isn't loaded, navigating
// back to the editor won't work, so an initial navigation check is
// necessary to load the editor, where it will then monitor navigation
$win.on( 'popstate.spriteEditLoader', function() {
	if (
		location.search.match( '[?&]spriteaction=edit' ) &&
		!$( 'html' ).hasClass( 'spriteedit-loaded' )
	) {
		loadSpriteEditor().then( function() {
			$win.off( '.spriteEditLoader' );
		} );
	}
} );

} );
Advertisement