Content deleted Content added
DreamRimmer (talk | contribs) + Tag: Reverted |
DreamRimmer (talk | contribs) tweak |
||
(2 intermediate revisions by the same user not shown) | |||
Line 18:
mw.loader.using(['mediawiki.api', 'oojs-ui', 'mediawiki.util']).then(function () {
function addPortletLink() {
if (document.querySelector('li[data-mw-logaction^="delete/"]')) {▼
mw.util.addPortletLink(
'p-
'#',
'View metadata of deleted revisions',
Line 29:
document.getElementById('ca-show-deleted-revisions').addEventListener('click', function (e) {
e.preventDefault();
const
if (!logEntry) {▼
return;▼
}▼
if (!pageLink) {▼
return;▼
}▼
let pageTitle = urlParams.get('title');▼
fetchRevisions(pageTitle);
});
Line 122 ⟶ 110:
this.$nextButton = $('<button>')
.addClass('mw-ui-button')
.
.css({ 'margin-top': '1em' });
this.$body.append($('<div>').append(this.$nextButton));
Line 149 ⟶ 137:
if (!this.continuation) return;
if (this.$nextButton) {
this.$nextButton.prop('disabled', true).text('Loading...');
.empty()▼
}
const params = {
Line 207 ⟶ 193:
openedDialog.$body.css('overflow', 'auto');
window.revisionDialog = openedDialog;
}
▲ if (document.querySelector('li[data-mw-logaction^="delete/"]')) {
} else {
const params = {
prop: 'deletedrevisions',
drvprop: 'user|timestamp|tags|size',
drvlimit: 1,
formatversion: 2
new mw.Api().get(params).done(function (data) {
const pageData = data.query.pages[0];
if (pageData.deletedrevisions && pageData.deletedrevisions.length > 0) {
}).fail(function (error) {
console.error('Error checking for deleted revisions: ' + error);
});
}
|