User:Eejit43/scripts/script-updater.js
Appearance
< User:Eejit43 | scripts
Code that you insert on this page could contain malicious content capable of compromising your account. If you import a script from another page with "importScript", "mw.loader.load", "iusc", or "lusc", take note that this causes you to dynamically load a remote script, which could be changed by others. Editors are responsible for all edits and actions they perform, including by scripts. User scripts are not centrally supported and may malfunction or become inoperable due to software changes. A guide to help you find broken scripts is available. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. This code will be executed when previewing this page. |
![]() | Documentation for this user script can be added at User:Eejit43/scripts/script-updater. |
// <nowiki>
// Note: This script was compiled and minified from TypeScript. For a more readable version, see https://github.com/Eejit43/wikipedia-scripts/blob/main/scripts/script-updater.ts
"use strict";mw.loader.using(["mediawiki.util","oojs-ui-core","oojs-ui-widgets","oojs-ui-windows"],()=>{if(mw.config.get("wgUserName")!=="Eejit43"||mw.config.get("wgPageName")!=="User:Eejit43")return;const m=document.querySelector(".mw-editsection").cloneNode(!0),r=document.createElement("a");r.href="#",r.style.fontWeight="bold",r.textContent="Sync from GitHub",r.addEventListener("click",h=>{h.preventDefault();const e=new OO.ui.WindowManager;document.body.append(e.$element[0]);const t=new i;e.addWindows([t]),t.open()}),m.querySelector("a").replaceWith(r),document.querySelector("h2#My_user_scripts + .mw-editsection").after(m);class i extends OO.ui.ProcessDialog{repoOwner="Eejit43";repoName="wikipedia-scripts";content;checkboxElements=[];latestCommitHash;scripts;constructor(){super({size:"medium"}),i.static.name="ScriptUpdaterDialog",i.static.title="What scripts do you want to update?",i.static.actions=[{action:"cancel",label:"Close",flags:["safe","close"]},{action:"save",label:"Run",flags:["primary","progressive"]}]}getSetupProcess=()=>i.super.prototype.getSetupProcess.call(this).next(()=>this.wrapAsyncMethod(this.loadScriptData).then(e=>{if(e){const t=new OO.ui.MessageWidget({type:"error",label:e});this.content=new OO.ui.PanelLayout({padded:!0,expanded:!1}),this.content.$element.append(t.$element),this.$body.append(this.content.$element),this.getActions().setAbilities({save:!1});return}this.content=new OO.ui.PanelLayout({padded:!0,expanded:!1});for(const t of this.scripts){const s=new OO.ui.CheckboxInputWidget;this.checkboxElements.push([t.name,s]);const a=new OO.ui.FieldLayout(s,{align:"inline",label:t.name});this.content.$element.append(a.$element)}this.$body.append(this.content.$element)}));getActionProcess=e=>e==="cancel"?new OO.ui.Process(()=>{this.getManager().closeWindow(this)}):e==="save"?new OO.ui.Process(()=>{const t=[];for(const[s,a]of this.checkboxElements)a.isSelected()&&t.push(this.scripts.find(o=>o.name===s));this.getManager().closeWindow(this),(async()=>(mw.notify("Syncing scripts...",{tag:"sync-scripts-notification"}),await Promise.all(t.map(s=>this.handleScript(s))),await this.editOrCreate("User:Eejit43/scripts-info",[this.mapScripts(this.scripts.filter(s=>!s.personal&&!s.fork)),"","=== Forks ===",this.mapScripts(this.scripts.filter(s=>s.fork)),"","=== Personal scripts ===",this.mapScripts(this.scripts.filter(s=>s.personal))].join(`
`),"Syncing script list from GitHub"),mw.notify(`Synced ${t.length} script${t.length===1?"":"s"} from GitHub!`,{type:"success",tag:"sync-scripts-notification"})))()}):i.super.prototype.getActionProcess.call(this,e);getTeardownProcess=()=>i.super.prototype.getTeardownProcess.call(this).next(()=>{this.$body.empty()});wrapAsyncMethod(e){const t=$.Deferred();return e().then(s=>t.resolve(s)),t.promise()}loadScriptData=async()=>{const e=await fetch(`https://api.github.com/repos/${this.repoOwner}/${this.repoName}/commits`);if(!e.ok)return`Failed to fetch latest commit hash from GitHub: ${e.statusText} (${e.status})`;this.latestCommitHash=(await e.json())[0].sha;const t=await fetch(`https://raw.githubusercontent.com/${this.repoOwner}/${this.repoName}/${this.latestCommitHash}/scripts.json`);if(!t.ok)return`Failed to fetch script data from GitHub: ${t.statusText} (${t.status})`;this.scripts=await t.json()};async handleScript(e){const t=`User:Eejit43/scripts/${e.name}`,s=`User talk:Eejit43/scripts/${e.name}`,a=`${t}.js`,o=`${t}.css`,u=["{{User:Eejit43/script-documentation",e.image===!1?`| image = ${e.image}`:null,e["in-development"]?`| in-development = ${e["in-development"]}`:null,e["use-instead"]?`| use-instead = [[User:Eejit43/scripts/${e["use-instead"]}|${e["use-instead"]}]]`:null,e["image-caption"]?`| image-caption = ${e["image-caption"]}`:null,e["other-authors"]?`| other-authors = ${e["other-authors"].map(n=>`[[User:${n}|${n}]]`).join(", ")}`:null,`| description-short = ${e["short-description"]}`,`| description = ${e.description}`,e.usage?`| usage = ${e.usage}`:null,e.changelog?`| changelog =
${Object.entries(e.changelog).map(([n,l])=>`* '''{{start date and age|${n}}}:'''${Array.isArray(l)?`
${l.map(g=>`** ${g}`).join(`
`)}`:` ${l}`}`).join(`
`)}`:null,`| skin-support = {{User:Eejit43/skin-support|${Object.entries(e["skin-support"]).map(([n,l])=>`${n}=${l}`).join("|")}}}`,`| released = {{start date and age|${e.released}}}`,`| updated = {{start date and age|${e.updated}}}`,"}}"].filter(Boolean);let c=null;const p=await fetch(`https://raw.githubusercontent.com/${this.repoOwner}/${this.repoName}/${this.latestCommitHash}/dist/scripts/${e.name}.js`);if(p.ok)c=await p.text();else return mw.notify(`Failed to fetch "${e.name}.js" from GitHub: ${p.statusText} (${p.status})`,{type:"error",tag:"sync-scripts-notification"});let d=null;if(e.css){const n=await fetch(`https://raw.githubusercontent.com/${this.repoOwner}/${this.repoName}/${this.latestCommitHash}/dist/styles/${e.name}.css`);n.ok?d=await n.text():mw.notify(`Failed to fetch "${e.name}.css" from GitHub: ${n.statusText} (${n.status})`,{type:"error",tag:"sync-scripts-notification"})}e.personal||(await this.editOrCreate(t,u.join(`
`),"Syncing script documentation from GitHub"),await this.editOrCreate(s,"#REDIRECT [[User talk:Eejit43]]","Redirecting script documentation talk page to main user talk page")),c&&await this.editOrCreate(a,c,"Syncing script from GitHub"),e.css&&d&&await this.editOrCreate(o,d,"Syncing styles from GitHub")}mapScripts(e){return e.map(t=>`* [[User:Eejit43/scripts/${t.name}${t.personal?".js":""}|${t.name}]] - ${t["short-description"]||t.description}${t["in-development"]?' (<span style="color: #bd2828">in development</span>)':""}${t["use-instead"]?' (<span style="color: #bd2828">deprecated</span>)':""}`).join(`
`)}async editOrCreate(e,t,s){s+=" (via [[User:Eejit43/scripts/script-updater.js|script]])",await new mw.Api().edit(e,()=>({text:t,summary:s,watchlist:"watch"})).catch(async(a,o)=>{if(a==="nocreate-missing")await new mw.Api().create(e,{summary:s,watchlist:"watch"},t).catch((u,c)=>{mw.notify(`Error creating ${e}: ${c?.error.info??"Unknown error"} (${u})`,{type:"error"})});else{mw.notify(`Error editing or creating ${e}: ${o?.error.info??"Unknown error"} (${a})`,{type:"error"});return}})}}Object.assign(i.prototype,OO.ui.ProcessDialog.prototype)});
// </nowiki>
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc2NyaXB0cy9zY3JpcHQtdXBkYXRlci50cyJdLAogICJzb3VyY2VzQ29udGVudCI6IFsiaW1wb3J0IHsgTWVkaWFXaWtpRGF0YUVycm9yIH0gZnJvbSAnLi4vZ2xvYmFsLXR5cGVzJztcblxuaW50ZXJmYWNlIFNjcmlwdCB7XG4gICAgbmFtZTogc3RyaW5nO1xuICAgICdpbi1kZXZlbG9wbWVudCc/OiBib29sZWFuO1xuICAgICd1c2UtaW5zdGVhZCc/OiBzdHJpbmc7XG4gICAgaW1hZ2U/OiBmYWxzZTtcbiAgICAnaW1hZ2UtY2FwdGlvbic/OiBzdHJpbmc7XG4gICAgJ3Nob3J0LWRlc2NyaXB0aW9uJzogc3RyaW5nO1xuICAgIGRlc2NyaXB0aW9uOiBzdHJpbmc7XG4gICAgdXNhZ2U/OiBzdHJpbmc7XG4gICAgY2hhbmdlbG9nPzogUmVjb3JkPHN0cmluZywgc3RyaW5nIHwgc3RyaW5nW10+O1xuICAgICdvdGhlci1hdXRob3JzJz86IHN0cmluZ1tdO1xuICAgIGZvcms/OiB0cnVlO1xuICAgIHBlcnNvbmFsPzogdHJ1ZTtcbiAgICAnc2tpbi1zdXBwb3J0JzogUmVjb3JkPHN0cmluZywgYm9vb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ICAgICAgICAgIHRoaXMuY29udGVudC4kZWxlbWVudC5hcHBlbmQobWVzc2FnZUVsZW1lbnQuJGVsZW1lbnQpO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAodGhpcyBhcyB1bmtub3duIGFzIHsgJGJvZHk6IEpRdWVyeSB9KS4kYm9keS5hcHBlbmQodGhpcy5jb250ZW50LiRlbGVtZW50KTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5nZXRBY3Rpb25zKCkuc2V0QWJpbGl0aWVzKHsgc2F2ZTogZmFsc2UgfSk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuY29udGVudCA9IG5ldyBPTy51aS5QYW5lbExheW91dCh7IHBhZGRlZDogdHJ1ZSwgZXhwYW5kZWQ6IGZhbHNlIH0pO1xuXG4gICAgICAgICAgICAgICAgICAgIGZvciAoY29uc3Qgc2NyaXB0IG9mIHRoaXMuc2NyaXB0cykge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgY2hlY2tib3ggPSBuZXcgT08udWkuQ2hlY2tib3hJbnB1dFdpZGdldCgpO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmNoZWNrYm94RWxlbWVudHMucHVzaChbc2NyaXB0Lm5hbWUsIGNoZWNrYm94XSk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGxheW91dCA9IG5ldyBPTy51aS5GaWVsZExheW91dChjaGVja2JveCwgeyBhbGlnbjogJ2lubGluZScsIGxhYmVsOiBzY3JpcHQubmFtZSB9KTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5jb250ZW50LiRlbGVtZW50LmFwcGVuZChsYXlvdXQuJGVsZW1lbnQpO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgKHRoaXMgYXMgdW5rbm93biBhcyB7ICRib2R5OiBKUXVlcnkgfSkuJGJvZHkuYXBwZW5kKHRoaXMuY29udGVudC4kZWxlbWVudCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfTtcblxuICAgICAgICBnZXRBY3Rpb25Qcm9jZXNzID0gKGFjdGlvbjogc3RyaW5nKSA9PiB7XG4gICAgICAgICAgICBpZiAoYWN0aW9uID09PSAnY2FuY2VsJylcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IE9PLnVpLlByb2Nlc3MoKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmdldE1hbmFnZXIoKS5jbG9zZVdpbmRvdyh0aGlzKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGVsc2UgaWYgKGFjdGlvbiA9PT0gJ3NhdmUnKVxuICAgICAgICAgICAgICAgIHJldHVybiBuZXcgT08udWkuUHJvY2VzcygoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHNlbGVjdGVkU2NyaXB0cyA9IFtdO1xuICAgICAgICAgICAgICAgICAgICBmb3IgKGNvbnN0IFtzY3JpcHROYW1lLCBjaGVja2JveF0gb2YgdGhpcy5jaGVja2JveEVsZW1lbnRzKSBpZiAoY2hlY2tib3guaXNTZWxlY3RlZCgpKSBzZWxlY3RlZFNjcmlwdHMucHVzaCh0aGlzLnNjcmlwdHMuZmluZCgoc2NyaXB0KSA9PiBzY3JpcHQubmFtZSA9PT0gc2NyaXB0TmFtZSkhKTtcblxuICAgICAgICAgICAgICAgICAgICB0aGlzLmdldE1hbmFnZXIoKS5jbG9zZVdpbmRvdyh0aGlzKTtcblxuICAgICAgICAgICAgICAgICAgICAoYXN5bmMgKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgbXcubm90aWZ5KCdTeW5jaW5nIHNjcmlwdHMuLi4nLCB7IHRhZzogJ3N5bmMtc2NyaXB0cy1ub3RpZmljYXRpb24nIH0pO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICBhd2FpdCBQcm9taXNlLmFsbChzZWxlY3RlZFNjcmlwdHMubWFwKChzY3JpcHQpID0+IHRoaXMuaGFuZGxlU2NyaXB0KHNjcmlwdCkpKTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgYXdhaXQgdGhpcy5lZGl0T3JDcmVhdGUoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ1VzZXI6RWVqaXQ0My9zY3JpcHRzLWluZm8nLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5tYXBTY3JpcHRzKHRoaXMuc2NyaXB0cy5maWx0ZXIoKHNjcmlwdCkgPT4gIXNjcmlwdC5wZXJzb25hbCAmJiAhc2NyaXB0LmZvcmspKSwgLy9cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJycsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICc9PT0gRm9ya3MgPT09JyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5tYXBTY3JpcHRzKHRoaXMuc2NyaXB0cy5maWx0ZXIoKHNjcmlwdCkgPT4gc2NyaXB0LmZvcmspKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJycsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICc9PT0gUGVyc29uYWwgc2NyaXB0cyA9PT0nLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLm1hcFNjcmlwdHModGhpcy5zY3JpcHRzLmZpbHRlcigoc2NyaXB0KSA9PiBzY3JpcHQucGVyc29uYWwpKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBdLmpvaW4oJ1xcbicpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdTeW5jaW5nIHNjcmlwdCBsaXN0IGZyb20gR2l0SHViJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICk7XG5cbiAgIC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8IGNoYW5nZWxvZyAgICAgICAgID0gXFxuJHtPYmplY3QuZW50cmllcyhzY3JpcHQuY2hhbmdlbG9nKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAubWFwKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKFtkYXRlLCBkZXNjcmlwdGlvbl0pID0+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYCogJycne3tzdGFydCBkYXRlIGFuZCBhZ2V8JHtkYXRlfX19OicnJyR7QXJyYXkuaXNBcnJheShkZXNjcmlwdGlvbikgPyBgXFxuJHtkZXNjcmlwdGlvbi5tYXAoKGxpbmUpID0+IGAqKiAke2xpbmV9YCkuam9pbignXFxuJyl9YCA6IGAgJHtkZXNjcmlwdGlvbn1gfWAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgLmpvaW4oJ1xcbicpfWBcbiAgICAgICAgICAgICAgICAgICAgOiBudWxsLFxuICAgICAgICAgICAgICAgIGB8IHNraW4tc3VwcG9ydCAgICAgID0ge3tVc2VyOkVlaml0NDMvc2tpbi1zdXBwb3J0fCR7T2JqZWN0LmVudHJpZXMoc2NyaXB0Wydza2luLXN1cHBvcnQnXSlcbiAgICAgICAgICAgICAgICAgICAgLm1hcCgoW3NraW4sIHN0YXR1c10pID0+IGAke3NraW59PSR7c3RhdHVzfWApXG4gICAgICAgICAgICAgICAgICAgIC5qb2luKCd8Jyl9fX1gLFxuICAgICAgICAgICAgICAgIGB8IHJlbGVhc2VkICAgICAgICAgID0ge3tzdGFydCBkYXRlIGFuZCBhZ2V8JHtzY3JpcHQucmVsZWFzZWR9fX1gLFxuICAgICAgICAgICAgICAgIGB8IHVwZGF0ZWQgICAgICAgICAgID0ge3tzdGFydCBkYXRlIGFuZCBhZ2V8JHtzY3JpcHQudXBkYXRlZH19fWAsXG4gICAgICAgICAgICAgICAgJ319JyxcbiAgICAgICAgICAgIF0uZmlsdGVyKEJvb2xlYW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G4gICAgICAgICAgICAgICAgICAgICAgICBhd2FpdCBuZXcgbXcuQXBpKCkuY3JlYXRlKHRpdGxlLCB7IHN1bW1hcnksIHdhdGNobGlzdDogJ3dhdGNoJyB9LCB0ZXh0KS5jYXRjaCgoZXJyb3JDb2RlOiBzdHJpbmcsIGVycm9ySW5mbzogTWVkaWFXaWtpRGF0YUVycm9yKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbXcubm90aWZ5KGBFcnJvciBjcmVhdGluZyAke3RpdGxlfTogJHtlcnJvckluZm8/LmVycm9yLmluZm8gPz8gJ1Vua25vd24gZXJyb3InfSAoJHtlcnJvckNvZGV9KWAsIHsgdHlwZTogJ2Vycm9yJyB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBtdy5ub3RpZnkoYEVycm9yIGVkaXRpbmcgb3IgY3JlYXRpbmcgJHt0aXRsZX06ICR7ZXJyb3JJbmZvPy5lcnJvci5pbmZvID8/ICdVbmtub3duIGVycm9yJ30gKCR7ZXJyb3JDb2RlfSlgLCB7IHR5cGU6ICdlcnJvcicgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIE9iamVjdC5hc3NpZ24oU2NyaXB0VXBkYXRlckRpYWxvZy5wcm90b3R5cGUsIE9PLnVpLlByb2Nlc3NEaWFsb2cucHJvdG90eXBlKTtcbn0pO1xuIl0sCiAgIm1hcHBpbmdzIjogIjs7O2FBcUJBLEdBQUcsT0FBTyxNQUFNLENBQUMsaUJBQWtCLGVBQWdCLGtCQUFtQixpQkFBaUIsRUFBRyxJQUFNLENBQzVGLEdBQUksR0FBRyxPQUFPLElBQUksWUF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