אונטערשייד צווישן ווערסיעס פון "מעדיעוויקי:Common.js"

קיין רעדאגירונג באמערקונג
ק (הגהה)
אין תקציר עריכה
 
(8 מיטלסטע ווערסיעס פון 2 באַניצער נישט געוויזן.)
שורה 1: שורה 1:
/* אלע סקריפטן פון JavaScript דא געשריבן וועלן געלאדן ווערן פאר אלע באניצער ווען זיי לאדירן דעם בלאט */
/* אלע סקריפטן פון JavaScript דא געשריבן וועלן געלאדן ווערן פאר אלע באניצער ווען זיי לאדירן דעם בלאט */
// adds backlink to copied text
document.addEventListener('copy', function(event) {
    const selection = window.getSelection();
    if (!selection || selection.rangeCount === 0) return;
    const selectedText = selection.toString();
    if (selectedText.length > 150) {
        if (event.clipboardData) {
            const attribution = "\n\nפון המכלול: " + decodeURI(document.location.href);
            const combinedText = selectedText + attribution;
            event.clipboardData.setData('text/plain', combinedText);
            event.preventDefault();
        }
    }
});


// פונקציה לסקריפטים דו-לשוניים
// פונקציה לסקריפטים דו-לשוניים
שורה 36: שורה 51:
$(function(){
$(function(){
if (ns === 8000) {
if (ns === 8000) {
//דאס רוקט אראפ א מעלדונג אונטער די קאטעגאריעס, באנוצט אין מוסטער:קרד/ויקי/יידיש
if (document.getElementById("wiki-message")) {
        $("#wiki-message").detach().insertAfter("#catlinks");
        // לייג צו דעם ווארענונג
        addEditIntro( 'מוסטער:רוי editintro' );
}
// דאס טוישט בעקגראונד קאליר פון דרעפטס אין רוי
// דאס טוישט בעקגראונד קאליר פון דרעפטס אין רוי
else if (document.getElementById("mbox-draft") || (document.getElementById("wpTextbox1").value.includes("{{" + "דרעפט" + "}}"))) {
var txt = document.getElementById("wpTextbox1");
if (document.getElementById("mbox-draft") || (txt && txt.value.includes("{" + "{דרעפט"))) {
var contentElement = document.querySelector("#content");
var contentElement = document.querySelector("#content");
contentElement.style.backgroundColor = "#F9F7F8";
contentElement.style.backgroundColor = "#F9F7F8";
} else if (document.getElementById("yiwiki")) {
        // לייג צו דעם ווארענונג
        addEditIntro( 'מוסטער:וויקי editintro' );
}
}
}
}