मीडियाविकि:Gadget-twinkleprotect.js: रिवीजन सभ के बीचा में अंतर

Content deleted Content added
Update to commit 9bac3c
Update to commit 3965c7
लाइन 110:
var result = [];
 
$(xml).find('pr, flagged').each(function(index, prprotectionEntry) {
var $prprotectionEntry = $(prprotectionEntry);
var type, level, expiry, cascade = false;
if (protectionEntry.tagName.toLowerCase() === "flagged") {
boldnode.textContent type = "Pending changes: enabled";
level = $protectionEntry.attr('protection_level');
expiry = $protectionEntry.attr('protection_expiry');
} else {
type = Morebits.string.toUpperCaseFirstChar($protectionEntry.attr('type'));
level = $protectionEntry.attr('level');
expiry = $protectionEntry.attr('expiry');
cascade = $protectionEntry.attr('cascade') === '';
}
var boldnode = document.createElement('b');
boldnode.textContent = Morebits.string.toUpperCaseFirstChar($pr.attr('type')) + ": " + $pr.attr('level');
result.push(boldnode);
if ($pr.attr('expiry') === 'infinity') {
result.push(" (indefinite) ");
} else {
result.push(" (expires " + new Date($pr.attr('expiry')).toUTCString() + ") ");
}
if ($pr.attr('cascade') === '') {
result.push("(cascading) ");
}
});
 
var $flagged = $(xml).find('flagged');
if ($flagged.length) {
var boldnode = document.createElement('b');
// impossible for now to determine the PC level/expiry using API; bug 24068
boldnode.textContent = "Pending changes: enabled";
result.push(boldnode);
}
 
if (!result.length) {