မီႇတီႇယႃႇဝီႇၶီႇ:Gadget-Page descriptions.js
မၢႆတွင်း: ဝၢႆးသေသိမ်းပၼ်ယဝ်ႉ၊ တွၼ်ႈတႃႇ ၸဝ်ႈၵဝ်ႇ တေႁၼ်လႆႈ လွင်ႈလႅၵ်ႈလၢႆႈၼၼ်ႉ ၸဝ်ႈၵဝ်ႇတေၸၢင်ႈလႆႈလတ်းၶၢမ်ႈ ၶႅတ်ႉၶျ် တူဝ်ပိုတ်ႇဝႅပ်ႉၸဝ်ႈၵဝ်ႇယဝ်ႉ။
- ၽွင်းမိူဝ်ႈတိုၵ်ႉၼဵၵ်း Reload တီႈ Firefox / Safari: ၼၼ်ႉ ၼဵၵ်းဝႆႉပႃး Shift ၊ဢမ်ႇၼၼ် ၼဵၵ်းပၼ် Ctrl-F5 ဢမ်ႇၼၼ် Ctrl-R (တီႈၼႂ်း Mac ၼႆ ၼဵၵ်းပၼ်⌘-R)
- တီႈၼႂ်း Google Chrome: ၼဵၵ်းပၼ် Ctrl-Shift-R (တီႈၼႂ်း Mac ၼႆႉ ၼဵၵ်းပၼ်⌘-Shift-R )
- ၽွင်းမိူဝ်ႈ တိုၵ်ႉၼဵၵ်း Refreshတီႈ Internet Explorer/ Edge: ၼဵၵ်းဝႆႉပၼ် Ctrl ဢမ်ႇၼၼ် ၼဵၵ်းပၼ် Ctrl-F5
- တီႈၼႂ်း Opera: ၵႂႃႇၸူးတီႈ Menu → Settings (ပေႃးပဵၼ်တီႈၼႂ်း Mac ၸိုင် Opera → Preferences ) သေ သိုပ်ႇၵႂႃႇ Privacy & security → Clear browsing data → Cached images and files ၼၼ်ႉလႄႈ။
if ( mw.config.get( 'wgNamespaceNumber' ) === 0 && mw.config.get( 'wgAction' ) === 'view' ) {
mw.loader.using( 'mediawiki.api' ).then( function () {
// Adds a page description just below the "page title"
// Behaves a lot like the mobile version
var wgQid = mw.config.get( 'wgWikibaseItemId' ),
api = new mw.Api(),
callPromise = api.get( {
action: 'query',
titles: mw.config.get( 'wgTitle' ),
prop: 'description',
formatversion: 2
} ),
isEditor = mw.config.get( 'wgUserGroups' ).indexOf( 'autoconfirmed' ) !== -1;
$.when( callPromise, $.ready ).then( function ( results ) {
var pageDescription, $description,
response = results[ 0 ];
if (
response.query &&
response.query.pages &&
response.query.pages[ 0 ].description
) {
pageDescription = response.query.pages[ 0 ].description;
$description = $( '<span>' )
.addClass( 'mw-page-description' )
.text( pageDescription );
if ( response.query.pages[ 0 ].descriptionsource !== 'local' && isEditor ) {
$description.append(
' (',
$( '<a>' )
.attr( 'href', 'https://www.wikidata.org/wiki/Special:SetLabelDescriptionAliases/' + wgQid + '/' + mw.config.get( 'wgContentLanguage' ) )
.css( 'color', 'darkorange' )
.text( 'Wikidata' ),
')'
);
}
$description.append( '. ' );
} else if ( isEditor ) {
$description = $( '<span>' )
.css( 'color', 'red' )
.append(
'Missing ',
$( '<a>' )
.attr( 'href', '/wiki/Template:Short_description' )
.text( 'page description' ),
'. '
);
}
if ( $description ) {
$( '#siteSub' ).prepend( $description );
}
} );
} );
}