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

אין תקציר עריכה
אין תקציר עריכה
שורה 557: שורה 557:
};
};
});
});
Object.keys(newmap)
whatsnewrec(newmap);
.map(whatsnewrec);
$('#newrevs')
$('#newrevs')
.append($('<span>', {
.append($('<span>', {
שורה 582: שורה 581:
}
}


function whatsnewrec(data) {
function whatsnewrec(newmap) {
var goldlength = $('.gold-' + data)
Object.keys(newmap)
.length;
.map(function(data){
if (defected[data])
var goldlength = $('.gold-' + data)
$('#newrevs')
.length;
.append($('<span>', {
if (defected[data])
text: newmap[data].title + ',' + langmark + ' '
$('#newrevs')
}));
.append($('<span>', {
else if (goldlength > 0)
text: newmap[data].title + ',' + langmark + ' '
$('#newrevs')
}));
.append($('<span>', {
else if (goldlength > 0)
text: newmap[data].title + ',' + langmark + ' ',
$('#newrevs')
id: 'gold-little-' + data
.append($('<span>', {
})
text: newmap[data].title + ',' + langmark + ' ',
.prepend($('.gold-' + data)
id: 'gold-little-' + data
.clone(true, true)[0]));
})
else {
.prepend($('.gold-' + data)
$('#newrevs')
.clone(true, true)[0]));
.append($('<span>', {
else {
text: ',' + langmark + ' '
$('#newrevs')
})
.append($('<span>', {
.prepend($('<a>', {
text: ',' + langmark + ' '
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() {
.prepend($('<a>', {
$(this)
text: newmap[data].title,
.parent()
href: 'https://he.wikipedia.org/w/index.php?title=' +
.remove();
newmap[data].title +
$('.yellowedit')
'&redirect=no&diff=cur&oldid=' + newmap[data].oldid,
.hide();
target: '_blank'
$('body')
})
.trigger('script-88-pretend-clicked');
.click(function() {
})));
$(this)
}
.parent()
.remove();
$('.yellowedit')
.hide();
$('body')
.trigger('script-88-pretend-clicked');
})));
}
});
}
}