MediaWiki:Gadget-twinkleprotect.js: Perbedaan antara revisi

Konten dihapus Konten ditambahkan
Repo at d9666d4: Update Twinkle from upstream
Repo at a491314: tracking branch 'upstream/master'; re-enable check for flaggedrevs/pending changes being enabled; Don't fail if flaggedrevs/pending changes aren't enabled"
Baris 124:
};
 
// mw.loader.getState('ext.flaggedRevs.review') returns null if the
// wgFlaggedRevsParams contains an object, tags. If flagged_revisions is enabled,
// FlaggedRevs extension is not registered. Previously, this was done with
// it will be populated with things like accuracy, depth, or tone. With enwiki's
// wgFlaggedRevsParams, but after 1.34-wmf4 it is no longer exported if empty
// Pending Changes, it exists but is empty. If flaggedrevs is not enabled, it will not exist.
// (https://gerrit.wikimedia.org/r/c/mediawiki/extensions/FlaggedRevs/+/508427)
Twinkle.protect.fetchProtectionLevel = function twinkleprotectFetchProtectionLevel() {
 
Baris 137 ⟶ 138:
letype: 'protect',
letitle: mw.config.get('wgPageName'),
prop: (mw.configloader.existsgetState('wgFlaggedRevsParamsext.flaggedRevs.review') ? 'info|flagged' : 'info'),
inprop: 'protection',
titles: mw.config.get('wgPageName')
Baris 150 ⟶ 151:
 
var earlyDecision = [protectDeferred];
if (mw.configloader.existsgetState('wgFlaggedRevsParamsext.flaggedRevs.review')) {
earlyDecision.push(stableDeferred);
}
Baris 190 ⟶ 191:
// show the protection level and log info
Twinkle.protect.hasProtectLog = !!protectData[0].query.logevents.length;
Twinkle.protect.hasStableLog = mw.configloader.existsgetState('wgFlaggedRevsParamsext.flaggedRevs.review') ? !!stableData[0].query.logevents.length : false;
Twinkle.protect.currentProtectionLevels = current;
 
Baris 439 ⟶ 440:
]
});
if (mw.configloader.existsgetState('wgFlaggedRevsParamsext.flaggedRevs.review')) {
field2.append({
type: 'checkbox',