User:Eejit43/scripts/script-updater.js

// // 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("#My_user_scripts.mw-headline").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=[""].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=>`* ${t.name} - ${t["short-description"]||t.description}${t["in-development"]?' ( in development )':""}${t["use-instead"]?' ( deprecated )':""}`).join(` `)}async editOrCreate(e,t,s){s+=" (via 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)});

// //# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vc2NyaXB0cy9zY3JpcHQtdXBkYXRlci50cyJdLAogICJzb3VyY2VzQ29udGVudCI6IFsiaW1wb3J0IHsgTWVkaWFXaWtpRGF0YUVycm9yIH0gZnJvbSAnLi4vZ2xvYmFsLXR5cGVzJztcblxuaW50ZXJmYWNlIFNjcmlwdCB7XG4gICAgbmFtZTogc3RyaW5nO1xuICAgICdpbi1kZXZlbG9wbWVudCc/OiBib29sZWFuO1xuICAgICd1c2UtaW5zdGVhZCc/OiBzdHJpbmc7XG4gICAgaW1hZ2U/OiBmYWxzZTtcbiAgICAnaW1hZ2UtY2FwdGlvbic/OiBzdHJpbmc7XG4gICAgJ3Nob3J0LWRlc2NyaXB0aW9uJzogc3RyaW5nO1xuICAgIGRlc2NyaXB0aW9uOiBzdHJpbmc7XG4gICAgdXNhZ2U/OiBzdHJpbmc7XG4gICAgY2hhbmdlbG9nPzogUmVjb3JkPHN0cmluZywgc3RyaW5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vciB9KTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5jb250ZW50ID0gbmV3IE9PLnVpLlBhbmVsTGF5b3V0KHsgcGFkZGVkOiB0cnVlLCBleHBhbmRlZDogZmFsc2UgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmNvbnRlbnQuJGVsZW1lbnQuYXBwZW5kKG1lc3NhZ2VFbGVtZW50LiRlbGVtZW50KTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgKHRoaXMgYXMgdW5rbm93biBhcyB7ICRib2R5OiBKUXVlcnkgfSkuJGJvZHkuYXBwZW5kKHRoaXMuY29udGVudC4kZWxlbWVudCk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuZ2V0QWN0aW9ucygpLnNldEFiaWxpdGllcyh7IHNhdmU6IGZhbHNlIH0pO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICB0aGlzLmNvbnRlbnQgPSBuZXcgT08udWkuUGFuZWxMYXlvdXQoeyBwYWRkZWQ6IHRydWUsIGV4cGFuZGVkOiBmYWxzZSB9KTtcblxuICAgICAgICAgICAgICAgICAgICBmb3IgKGNvbnN0IHNjcmlwdCBvZiB0aGlzLnNjcmlwdHMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGNoZWNrYm94ID0gbmV3IE9PLnVpLkNoZWNrYm94SW5wdXRXaWRnZXQoKTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5jaGVja2JveEVsZW1lbnRzLnB1c2goW3NjcmlwdC5uYW1lLCBjaGVja2JveF0pO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBsYXlvdXQgPSBuZXcgT08udWkuRmllbGRMYXlvdXQoY2hlY2tib3gsIHsgYWxpZ246ICdpbmxpbmUnLCBsYWJlbDogc2NyaXB0Lm5hbWUgfSk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuY29udGVudC4kZWxlbWVudC5hcHBlbmQobGF5b3V0LiRlbGVtZW50KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICh0aGlzIGFzIHVua25vd24gYXMgeyAkYm9keTogSlF1ZXJ5IH0pLiRib2R5LmFwcGVuZCh0aGlzLmNvbnRlbnQuJGVsZW1lbnQpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH07XG5cbiAgICAgICAgZ2V0QWN0aW9uUHJvY2VzcyA9IChhY3Rpb246IHN0cmluZykgPT4ge1xuICAgICAgICAgICAgaWYgKGFjdGlvbiA9PT0gJ2NhbmNlbCcpXG4gICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBPTy51aS5Qcm9jZXNzKCgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5nZXRNYW5hZ2VyKCkuY2xvc2VXaW5kb3codGhpcyk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBlbHNlIGlmIChhY3Rpb24gPT09ICdzYXZlJylcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IE9PLnVpLlByb2Nlc3MoKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBzZWxlY3RlZFNjcmlwdHMgPSBbXTtcbiAgICAgICAgICAgICAgICAgICAgZm9yIChjb25zdCBbc2NyaXB0TmFtZSwgY2hlY2tib3hdIG9mIHRoaXMuY2hlY2tib3hFbGVtZW50cykgaWYgKGNoZWNrYm94LmlzU2VsZWN0ZWQoKSkgc2VsZWN0ZWRTY3JpcHRzLnB1c2godGhpcy5zY3JpcHRzLmZpbmQoKHNjcmlwdCkgPT4gc2NyaXB0Lm5hbWUgPT09IHNjcmlwdE5hbWUpISk7XG5cbiAgICAgICAgICAgICAgICAgICAgdGhpcy5nZXRNYW5hZ2VyKCkuY2xvc2VXaW5kb3codGhpcyk7XG5cbiAgICAgICAgICAgICAgICAgICAgKGFzeW5jICgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG13Lm5vdGlmeSgnU3luY2luZyBzY3JpcHRzLi4uJywgeyB0YWc6ICdzeW5jLXNjcmlwdHMtbm90aWZpY2F0aW9uJyB9KTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgYXdhaXQgUHJvbWlzZS5hbGwoc2VsZWN0ZWRTY3JpcHRzLm1hcCgoc2NyaXB0KSA9PiB0aGlzLmhhbmRsZVNjcmlwdChzY3JpcHQpKSk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGF3YWl0IHRoaXMuZWRpdE9yQ3JlYXRlKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdVc2VyOkVlaml0NDMvc2NyaXB0cy1pbmZvJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubWFwU2NyaXB0cyh0aGlzLnNjcmlwdHMuZmlsdGVyKChzY3JpcHQpID0+ICFzY3JpcHQucGVyc29uYWwgJiYgIXNjcmlwdC5mb3JrKSksIC8vXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICcnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnPT09IEZvcmtzID09PScsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubWFwU2NyaXB0cyh0aGlzLnNjcmlwdHMuZmlsdGVyKChzY3JpcHQpID0+IHNjcmlwdC5mb3JrKSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICcnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnPT09IFBlcnNvbmFsIHNjcmlwdHMgPT09JyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5tYXBTY3JpcHRzKHRoaXMuc2NyaXB0cy5maWx0ZXIoKHNjcmlwdCkgPT4gc2NyaXB0LnBlcnNvbmFsKSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXS5qb2luKCdcXG4nKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnU3luY2luZyBzY3JpcHQgbGlzdCBmcm9tIEdpdEh1YicsXG4gICAgICAgICAgICAgICAgICAgICAgICApO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICBtdy5ub3RpZnkoYFN5bmNlZCAke3NlbGVjdGVkU2NyaXB0cy5sZW5ndGh9IHNjcmlwdCR7c2VsZWN0ZWRTY3JpcHRzLmxlbmd0aCA9PT0gMSA/ICcnIDogJ3MnfSBmcm9tIEdpdEh1YiFgLCB7IHR5cGU6ICdzdWNjZXNzJywgdGFnOiAnc3luYy1zY3JpcHRzLW5vdGlmaWNhdGlvbicgfSk7XG4gICAgICAgICAgICAgICAgICAgIH0pKCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBlbHNlIHJldHVybiBTY3JpcHRVcGRhdGVyRGlhbG9nLnN1cGVyLnByb3RvdHlwZS5nZXRBY3Rpb25Qcm9jZXNzLmNhbGwodGhpcywgYWN0aW9uKTtcbiAgICAgICAgfTtcblxuICAgICAgICBnZXRUZWFyZG93blByb2Nlc3MgPSAoKSA9PiB7XG4gICAgICAgICAgICByZXR1cm4gU2NyaXB0VXBkYXRlckRpYWxvZy5zdXBlci5wcm90b3R5cGUuZ2V0VGVhcmRvd25Qcm9jZXNzLmNhbGwodGhpcykubmV4dCgoKSA9PiB7XG4gICAgICAgICAgICAgICAgKHRoaXMgYXMgdW5rbm93biBhcyB7ICRib2R5OiBKUXVlcnkgfSkuJGJvZHkuZW1wdHkoKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9O1xuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBXcmFwcyBhbiBhc3luYyBtZXRob2QgaW50byBhIGpRdWVyeSBEZWZlcnJlZCBvYmplY3QuXG4gICAgICAgICAqIEBwYXJhbSBtZXRob2QgVGhlIG1ldGhvZCB0byB3c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cHQuZGVzY3JpcHRpb259YCxcbiAgICAgICAgICAgICAgICBzY3JpcHQudXNhZ2UgPyBgfCB1c2FnZSAgICAgICAgICAgICA9ICR7c2NyaXB0LnVzYWdlfWAgOiBudWxsLFxuICAgICAgICAgICAgICAgIHNjcmlwdC5jaGFuZ2Vsb2dcbiAgICAgICAgICAgICAgICAgICAgPyBgfCBjaGFuZ2Vsb2cgICAgICAgICA9IFxcbiR7T2JqZWN0LmVudHJpZXMoc2NyaXB0LmNoYW5nZWxvZylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgLm1hcChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChbZGF0ZSwgZGVzY3JpcHRpb25dKSA9PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGAqICcnJ3t7c3RhcnQgZGF0ZSBhbmQgYWdlfCR7ZGF0ZX19fTonJycke0FycmF5LmlzQXJyYXkoZGVzY3JpcHRpb24pID8gYFxcbiR7ZGVzY3JpcHRpb24ubWFwKChsaW5lKSA9PiBgKiogJHtsaW5lfWApLmpvaW4oJ1xcbicpfWAgOiBgICR7ZGVzY3JpcHRpb259YH1gLFxuICAgICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgICAgIC5qb2luKCdcXG4nKX1gXG4gICAgICAgICAgICAgICAgICAgIDogbnVsbCxcbiAgICAgICAgICAgICAgICBgfCBza2luLXN1cHBvcnQgICAgICA9IHt7VXNlcjpFZWppdDQzL3NraW4tc3VwcG9ydHwke09iamVjdC5lbnRyaWVzKHNjcmlwdFsnc2tpbi1zdXBwb3J0J10pXG4gICAgICAgICAgICAgICAgICAgIC5tYXAoKFtza2luLCBzdGF0dXNdKSA9PiBgJHtza2lufT0ke3N0YXR1c31gKVxuICAgICAgICAgICAgICAgICAgICAuam9pbignfCcpfX19YCxcbiAgICAgICAgICAgICAgICBgfCByZWxlYXNlZCAgICAgICAgICA9IHt7c3RhcnQgZGF0ZSBhbmQgYWdlfC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G4gICAgICAgICAgICAgICAgLmNhdGNoKGFzeW5jIChlcnJvckNvZGU6IHN0cmluZywgZXJyb3JJbmZvOiBNZWRpYVdpa2lEYXRhRXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGVycm9yQ29kZSA9PT0gJ25vY3JlYXRlLW1pc3NpbmcnKVxuICAgICAgICAgICAgICAgICAgICAgICAgYXdhaXQgbmV3IG13LkFwaSgpLmNyZWF0ZSh0aXRsZSwgeyBzdW1tYXJ5LCB3YXRjaGxpc3Q6ICd3YXRjaCcgfSwgdGV4dCkuY2F0Y2goKGVycm9yQ29kZTogc3RyaW5nLCBlcnJvckluZm86IE1lZGlhV2lraURhdGFFcnJvcikgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG13Lm5vdGlmeShgRXJyb3IgY3JlYXRpbmcgJHt0aXRsZX06ICR7ZXJyb3JJbmZvPy5lcnJvci5pbmZvID8/ICdVbmtub3duIGVycm9yJ30gKCR7ZXJyb3JDb2RlfSlgLCB7IHR5cGU6ICdlcnJvcicgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgbXcubm90aWZ5KGBFcnJvciBlZGl0aW5nIG9yIGNyZWF0aW5nICR7dGl0bGV9OiAke2Vycm9ySW5mbz8uZXJyb3IuaW5mbyA/PyAnVW5rbm93biBlcnJvcid9ICgke2Vycm9yQ29kZX0pYCwgeyB0eXBlOiAnZXJyb3InIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBPYmplY3QuYXNzaWduKFNjcmlwdFVwZGF0ZXJEaWFsb2cucHJvdG90eXBlLCBPTy51aS5Qcm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