diff --git a/.arclint b/.arclint index 847e461..8647a44 100644 --- a/.arclint +++ b/.arclint @@ -16,7 +16,12 @@ }, "jshint": { "type": "jshint", - "include": "(\\.js$)" + "include": [ + "(\\.cjs$)", + "(\\.js$)", + "(\\.mjs$)" + ], + "jshint.jshintrc": ".jshint.json" }, "json": { "type": "json", diff --git a/.github/dependabot.yml b/.github/dependabot.yml index a24f93a..3779f7d 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -3,45 +3,44 @@ version: 2 updates: - # Maintain dependencies for Docker - - package-ecosystem: "docker" + - package-ecosystem: 'docker' assignees: - - "revi" + - 'revi' # Dockerfiles are stored in `container/lighthouse-ci-server/. - directory: "container/lighthouse-ci-server" + directory: 'container/lighthouse-ci-server' schedule: - interval: "weekly" - day: "monday" - time: "10:00" - timezone: "Asia/Seoul" - target-branch: "master" + interval: 'weekly' + day: 'monday' + time: '10:00' + timezone: 'Asia/Seoul' + target-branch: 'master' labels: [] # Maintain dependencies for GitHub Actions - - package-ecosystem: "github-actions" + - package-ecosystem: 'github-actions' assignees: - - "revi" + - 'revi' # Workflow files stored in the default location of `.github/workflows`. # You don't need to specify `/.github/workflows` for `directory`. # You can use `directory: "/"`. - directory: "/" + directory: '/' schedule: - interval: "weekly" - day: "monday" - time: "10:00" - timezone: "Asia/Seoul" - target-branch: "master" + interval: 'weekly' + day: 'monday' + time: '10:00' + timezone: 'Asia/Seoul' + target-branch: 'master' labels: [] # Maintain dependencies for NPM - - package-ecosystem: "npm" + - package-ecosystem: 'npm' assignees: - - "revi" + - 'revi' # npm packages are stored in the default location of `package.json`. - directory: "/" + directory: '/' schedule: - interval: "weekly" - day: "monday" - time: "10:00" - timezone: "Asia/Seoul" - target-branch: "master" + interval: 'weekly' + day: 'monday' + time: '10:00' + timezone: 'Asia/Seoul' + target-branch: 'master' labels: [] diff --git a/.github/workflows/build-container.yml b/.github/workflows/build-container.yml index 5aa28ba..f38cc4a 100644 --- a/.github/workflows/build-container.yml +++ b/.github/workflows/build-container.yml @@ -1,4 +1,4 @@ -name: "Build container images" +name: 'Build container images' on: push: paths: @@ -16,27 +16,27 @@ env: jobs: container-build: - name: "Build and publish containers to GitHub Container Registry" + name: 'Build and publish containers to GitHub Container Registry' permissions: contents: read packages: write attestations: write runs-on: ubuntu-latest steps: - - name: "Checkout the repository" + - name: 'Checkout the repository' uses: actions/checkout@v4 - - name: "Log in to the Container registry" + - name: 'Log in to the Container registry' uses: docker/login-action@v3.2.0 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: "Extract metadata (tags, labels) for Docker" + - name: 'Extract metadata (tags, labels) for Docker' id: meta uses: docker/metadata-action@v5.5.1 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - - name: "Build and push Docker image" + - name: 'Build and push Docker image' id: push uses: docker/build-push-action@v5.3.0 with: diff --git a/.github/workflows/quicksyntaxcheck.yml b/.github/workflows/quicksyntaxcheck.yml index 1c35c7b..2bc7924 100644 --- a/.github/workflows/quicksyntaxcheck.yml +++ b/.github/workflows/quicksyntaxcheck.yml @@ -1,4 +1,4 @@ -name: "PHP Syntax Check" +name: 'PHP Syntax Check' on: push: paths: diff --git a/.jshint.json b/.jshint.json new file mode 100644 index 0000000..c9d7140 --- /dev/null +++ b/.jshint.json @@ -0,0 +1,4 @@ +{ + "esversion": 8, + "node": true +} diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 55dbbd6..cc9fbc5 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,3 +1,3 @@ -# [Don’t be an asshole, and don’t be tolerant of assholes.](https://asshole.fyi/) +# [Don't be an asshole, and don't be tolerant of assholes.](https://asshole.fyi/) That simple. diff --git a/package.json b/package.json index d173b28..e29025b 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "prettier": "^3.3.1" }, "scripts": { - "pcheck": "prettier --check .", - "pwrite": "prettier --write ." + "p:c": "prettier --check .", + "p:w": "prettier --write ." } } diff --git a/wikiassets/nonwmf.css b/wikiassets/nonwmf.css index 1ede8e2..b8e6640 100644 --- a/wikiassets/nonwmf.css +++ b/wikiassets/nonwmf.css @@ -1,28 +1,50 @@ /** No betafeatures button */ -#pt-betafeatures { display: none; } +#pt-betafeatures { + display: none; +} /** no ULS button */ -#pt-uls { display: none; } +#pt-uls { + display: none; +} /* I won't logout unless in preferences which is typed manually */ -#pt-logout { display: none; } -#pt-preferences { display: none; } +#pt-logout { + display: none; +} +#pt-preferences { + display: none; +} /** Set custom color for redirect page */ -.mw-redirect { color: #FAAFBE;}.mw-redirect:visited { color: #FAAFBE;}.mw-redirect:hover { color: #FAAFBE;}.mw-redirect:active { color: #FAAFBE;} +.mw-redirect { + color: #faafbe; +} +.mw-redirect:visited { + color: #faafbe; +} +.mw-redirect:hover { + color: #faafbe; +} +.mw-redirect:active { + color: #faafbe; +} /** No MediaViewer button on File: namespace pages */ -.mw-mmv-filepage-buttons { display: none } +.mw-mmv-filepage-buttons { + display: none; +} /* Make protected pages' edit box shown in light pink. (http://www.color-hex.com/color/ffb6c1) */ -.mw-textarea-protected, .ns-8 textarea { - background: #FFB6C1; +.mw-textarea-protected, +.ns-8 textarea { + background: #ffb6c1; } /* Make semi-protected pages' edit box shown in yellow. */ .mw-textarea-sprotected { - background: #FFFFDB; + background: #ffffdb; } /* Edit summaries @@ -35,20 +57,30 @@ .comment { /* Quick hack to force the Search tab on [[Special:Contribs]] open. Credit: Volker E. (WMF) & Stwalkerster [[Special:Permalink/19431311#Reverting the new "collapsed search interface" on Special:Contribs|Tech]] */ -.mw-special-Contributions .oo-ui-fieldsetLayout-group.mw-collapsible-content { display: block !important; } -.mw-special-Contributions .oo-ui-fieldsetLayout-header { display: none !important; } +.mw-special-Contributions .oo-ui-fieldsetLayout-group.mw-collapsible-content { + display: block !important; +} +.mw-special-Contributions .oo-ui-fieldsetLayout-header { + display: none !important; +} /* Colorize diff size (Green for + and red for -) */ .mw-plusminus-pos { - color:green; + color: green; } .mw-plusminus-neg { - color:red; + color: red; } /* Get rid of 'partial' block. Uselessness 100% guaranteed. TODO: Fix this (MW update broke this) */ -.mw-block-restriction {display: none;} /* Kills partial block target list */ -.mw-block-editing-restriction {display: none;} /* Kill Partial switch */ -.mw-block-page-restrictions { display: none; } /* Kill radio box */ +.mw-block-restriction { + display: none; +} /* Kills partial block target list */ +.mw-block-editing-restriction { + display: none; +} /* Kill Partial switch */ +.mw-block-page-restrictions { + display: none; +} /* Kill radio box */ diff --git a/wikiassets/nonwmf.js b/wikiassets/nonwmf.js index 50c8475..a2d9065 100644 --- a/wikiassets/nonwmf.js +++ b/wikiassets/nonwmf.js @@ -1,9 +1,11 @@ // enwiki purgetab -mw.loader.load('//en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-purgetab.js&oldid=951989513&action=raw&ctype=text/javascript'); +mw.loader.load( + '//en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-purgetab.js&oldid=951989513&action=raw&ctype=text/javascript', +); /* Automate purge confirmation dialog */ -if ( mw.config.get( 'wgAction' ) === 'purge' ) { - $('form.mw-htmlform').submit(); +if (mw.config.get('wgAction') === 'purge') { + $('form.mw-htmlform').submit(); } /** @@ -11,40 +13,56 @@ if ( mw.config.get( 'wgAction' ) === 'purge' ) { * @see https://meta.wikimedia.org/wiki/StewardScript * @update-token [[File:pathoschild/stewardscript.js]] */ -mw.loader.load('//tools-static.wmflabs.org/meta/scripts/pathoschild.stewardscript.js'); +mw.loader.load( + '//tools-static.wmflabs.org/meta/scripts/pathoschild.stewardscript.js', +); // Display users rights (Temporary, might work on my own rewrite of this or find another one) -mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Splarka/sysopdectector.js&oldid=653248315&action=raw&ctype=text/javascript'); +mw.loader.load( + '//en.wikipedia.org/w/index.php?title=User:Splarka/sysopdectector.js&oldid=653248315&action=raw&ctype=text/javascript', +); // No MediaViewer -mw.config.set("wgMediaViewerOnClick", false); +mw.config.set('wgMediaViewerOnClick', false); /** * Ajax sysop * @see https://meta.wikimedia.org/wiki/Ajax_sysop * @update-token [[File:pathoschild/ajaxsysop.js]] */ -mw.loader.load('//tools-static.wmflabs.org/meta/scripts/pathoschild.ajaxsysop.js'); +mw.loader.load( + '//tools-static.wmflabs.org/meta/scripts/pathoschild.ajaxsysop.js', +); /** * Forces left-to-right layout and editing on RTL wikis. * @see https://meta.wikimedia.org/wiki/Force_ltr * @update-token [[File:pathoschild/forceltr.js]] */ -mw.loader.load('//tools-static.wmflabs.org/meta/scripts/pathoschild.forceltr.js'); +mw.loader.load( + '//tools-static.wmflabs.org/meta/scripts/pathoschild.forceltr.js', +); // Change language to English if it is not -mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:-revi/lang-to-en.js&action=raw&ctype=text/javascript'); +mw.loader.load( + '//meta.wikimedia.org/w/index.php?title=User:-revi/lang-to-en.js&action=raw&ctype=text/javascript', +); // IRTC1015's permalink-collector -mw.loader.load('//ko.wikipedia.org/w/index.php?title=User:IRTC1015/copyReasonLink.js&oldid=20823911&action=raw&ctype=text/javascript'); +mw.loader.load( + '//ko.wikipedia.org/w/index.php?title=User:IRTC1015/copyReasonLink.js&oldid=20823911&action=raw&ctype=text/javascript', +); // Display lists aka StewardLinks -mw.loader.load('//meta.wikimedia.org/w/index.php?oldid=20169009&action=raw&ctype=text/javascript'); +mw.loader.load( + '//meta.wikimedia.org/w/index.php?oldid=20169009&action=raw&ctype=text/javascript', +); /** * TemplateScript adds configurable templates and scripts to the sidebar, and adds an example regex editor. * @see https://meta.wikimedia.org/wiki/TemplateScript * @update-token [[File:Pathoschild/templatescript.js]] */ -mw.loader.load('//tools-static.wmflabs.org/meta/scripts/pathoschild.templatescript.js'); +mw.loader.load( + '//tools-static.wmflabs.org/meta/scripts/pathoschild.templatescript.js', +);