מדיה ויקי:Gadget-purple.js: הבדלים בין גרסאות בדף
מראה
אין תקציר עריכה |
מ 27 גרסאות של הדף wikipedia:he:מדיה_ויקי:Gadget-purple.js יובאו |
||
| (19 גרסאות ביניים של משתמש אחר אחד אינן מוצגות) | |||
| שורה 1: | שורה 1: | ||
/* טיוטה */ | /* טיוטה */ | ||
if (['ar', 'en', 'he'].includes(mw.config.get('wgUserLanguage'))) { | |||
$.get(mw.util.wikiScript(), { | |||
$.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(); | |||
} | |||
}); | |||
}); | |||
} | |||
גרסה אחרונה מ־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();
}
});
});
}