מדיה ויקי:Gadget-purple.js: הבדלים בין גרסאות בדף
מ IKhitron העביר את הדף משתמש:IKhitron/purple.js לשם מדיה ויקי:Purple.js בלי להשאיר הפניה |
מ 27 גרסאות של הדף wikipedia:he:מדיה_ויקי:Gadget-purple.js יובאו |
||
| (23 גרסאות ביניים של משתמש אחר אחד אינן מוצגות) | |||
| שורה 1: | שורה 1: | ||
$.get(mw.util.wikiScript(), { | /* טיוטה */ | ||
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(); | |||
} | |||
}); | |||
}); | |||
} | |||