Content deleted Content added
v0.4.0; https://github.com/ChlodAlejandro/deputy/releases/tag/v0.4.0 |
v0.4.1; https://github.com/ChlodAlejandro/deputy/releases/tag/v0.4.1 |
||
Line 1,019:
// All headings (h1, h2, h3, h4, h5, h6)
// TODO: l10n
const headlineElement = this.parsoid ?
el : el.querySelector('.mw-headline'); return (el.classList.contains('mw-heading') || /^H\d$/.test(el.tagName)) &&
headlineElement != null &&
/(Page|Article|Local file|File)s? \d+ (to|through) \d+$/.test(headlineElement.innerText);
Line 1,093 ⟶ 1,096:
sectionHeading = sectionHeading.parentElement;
}
}
// When DiscussionTools is being used, the header is wrapped in a div.
if (sectionHeading.parentElement.classList.contains('mw-heading')) {
sectionHeading = sectionHeading.parentElement;
}
const sectionMembers = [];
Line 1,750 ⟶ 1,757:
}
if (toCache.length > 0) {
const expandedData = yield window.deputy.
for (const revisionID in expandedData) {
revisionData.set(+revisionID, new ContributionSurveyRevision(this, expandedData[revisionID]));
Line 1,794 ⟶ 1,801:
return this.comment.replace(cloneRegex$1((ContributionSurveyRow.commentMatchRegex)[this.originalStatus], { post: '$' }), '').trim();
}
return '';
}
}
Line 3,554 ⟶ 3,562:
}
var version = "0.4.
var gitAbbrevHash = "
var gitBranch = "HEAD";
var gitDate = "
var gitVersion = "0.4.
/**
Line 3,933 ⟶ 3,941:
const li = this.originalList.children.item(i);
if (li.tagName !== 'LI') {
continue;
}
const anchor = li.querySelector('a:first-of-type');
Line 4,151 ⟶ 4,160:
yield this.getSection(Object.assign(wikitext, { revid }));
yield this.prepare();
if (heading.
// Intentional recursive call
heading.parentElement.insertAdjacentElement('afterend', this.render());
}
else {
// Intentional recursive call
heading.insertAdjacentElement('afterend', this.render());
}
// Run this asynchronously.
setTimeout(this.loadData.bind(this), 0);
Line 4,669 ⟶ 4,685:
}
yield casePage.addActiveSection(sectionId);
if (heading.
heading.parentElement.insertAdjacentElement('afterend', el.render());
}
else {
heading.insertAdjacentElement('afterend', el.render());
}
yield el.loadData();
mw.hook('deputy.load.cci.session').fire();
Line 5,701 ⟶ 5,722:
* API communication class
*/
class
/**
* Creates a Deputy API instance.
Line 12,828 ⟶ 12,849:
serialize: (v) => v.href,
deserialize: (v) => new URL(v),
defaultValue: new URL('https://
displayOptions: { type: 'text' },
alwaysSave: true
Line 15,773 ⟶ 15,794:
*/
constructor() {
this.
this.DeputyStorage = DeputyStorage;
this.DeputySession = DeputySession;
Line 15,863 ⟶ 15,884:
yield this.storage.init();
// Initialize the Deputy API interface
this.
// Initialize the Deputy preferences instance
this.prefs = new DeputyPreferences();
|