User:Chlod/Scripts/Deputy.js: Difference between revisions

Content deleted Content added
(bot/CD)
(bot/CD)
Line 351:
 
var version = "0.5.1";
var gitAbbrevHash = "c20a04f39ca6c5";
var gitBranch = "main";
var gitDate = "MonWed, 1214 Feb 2024 0009:5451:1530 +0800";
var gitVersion = "0.5.1+gc20a04fg39ca6c5";
 
/**
Line 13,877:
// page was made, and we need to switch to it.
if (this.core.lastEdited.get() < liveWikiConfig.core.lastEdited) {
// Don't update if the config version is higher than ours. We don't want
// to load in the config of a newer version, as it may break things.
// Deputy should load in the newer version of the script soon enough,
// and the config will be parsed by a version that supports it.
if (liveWikiConfig.core.configVersion > this.core.configVersion.get()) {
return;
}
const onSuccess = () => {
var _a;
Line 13,898 ⟶ 13,905:
wt: JSON.stringify(liveWikiConfig)
});
// Save to local storage.
mw.storage.set(WikiConfiguration.optionKey, rawConfigInfo);
// Save to user options (for faster first-load times).
yield MwApi.action.saveOption(WikiConfiguration.optionKey, rawConfigInfo).then(() => {
var _a;