מייבאים כמותיים, בדוקי עריכות אוטומטית, ביוראקראטן, אינטערפעיס רעדאקטארן, emailconfirmed, אינטערפעיס אדמיניסטראַטאָרן, מנטרים, סיסאפן, צוות טכני, מייבאים, מעדכנים, אספקלריה רעדאקטארן
102,362
רעדאגירונגען
ק (הגהה) |
ק (הגהה, נאר פון וויקי) |
||
| (45 מיטלסטע ווערסיעס פון 3 באַניצער נישט געוויזן.) | |||
| שורה 1: | שורה 1: | ||
/* אלע סקריפטן פון JavaScript דא געשריבן וועלן געלאדן ווערן | /* אלע סקריפטן פון JavaScript דא געשריבן וועלן געלאדן ווערן פאר אלע באניצער ווען זיי לאדירן דעם בלאט */ | ||
// פונקציה לסקריפטים דו-לשוניים | |||
// דוגמה: language("שאף א ווייטערפירונג", "צור הפניה") | |||
function language(yi, he) { | |||
var lang = mw.user.options.values.language; | |||
return lang === 'he' ? he || yi : yi; | |||
} | |||
var element = document.getElementById('pt-anontalk'); | |||
if(element){ | |||
element.style.display = "none"; | |||
} | |||
element = document.getElementById('pt-mysandbox'); | |||
if(element){ | |||
element.style.display = "none"; | |||
} | |||
element = document.getElementById('pt-anoncontribs'); | |||
if(element){ | |||
element.style.display = "none"; | |||
} | |||
// אין פנים, שריי נישט הויך ווען א הערה פירט צו א "דארט" | |||
$('.mw-parser-output sup a').each(function() { | |||
var text = $(this).text(); | |||
// Check if the text follows the format '[1.2]' | |||
if (/^\[\d+\.\d+\]$/.test(text)) { | |||
// לאז עס נאר אין דרוקבארע ווערסיע | |||
var modifiedText = text.replace(/(\.\d+)/, '<span id="printOnly">$1</span>'); | |||
$(this).html(modifiedText); | |||
} | |||
}); | |||
var ns = mw.config.get('wgNamespaceNumber'); | |||
$(function(){ | |||
if (ns === 8000) { | |||
// דאס טוישט בעקגראונד קאליר פון דרעפטס אין רוי | |||
var txt = document.getElementById("wpTextbox1"); | |||
if (document.getElementById("mbox-draft") || (txt && txt.value.includes("{" + "{דרעפט"))) { | |||
var contentElement = document.querySelector("#content"); | |||
contentElement.style.backgroundColor = "#F9F7F8"; | |||
} else if (document.getElementById("yiwiki")) { | |||
// לייג צו דעם ווארענונג | |||
addEditIntro( 'מוסטער:וויקי editintro' ); | |||
} | |||
} | |||
}); | |||
/*if (mw.config.get("wgAction") === "history") { | |||
importScript("MediaWiki:FixHistPage.js"); // הסתרת קישורים ותיבות checkbox בדף ההיסטוריה והוספת אפשרות להפעלתם באמצעות כפתור מתאים. | |||
}*/ | |||
function importScript(script) { | |||
mw.loader.load( | |||
"/w/index.php?title=" + | |||
encodeURI(script) + | |||
"&action=raw&ctype=text/javascript" | |||
); | |||
} | |||
function importStylesheet(styleSheet) { | |||
mw.loader.load( | |||
"/w/index.php?title=" + | |||
encodeURI(styleSheet) + | |||
"&action=raw&ctype=text/css", | |||
"text/css" | |||
); | |||
} | |||
function importStylesheetURI(uri) { | |||
mw.loader.load(uri, "text/css"); | |||
} | |||
/* | |||
function importHebScript(script) { | |||
mw.loader.load( | |||
"https://www.hamichlol.org.il/w/index.php?title=" + | |||
encodeURI(script) + | |||
"&action=raw&ctype=text/javascript" | |||
); | |||
} | |||
*/ | |||
/* ייבוא סקריפטים */ | /* ייבוא סקריפטים */ | ||
/* פונקציה לייבוא סקריפט מ[[המכלול: | /* פונקציה לייבוא סקריפט מ[[המכלול:סקריפטס]] */ | ||
function importUserScript() { | function importUserScript() { | ||
"use strict"; | "use strict"; | ||
| שורה 11: | שורה 95: | ||
for (var arg = 0; arg < args.length; arg++) { | for (var arg = 0; arg < args.length; arg++) { | ||
try { | try { | ||
importScript("MediaWiki: | importScript("MediaWiki:סקריפטס/" + args[arg] + ".js"); | ||
} catch (e) { | } catch (e) { | ||
console.log(e); | console.log(e); | ||
| שורה 17: | שורה 101: | ||
} | } | ||
}); | }); | ||
} | |||
if (ns == 2 || ns == 3) { | |||
importUserScript(13); | |||
} | } | ||
mw.loader.using("mediawiki.util", function () { | mw.loader.using("mediawiki.util", function () { | ||
"use strict"; | "use strict"; | ||
// סקריפטים לעמודים ספציפיים | // סקריפטים לעמודים ספציפיים | ||
/* if ( mw.config.get( 'wgIsMainPage' ) && mw.config.get( 'wgAction' ) === "view" ) { | |||
importScript( 'MediaWiki:Portals.js' ); // פורטלים מתחלפים בעמוד הראשי | importScript( 'MediaWiki:Portals.js' ); // פורטלים מתחלפים בעמוד הראשי | ||
} | } | ||
if (mw.config.get("wgCanonicalSpecialPageName") === "Upload") { | if (mw.config.get("wgCanonicalSpecialPageName") === "Upload") { | ||
importScript("MediaWiki:Licenses.js"); // שיפורים ברשיונות ושינויים בדף ההעלאה | importScript("MediaWiki:Licenses.js"); // שיפורים ברשיונות ושינויים בדף ההעלאה | ||
} | } | ||
*/ | |||
// link to sub pages | // link to sub pages | ||
if ( | if ( | ||
ns > 0 && | |||
ns != 6 && | |||
ns != 14 | |||
) { | ) { | ||
$(function () { | $(function () { | ||
var linkText = | var linkText = language("סוב-בלעטער", "דפי משנה"), | ||
linkTitle = language("ליסטע פון די סוב-בלעטער פון דעם בלאט", "רשימת דפי המשנה של דף זה"); | |||
linkTitle = | |||
$("#t-recentchangeslinked").after( | $("#t-recentchangeslinked").after( | ||
| שורה 72: | שורה 143: | ||
}); | }); | ||
} | } | ||
/** WikiMiniAtlas ******************************************************* | |||
* | |||
* Description: WikiMiniAtlas is a popup click and drag world map. | |||
* This script causes all of our coordinate links to display the WikiMiniAtlas popup button. | |||
* The script itself is located on meta because it is used by many projects. | |||
* See [[Meta:WikiMiniAtlas]] for more information. | |||
* Maintainers: [[User:Dschwen]] | |||
( function () { | |||
if ( $( 'a.external.text[href*=geohack], div.kmldata' ).length ) { | |||
mw.loader.load( '//meta.wikimedia.org/w/index.php?title=MediaWiki:Wikiminiatlas.js&action=raw&ctype=text/javascript' ); | |||
} | |||
} )(); */ | |||
/* | |||
* Description: Redirects from /User:UserName/skin.js or .css to the user's actual skin page. Used (also) in {{תב|דף אישי}}. | |||
* Originally created by [[:en:User:Cacycle]] | |||
*/ | |||
$( function () { | |||
if ( mw.config.get( 'wgArticleId' ) === 0 && mw.config.get( 'wgUserName' ) ) { | |||
var pageName = mw.config.get( 'wgPageName' ); | |||
var slash = pageName.indexOf( '/' ); | |||
var norm = pageName.substr( 0, slash ) + mw.config.get( 'wgPageName' ).substr( slash ).toLowerCase(); | |||
var test = 'באַניצער:' + mw.config.get( 'wgUserName' ).replace( / /g, '_' ) + '/skin.'; | |||
var ext = null; | |||
if ( norm === test + 'js' ) { | |||
ext = 'js'; | |||
} else if (norm === test + 'css') { | |||
ext = 'css'; | |||
} | |||
if ( ext !== null ) { | |||
window.location.href = window.location.href.replace( | |||
/\/skin.(css|js)/i, | |||
'/' + mw.config.get( 'skin' ) + '.' + ext | |||
); | |||
} | |||
} | |||
// create an event when util.addPortletLink() is called, so scripts that manipulate menus ca readjust. | |||
var oldFunc = mw.util.addPortletLink; | |||
if ( typeof oldFunc === 'function' ) { | |||
mw.util.addPortletLink = function () { | |||
var res = oldFunc.apply( this, arguments ); | |||
$( document ).trigger( 'new-portlet-link' ); | |||
return res; | |||
}; | |||
} | |||
} ); | |||
if ( | if ( | ||
$.inArray(mw.config.get("wgPageName"), [ | $.inArray(mw.config.get("wgPageName"), [ | ||
"המכלול:בוקמרקלטים", | "המכלול:בוקמרקלטים", | ||
" | "המכלול_שמועס:בוקמרקלטים", | ||
]) + 1 | ]) + 1 | ||
) { | ) { | ||
| שורה 82: | שורה 205: | ||
} | } | ||
/* if (mw.config.get("wgCanonicalSpecialPageName") === "Search") { | |||
//importScript( 'MediaWiki:SearchEngines.js' ); // בחירה במנועי חיפוש שונים | //importScript( 'MediaWiki:SearchEngines.js' ); // בחירה במנועי חיפוש שונים | ||
importScript("Mediawiki:Gadget-advanceSearch.js"); | //importScript("Mediawiki:Gadget-advanceSearch.js"); // שוין פארהאן Gadget-GSearch | ||
} | }*/ | ||
/* | |||
* 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] === 'editautopatrolprotected' | |||
) && | |||
$( '#pl-noprotectionnotice, #pl-autoconfirmed, #pl-protected' ).length === 0 && | |||
( $.inArray( mw.config.get( 'wgAction' ), [ 'view', 'submit' ] ) + 1 ) | |||
) { | |||
var restrictionEditMapping = { | |||
'sysop': 'מוגן', | |||
'templateeditor': 'הגנת תבניות', | |||
'editautopatrolprotected': 'הגנה מוגברת', | |||
'autoconfirmed': 'מוגן חלקית' | |||
}; | |||
$.get( mw.util.wikiScript( 'api' ), { | |||
action: 'parse', | |||
format: 'json', | |||
text: '{{' + restrictionEditMapping[restrictionEdit[0]] + '}}', | |||
prop: 'text|indicators', | |||
title: mw.config.get('wgPageName'), | |||
contentmodel: 'wikitext' | |||
}, function( data ) { | |||
$( function () { | |||
$( '.printfooter' ).before( $( '<div>', { | |||
'class': 'plprotected', | |||
'html': data.parse.text['*'] | |||
} ) ); | |||
var newList = []; | |||
$.each( data.parse.indicators, function ( name, indicator ) { | |||
newList.push( | |||
$( '<div>' ) | |||
.addClass( 'mw-indicator' ) | |||
.attr( 'id', mw.util.escapeIdForAttribute( 'mw-indicator-' + indicator.name ) ) | |||
.html( indicator['*'] ) | |||
.get( 0 ), | |||
// Add a whitespace between the <div>s because | |||
// they get displayed with display: inline-block | |||
document.createTextNode( '\n' ) | |||
); | |||
} ); | |||
$( '.mw-indicators' ).append( newList ); | |||
} ); | |||
} ); | |||
} | |||
}); | |||
} ); | |||
// if page is semi-protectedted and user is autoconfirmed but not autopatroller, patroller, or an admin | |||
// check if user meets community standard for "autoconfirmed" (30 days, 100 edits), and if they don't, | |||
// remove edit capability, similar to normal protection behavior. | |||
// מסנן השחתות #109 will prevent this user from saving their work in any case. | |||
(function() { | |||
var ug = mw.config.get("wgUserGroups"), | |||
prot = mw.config.get("wgRestrictionEdit", []); | |||
if (prot[0] == 'autoconfirmed' && | |||
ug.includes('autoconfirmed') && | |||
! ug.includes('autopatrolled') && | |||
! ug.includes('patroller') && | |||
! ug.includes('sysop') | |||
) { | |||
importScript( 'mediawiki:Block-newbie-edit.js' ); | |||
} | |||
})(); | |||
// On demand loading of gadgets, initial version from ruwiki. | // On demand loading of gadgets, initial version from ruwiki. | ||
// Detects uses of template "טען סקריפט" and loads specifically-named gadgets. | // Detects uses of template "טען סקריפט" and loads specifically-named gadgets. | ||
// gadget name as defined in gadgets-definition must begin with "ondemand-" | // gadget name as defined in gadgets-definition must begin with "ondemand-" | ||
if (mw.config.get( | if ( mw.config.get('wgCanonicalNamespace') !== 'Special' ) | ||
mw.hook( 'wikipage.content' ).add( function( content ) { | |||
$( '.executeJS', content ).each( function () { | |||
var gadget = $( this ).data( 'gadgetname' ); | |||
if ( gadget && $.trim( gadget ) ) | |||
mw.loader.load( 'ext.gadget.ondemand-' + $.trim( gadget ) ); | |||
} ); | |||
} ); | |||
/* נישט דא. וועט דארפן גיין אלס הרחבה בעפאר שאפן דעם HTML | |||
// Add structured website data | |||
if (mw.config.get('wgArticleId') === 1) { // הויפט בלאט | |||
const structuredDataText = JSON.stringify({ | |||
"@context": "https://schema.org", | |||
"@type": "WebSite", | |||
"name": "אידיש המכלול", | |||
"alternateName": ["המכלול אידיש", "המכלול"], | |||
"url": "https://yi.hamichlol.org.il/" | |||
}); | }); | ||
const script = document.createElement('script'); | |||
script.setAttribute('type', 'application/ld+json'); | |||
script.textContent = structuredDataText; | |||
document.head.appendChild(script); | |||
} | } | ||
*/ | */ | ||
רעדאגירונגען