ꯃꯦꯗꯤꯌꯥꯋꯤꯀꯤ:Common.js
ꯏꯁꯤꯟꯒꯗꯕ: ꯐꯣꯡꯗꯣꯛꯂꯕ ꯃꯇꯨꯡ, ꯅꯪꯅꯥ ꯑꯍꯣꯡꯕ ꯎꯅꯕ ꯅꯪꯒꯤ ꯕꯔꯥꯎꯁꯔ ꯀꯥꯆꯦ ꯕꯥꯏꯄꯥꯁ ꯇꯧꯔꯣ ꯫
- ꯐꯥꯌꯥꯔꯐꯣꯛꯁ / ꯁꯐꯥꯔꯤ: ꯄꯥꯏꯁꯤꯟꯕꯊꯥꯡꯇꯣꯛꯄ ꯅꯝꯃꯤꯉꯩ ꯃꯅꯨꯡꯗꯑꯃꯨꯛꯍꯟꯅ-ꯆꯤꯡꯉꯣ, ꯅꯠꯇꯔꯒ ꯅꯝꯃꯣ Ctrl-F5 ꯑꯃꯥ ꯍꯦꯛꯇꯥ ꯅꯠꯃꯣ Ctrl-R (⌘-R ꯃꯦꯛ ꯱ ꯇꯥ)
- ꯒꯨꯒꯜ ꯀꯔꯣꯝ: ꯅꯝꯃꯣ Ctrl-Shift-R (⌘-Shift-R ꯃꯦꯛ ꯱ ꯗ)
- ꯏꯟꯇꯔꯅꯦꯠ ꯑꯦꯛꯁꯄ꯭ꯂꯣꯔꯔ/ꯑꯦꯗꯖ: ꯄꯥꯏꯁꯤꯟꯕ Ctrl ꯅꯝꯃꯤꯉꯩ ꯃꯅꯨꯡꯗ ꯇꯦꯈꯠꯍꯟꯂꯨ, ꯅꯠꯇꯔꯒ ꯅꯝꯃꯨ Ctrl-F5
- ꯑꯣꯄꯦꯔꯥ: ꯅꯝꯃꯨ Ctrl-F5 ꯫
/*
* Please for the sake of the wiki, please do *some* testing of new Javascript code
* in your own user skin JS (Special:MyPage/skin.js / Special:MyPage/common.js)
* before adding them here. As far as possible, avoid adding new stuff here and make
* your new snippets as a gadget (especially if it requires ResourceLoader).
*
* We currently don't have any type of voting to decide what should be here, use
* common sense whenever possible (e.g Is my snippet going to benefit most people?).
*/
/**
* Redirect User:Name/skin.js and skin.css to the current skin's pages
* (unless the 'skin' page really exists)
*
* @source: https://www.mediawiki.org/wiki/Snippets/Redirect_skin.js
* @rev: 2
*/
if ( mw.config.get( 'wgArticleId' ) == 0 && mw.config.get( 'wgNamespaceNumber' ) == 2 ) {
var titleParts = mw.config.get( 'wgPageName' ).split( '/' );
// Make sure there was a part before and after the slash
// And that the latter is 'skin.js' or 'skin.css'
if ( titleParts.length == 2 ) {
var userSkinPage = titleParts.shift() + '/' + mw.config.get( 'skin' );
if ( titleParts.slice(-1) == 'skin.js' ) {
window.location.href = mw.util.getUrl( userSkinPage + '.js' );
} else if ( titleParts.slice(-1) == 'skin.css' ) {
window.location.href = mw.util.getUrl( userSkinPage + '.css' );
}
}
}