사용자:Ha98574/vector.js

위키뉴스

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

  • 파이어폭스 / 사파리: Shift 키를 누르면서 새로 고침을 클릭하거나, Ctrl-F5 또는 Ctrl-R을 입력 (Mac에서는 ⌘-R)
  • 구글 크롬: Ctrl-Shift-R키를 입력 (Mac에서는 ⌘-Shift-R)
  • 인터넷 익스플로러 / 엣지: Ctrl 키를 누르면서 새로 고침을 클릭하거나, Ctrl-F5를 입력.
  • 오페라: Ctrl-F5를 입력.
/* 사용하는 컴퓨터 시간을 나타냄 */
/* modified version of [[mw:MediaWiki:Gadget-UTCLiveClock.js]] -- [[사용자:ChongDae]] 2011년 2월 17일 (목) 10:23 (KST) */
( function( $, undefined ) {
 
function showLocalTime( $target ) {
	var dateNode = LocalLiveClockConfig.node;
	if( !dateNode ) {
		return;
	}
 
	var now = new Date();
	var hh = now.getHours();
	var mm = now.getMinutes();
	var ss = now.getSeconds();
	if ( typeof $target === 'undefined' ) {
		$target = $( dateNode ).find( 'a:first' );
	}
	var time = ( hh < 10 ? '0' + hh : hh ) + ':' + ( mm < 10 ? '0' + mm : mm ) + ':' + ( ss < 10 ? '0' + ss : ss );
	$target.text( time );
 
	setTimeout( function(){
		showLocalTime( $target );	
	}, 1000 );
}
 
function localLiveClock() {
	appendCSS( '#localdate a { font-weight:bolder; font-size:120%; }' );
 
	if ( typeof( LocalLiveClockConfig ) === 'undefined' ) {
		window.LocalLiveClockConfig = {};
	}
	var portletId = LocalLiveClockConfig.portletId || 'p-personal';
	var nextNode = LocalLiveClockConfig.nextNodeId ? document.getElementById( LocalLiveClockConfig.nextNodeId ) : undefined;
	LocalLiveClockConfig.node = mw.util.addPortletLink(
		portletId,
		wgScript + '?title=' + encodeURIComponent( wgPageName ) + '&action=purge',
		'',
		'localdate',
		undefined,
		undefined,
		nextNode
	);
	if( !LocalLiveClockConfig.node ) {
		return;
	}
 
	showLocalTime();
}
$( document ).ready( localLiveClock );
 
} )( jQuery );

/* 현재 UTC 시각 표시 */
mw.loader.load( 'http://www.mediawiki.org/w/index.php?title=MediaWiki:Gadget-UTCLiveClock.js&action=raw&ctype=text/javascript&smaxage=21600&maxage=86400' );

/* 문단명 옆에 [편집] 버튼 생김 */
mw.loader.load( '//en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-edittop.js&action=raw&ctype=text/javascript&smaxage=21600&maxage=86400' );

/* 제목 옆에 [편집] 버튼 생김 */
mw.loader.load( '//en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-lefteditlinks.js&action=raw&ctype=text/javascript&smaxage=21600&maxage=86400' );