사용자:Senior9324/common.js: 두 판 사이의 차이

편집 요약 없음
편집 요약 없음
9번째 줄: 9번째 줄:
  */
  */
( function ( mw, $ ) {
( function ( mw, $ ) {
$( function () {
    $( function () {
var conf;
        var conf;
   
   
conf = {
        conf = {
subpageName: '실험실',
            subpageName: '실험실',
portletLabel: '실험실',
            portletLabel: '실험실',
portletTooltip: '실험실로 가기'
            portletTooltip: '실험실로 가기'
};
        };
   
   
mw.util.addPortletLink(
        mw.util.addPortletLink(
(mw.config.get('skin') === 'newiwiki') ? 'personalbar' : 'p-personal',
            (mw.config.get('skin') === 'newiwiki') ? 'personalbar' : 'p-personal',
'/wiki/Special:MyPage/실험실',
            '/wiki/Special:MyPage/실험실',
conf.portletLabel,
            conf.portletLabel,
'pt-sandbox',
            'pt-sandbox',
conf.portletTooltip,
            conf.portletTooltip,
null,
            null,
'#pt-preferences'
            '#pt-preferences'
);
        );
} );
       
        $( "#editform" ).submit( function (e) {
            if ( $( this ).hasClass( "confirmed" ) return;
            e.preventDefault();
            if ( alert( "저장하기 전에 적합한 내용인지 한 번 더 생각해보세요!" ) ) {
                $( this ).addClass( "comfirmed" );
            }
        } );
    } );
}( mediaWiki, jQuery ) );
}( mediaWiki, jQuery ) );

2015년 5월 17일 (일) 01:10 판

//mw.loader.load( '//librewiki.net/index.php?title=User:Senior9324/FileUploadWizard.js&action=raw&ctype=text/javascript' );
/**
 * Add a "My sandbox" link to the personal portlet menu.
 *
 * Required modules: mediawiki.util, mediawiki.Title, mediawiki.Uri
 *
 * @source www.mediawiki.org/wiki/Snippets/MySandbox
 * @version 2014-07-16
 */
( function ( mw, $ ) {
    $( function () {
        var conf;
 
        conf = {
            subpageName: '실험실',
            portletLabel: '실험실',
            portletTooltip: '실험실로 가기'
        };
 
        mw.util.addPortletLink(
            (mw.config.get('skin') === 'newiwiki') ? 'personalbar' : 'p-personal',
            '/wiki/Special:MyPage/실험실',
            conf.portletLabel,
            'pt-sandbox',
            conf.portletTooltip,
            null,
            '#pt-preferences'
        );
        
        $( "#editform" ).submit( function (e) {
            if ( $( this ).hasClass( "confirmed" ) return;
            e.preventDefault();
            if ( alert( "저장하기 전에 적합한 내용인지 한 번 더 생각해보세요!" ) ) {
                $( this ).addClass( "comfirmed" );
            }
        } );
    } );
}( mediaWiki, jQuery ) );