מדיה ויקי:Gadget-WLM.js: הבדלים בין גרסאות בדף
אין תקציר עריכה |
אין תקציר עריכה |
||
| שורה 557: | שורה 557: | ||
}; | }; | ||
}); | }); | ||
whatsnewrec(newmap); | |||
$('#newrevs') | $('#newrevs') | ||
.append($('<span>', { | .append($('<span>', { | ||
| שורה 582: | שורה 581: | ||
} | } | ||
function whatsnewrec(data) { | function whatsnewrec(newmap) { | ||
Object.keys(newmap) | |||
.map(function(data){ | |||
var goldlength = $('.gold-' + data) | |||
.length; | |||
if (defected[data]) | |||
$('#newrevs') | |||
.append($('<span>', { | |||
text: newmap[data].title + ',' + langmark + ' ' | |||
})); | |||
else if (goldlength > 0) | |||
$('#newrevs') | |||
.append($('<span>', { | |||
text: newmap[data].title + ',' + langmark + ' ', | |||
id: 'gold-little-' + data | |||
}) | |||
.prepend($('.gold-' + data) | |||
.clone(true, true)[0])); | |||
else { | |||
$('#newrevs') | |||
.append($('<span>', { | |||
text: ',' + langmark + ' ' | |||
}) | }) | ||
.click(function() { | .prepend($('<a>', { | ||
text: newmap[data].title, | |||
href: 'https://he.wikipedia.org/w/index.php?title=' + | |||
newmap[data].title + | |||
'&redirect=no&diff=cur&oldid=' + newmap[data].oldid, | |||
target: '_blank' | |||
}) | |||
.click(function() { | |||
$(this) | |||
} | .parent() | ||
.remove(); | |||
$('.yellowedit') | |||
.hide(); | |||
$('body') | |||
.trigger('script-88-pretend-clicked'); | |||
}))); | |||
} | |||
}); | |||
} | } | ||