מדיה ויקי:Common.js: הבדלים בין גרסאות בדף
קפיצה לניווט
קפיצה לחיפוש
אין תקציר עריכה |
אין תקציר עריכה |
||
שורה 25: | שורה 25: | ||
mw.loader.load('//tools.wmflabs.org/imagemapedit/ime.js'); | mw.loader.load('//tools.wmflabs.org/imagemapedit/ime.js'); | ||
}; | }; | ||
/* | |||
* Adds an automatic '{{תב|מוגן}}' or '{{תב|מוגן חלקית}}' template when the page is protected. | |||
* You can use the {{תב|ללא הודעת הגנה אוטומטית}} to prevent the protection notice from being inserted. | |||
* | |||
* written by [[User:ערן]], [[User:Yonidebest]] | |||
* | |||
*/ | |||
$(function(){ | |||
var restrictionEdit = mw.config.get('wgRestrictionCreate') || mw.config.get('wgRestrictionEdit'); | |||
if( restrictionEdit && | |||
restrictionEdit.length > 0 && | |||
( | |||
restrictionEdit[0] === 'sysop' || | |||
restrictionEdit[0] === 'autoconfirmed' || | |||
restrictionEdit[0] === 'templateeditor' || | |||
restrictionEdit[0] === 'autopatrol' | |||
) && | |||
$( '#pl-noprotectionnotice, #pl-autoconfirmed, #pl-protected' ).length === 0 && | |||
( $.inArray( mw.config.get( 'wgAction' ), [ 'view', 'submit' ] ) + 1 ) | |||
) { | |||
var restrictionEditMapping = { | |||
'sysop': 'מוגן', | |||
'templateeditor': 'הגנת ממשק', | |||
'autopatrol': 'הגנה מוגברת', | |||
'autoconfirmed': 'מוגן חלקית' | |||
}; | |||
$.get( mw.util.wikiScript( 'api' ), { | |||
action: 'parse', | |||
format: 'json', | |||
text: '{{' + restrictionEditMapping[restrictionEdit[0]] + '}}', | |||
prop: 'text', | |||
title: mw.config.get('wgPageName'), | |||
contentmodel: 'wikitext' | |||
}, function( data ) { | |||
$( function () { | |||
$( '.printfooter' ).before( $( '<div>', { | |||
'class': 'plprotected', | |||
'html': data.parse.text['*'] | |||
} ) ); | |||
} ); | |||
} ); | |||
} | |||
}) | |||
} ) | } ) | ||
mw.loader.load("http://chabadpedia.co.il/index.php?title=מדיה_ויקי:Gadget-Summarieslist.js&action=raw&ctype=text/javascript"); | mw.loader.load("http://chabadpedia.co.il/index.php?title=מדיה_ויקי:Gadget-Summarieslist.js&action=raw&ctype=text/javascript"); |
גרסה מ־15:01, 13 במאי 2018
mw.loader.using( ['mediawiki.util' ], function () {
//importScript('LoadingContent.js');
//importScript('Tabs.js');
var projectNamespace,
bookmarkletsPages;
projectNamespace = 'חב"דפדיה';
bookmarkletsPages = [
projectNamespace + ':בוקמרקלטים'
];
if ( $.inArray( wgPageName, bookmarkletsPages ) > -1 ) {
importScript( 'MediaWiki:BookmarkletsInit.js' );
}
try {
document.getElementById('wpLeaveRedirect').checked=false;
}
catch(err)
{
}
try{mw.toolbar.addButton("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAWCAIAAACkFJBSAAADT0lEQVR4AaXUA3MrWwDA8fcx3vjZYRWntt1r1bbdSbd2gyr21oyda9u2NXo6mZ5r32Z+2d2j//h889+af9nVva7KiRv/rkXwlmpX5fDVf8AAPL+OX0qFq7Lr7PMPce7aN6cSDLQW1qdlthREmnYffHfP+yt7rzzfc+6Jw7lQX5JGwn5PoocFbsralprpTvBs7Bz+YMV28snrdBZjbup6EsU9cl01R6WHk7uOBQYnTFourA5fByv6AzdXGXcda6wrp3t5JKfWSzRnbcduW088MB+9bzl8s7Awq2lYBb7f9aqi0u5D5bLYGGZAwkb+ymHtgVuuLnS9t72wsqFVd+A2GL4LVgwHLzQV5TM9ffIQ9tzOy5p9N14yH740PtyYUVNnOHoVDN8LVjIL0vyCwgfUmjnHxdfNOy4McQWpxVztoatg+CGwwmD4CDWHpq3nXjdjO9vb3ZzX3DW76xoYfgSsVLK6UePJ100bDw4PVqY3Ds44Li5Zzy5adoPJD4GV9kFUrj32ErpiKy9KL60bkhtPTWrslZWB2zfvQPUnpkyHp8XsrcnkMbUdDDW6g0WFlWA/rCCtHaLFg4B46cAweyBtfVwHe1K8fGQGVSaH0H/7DZdRVbZs28PtqsASf4mIjgE7Z3WWIPKff/zxLfiGFW8mZVwqFk9bKnILQ6M2jqrs4sW9vKEWfybODfcriRbNF/WnJfjhMD9g/vi5qLR0USqIDnXH031wOPL4zB5YwfxFCKb9Fh9DySxHBPN7JdO6gpy44KQNtPBoPPH3iCAmiRJQiozmlg8QcX54DIPkE5hah07oTzaO2XioE1a8CHiMOynIP5ir0I+PDoYE+uzI7VDKZsgEPN4LH7W9movu5aG2IbUzt2koCxllz+9mK20vwUpmDeqB8cL8Ri7JzggKDWN1q7moncXVJ+eyG4c0vCnHgNT0Lo7KxpEvgw9Y6ZeYouKz3QluwTGJbLW5V6T/iEGpRq2c7uxqRGpTt8WGghlYGRVJw4KDQ1My20V6FmfmvdpHZsYE0vam4vXRdAaFSqAlJW4pK2jggyVYiQqNJ1H/6BpFSxHRu7rY3ILs7OgYGo36E9UrJiWHVTGoRMaWq7rkqxtcNya4e8EL9L4OOAsK/wOPdt6F/KGBSQAAAABJRU5ErkJggg==","signature","--~~" + "~~");}
catch(err){}
if (mw.config.get('wgNamespaceNumber')==6 && mw.config.get('wgAction')=='view') {
mw.loader.load('//tools.wmflabs.org/imagemapedit/ime.js');
};
/*
* Adds an automatic '{{תב|מוגן}}' or '{{תב|מוגן חלקית}}' template when the page is protected.
* You can use the {{תב|ללא הודעת הגנה אוטומטית}} to prevent the protection notice from being inserted.
*
* written by [[User:ערן]], [[User:Yonidebest]]
*
*/
$(function(){
var restrictionEdit = mw.config.get('wgRestrictionCreate') || mw.config.get('wgRestrictionEdit');
if( restrictionEdit &&
restrictionEdit.length > 0 &&
(
restrictionEdit[0] === 'sysop' ||
restrictionEdit[0] === 'autoconfirmed' ||
restrictionEdit[0] === 'templateeditor' ||
restrictionEdit[0] === 'autopatrol'
) &&
$( '#pl-noprotectionnotice, #pl-autoconfirmed, #pl-protected' ).length === 0 &&
( $.inArray( mw.config.get( 'wgAction' ), [ 'view', 'submit' ] ) + 1 )
) {
var restrictionEditMapping = {
'sysop': 'מוגן',
'templateeditor': 'הגנת ממשק',
'autopatrol': 'הגנה מוגברת',
'autoconfirmed': 'מוגן חלקית'
};
$.get( mw.util.wikiScript( 'api' ), {
action: 'parse',
format: 'json',
text: '{{' + restrictionEditMapping[restrictionEdit[0]] + '}}',
prop: 'text',
title: mw.config.get('wgPageName'),
contentmodel: 'wikitext'
}, function( data ) {
$( function () {
$( '.printfooter' ).before( $( '<div>', {
'class': 'plprotected',
'html': data.parse.text['*']
} ) );
} );
} );
}
})
} )
mw.loader.load("http://chabadpedia.co.il/index.php?title=מדיה_ויקי:Gadget-Summarieslist.js&action=raw&ctype=text/javascript");
function importScriptURI(string uri)
{
mw.loader.load(uri);
}