לדלג לתוכן

מדיה ויקי:Gadget-purple.js: הבדלים בין גרסאות בדף

מתוך צפונות ויקי
אין תקציר עריכה
מ 27 גרסאות של הדף wikipedia:he:מדיה_ויקי:Gadget-purple.js יובאו
 
(24 גרסאות ביניים של משתמש אחר אחד אינן מוצגות)
שורה 1: שורה 1:
$.get(mw.util.wikiScript(), {
/* טיוטה */
        title: 'module:ערך לא קיים/רשימה.json',
 
        action: 'raw'
if (['ar', 'en', 'he'].includes(mw.config.get('wgUserLanguage'))) {
    })
$.get(mw.util.wikiScript(), {
    .done(function(data) {
        title: 'module:ערך לא קיים/רשימה.json',
        jsonlist = JSON.parse(data);
        action: 'raw'
        $('a')
    })
            .filter(function() {
    .done(function(data) {
                return Object.keys(jsonlist)
        jsonlist = JSON.parse(data);
                    .includes($(this)
        $('a')
                        .text());
            .filter(function() {
            })
                return Object.keys(jsonlist)
            .addClass('purple');
                    .includes($(this)
    });
                        .text());
            })
            .addClass('purple');
            $('.purple:not(.new)')
            .removeClass('purple')
            .addClass('notpurple');
            $('.purple')
            .css({color: 'violet'});
if ($('#blue').length > 0) {
            ($('#blue'))
            .append($('.notpurple'));
            $('.notpurple')
            .wrap($('<li>'));
}
nodes = document.querySelectorAll('.mw-parser-output br');
nodes.forEach(function(node) {
if (node.nextSibling &&
    node.nextSibling.nodeType === 1 &&
    node.nextSibling.tagName === 'BR') {
    node.remove();
    }
});
    });
}

גרסה אחרונה מ־20:06, 5 בדצמבר 2022

/* טיוטה */

if (['ar', 'en', 'he'].includes(mw.config.get('wgUserLanguage'))) {
	$.get(mw.util.wikiScript(), {
	        title: 'module:ערך לא קיים/רשימה.json',
	        action: 'raw'
	    })
	    .done(function(data) {
	        jsonlist = JSON.parse(data);
	        $('a')
	            .filter(function() {
	                return Object.keys(jsonlist)
	                    .includes($(this)
	                        .text());
	            })
	            .addClass('purple');
	            $('.purple:not(.new)')
	            	.removeClass('purple')
	            	.addClass('notpurple');
	            $('.purple')
	            	.css({color: 'violet'});
				if ($('#blue').length > 0) {
		            ($('#blue'))
		            	.append($('.notpurple'));
	    	        $('.notpurple')
	        	    	.wrap($('<li>'));
				}
				nodes = document.querySelectorAll('.mw-parser-output br');
				nodes.forEach(function(node) {
					if (node.nextSibling &&
					    node.nextSibling.nodeType === 1 &&
					    node.nextSibling.tagName === 'BR') {
					    	node.remove();
					    }
				});
	    });
}