From 4da58ca1a6c53d53c5a3434d8d104485e3a28861 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Dec 2023 16:29:02 +0000 Subject: [PATCH 01/13] Bump github/codeql-action from 2 to 3 Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2 to 3. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/v2...v3) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/codeql-analysis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index f3a1df8..3e97f43 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -43,7 +43,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -55,7 +55,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v2 + uses: github/codeql-action/autobuild@v3 # â„šī¸ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -69,4 +69,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 From 99f5e6c5da85a2eef300c0486917de8ef5a7e177 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Jan 2024 16:10:30 +0000 Subject: [PATCH 02/13] Bump actions/dependency-review-action from 3 to 4 Bumps [actions/dependency-review-action](https://github.com/actions/dependency-review-action) from 3 to 4. - [Release notes](https://github.com/actions/dependency-review-action/releases) - [Commits](https://github.com/actions/dependency-review-action/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/dependency-review-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/dependency-review.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index b994508..b9d6d20 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -11,4 +11,4 @@ jobs: - name: 'Checkout Repository' uses: actions/checkout@v4 - name: 'Dependency Review' - uses: actions/dependency-review-action@v3 + uses: actions/dependency-review-action@v4 From 5e7b16230b3a40f36ba6d0a5c83de5f286e325e2 Mon Sep 17 00:00:00 2001 From: darkred Date: Sun, 28 Jan 2024 22:38:19 +0200 Subject: [PATCH 03/13] Create evergreen.yml This is a GitHub Action that given an organization or specified repositories, opens an issue/PR dependabot is not enabled but could be. It also enables automated security updates for the repository. --- .github/workflows/evergreen.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/evergreen.yml diff --git a/.github/workflows/evergreen.yml b/.github/workflows/evergreen.yml new file mode 100644 index 0000000..57eb768 --- /dev/null +++ b/.github/workflows/evergreen.yml @@ -0,0 +1,22 @@ +name: Weekly dependabot checks + +on: + workflow_dispatch: + schedule: + - cron: '3 2 1 * *' + +permissions: + issues: write + pull-requests: write + +jobs: + evergreen: + name: evergreen + runs-on: ubuntu-latest + + steps: + - name: Run evergreen action + uses: github/evergreen@v1 + env: + GH_TOKEN: ${{ secrets.EVERGREEN_ACTION }} + REPOSITORY: darkred From dce253efbb27609a4481957438a593bbffa9d1dd Mon Sep 17 00:00:00 2001 From: darkred Date: Fri, 23 Feb 2024 15:29:28 +0200 Subject: [PATCH 04/13] Update Instagram_-_visible_images_counter.user.js Updated 'hrefselems' selector. --- .../Instagram_-_visible_images_counter.user.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Instagram_-_visible_images_counter/Instagram_-_visible_images_counter.user.js b/Instagram_-_visible_images_counter/Instagram_-_visible_images_counter.user.js index d254beb..3c5be12 100644 --- a/Instagram_-_visible_images_counter/Instagram_-_visible_images_counter.user.js +++ b/Instagram_-_visible_images_counter/Instagram_-_visible_images_counter.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name Instagram - visible images counter // @namespace darkred -// @version 2023.9.27 +// @version 2024.2.23 // @description Shows in instagram profile pages how many images out of total (as a number and as a percentage) are currently visible, as you scroll down the page. // @author darkred // @license MIT @@ -56,7 +56,8 @@ function showCounter() { // hrefselems = document.querySelectorAll(`a[href*='taken-by']`); // hrefselems = document.querySelectorAll(`._aabd._aa8k._aanf > a`); - hrefselems = document.querySelectorAll(`._aabd._aa8k._al3l > a`); + // hrefselems = document.querySelectorAll(`._aabd._aa8k._al3l > a`); + hrefselems = document.querySelectorAll(`._aabd._aa8k.x2pgyrj > a`); $.each(hrefselems, function(index, value) { // hrefs.indexOf(String(value)) === -1 ? hrefs.push(String(value)) : console.log("This item already exists"); // https://stackoverflow.com/a/36683363 if (hrefs.indexOf(String(value)) === -1) { // hrefs.count -below- serves as a counter for the newly added displayed images (on each infinite scrolling event) @@ -139,10 +140,12 @@ var observer; // var avatarSelector = 'h1.rhpdm'; // the profile name element // var avatarSelector = 'span.-nal3'; // the 'posts' count element, e.g. 683 posts // var avatarSelector = 'ul.k9GMp'; // the profile's 3 counters container element -// var avatarSelector = '.eC4Dz'; // the profile's username container element -// var avatarSelector = '._aa_m'; // the profile's username container element -// var avatarSelector = '._aa_c'; // the profile's username container element -var avatarSelector = '.x1q0g3np.x2lah0s.x8j4wrb'; // the profile's username container element +// var avatarSelector = '.eC4Dz'; // the profile's username container element +// var avatarSelector = '._aa_m'; // the profile's username container element +// var avatarSelector = '._aa_c'; // the profile's username container element +// var avatarSelector = 'main > article > header > section > div._ienqf > div > button'; // the 3-dots icon +// var avatarSelector = 'div[style="flex-direction: column; padding-bottom: 0px; padding-top: 0px;"]'; // the 3-dots icon +var avatarSelector = '.x1q0g3np.x2lah0s.x8j4wrb'; // the 3-dots icon From 23aa3269f3c1c378c59af3578685d94cdca80756 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 13 Apr 2024 20:15:58 +0000 Subject: [PATCH 05/13] Add renovate.json --- renovate.json | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 renovate.json diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..5db72dd --- /dev/null +++ b/renovate.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "config:recommended" + ] +} From 66d93196086e6d0767f88ef29eb36815498855db Mon Sep 17 00:00:00 2001 From: darkred Date: Fri, 13 Dec 2024 02:17:01 +0200 Subject: [PATCH 06/13] Update .gitattributes --- .gitattributes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index bdb0cab..1e78b8c 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,5 +1,5 @@ # Auto detect text files and perform LF normalization -* text=auto +* text=auto eol=lf # Custom for Visual Studio *.cs diff=csharp From b19bbd8c3c3bff313d3ef9414c578c5028ee1c52 Mon Sep 17 00:00:00 2001 From: darkred Date: Thu, 6 Mar 2025 17:55:01 +0200 Subject: [PATCH 07/13] Delete codeql-analysis.yml [CodeQL code scanning] Drop advanced setup (codeql-analysis.yml) in favor of default setup --- .github/workflows/codeql-analysis.yml | 72 --------------------------- 1 file changed, 72 deletions(-) delete mode 100644 .github/workflows/codeql-analysis.yml diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml deleted file mode 100644 index 3e97f43..0000000 --- a/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,72 +0,0 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -# -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. -# -name: "CodeQL" - -on: - push: - branches: [ master ] - pull_request: - # The branches below must be a subset of the branches above - branches: [ master ] - schedule: - - cron: '23 10 * * 6' - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: false - matrix: - language: [ 'javascript' ] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] - # Learn more: - # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - queries: +security-and-quality - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v3 - - # â„šī¸ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl - - # âœī¸ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language - - #- run: | - # make bootstrap - # make release - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 From 313dc43be9a4241dc7a6b5d07647ec0d5fd72048 Mon Sep 17 00:00:00 2001 From: darkred Date: Thu, 6 Mar 2025 22:07:46 +0200 Subject: [PATCH 08/13] Drop .eslintignore Drop .eslintignore in favor of using the "ignores" property in "eslint.config.js" (flat config format)(flat config format) --- .eslintignore => .eslintignore [DEPRECATED] | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .eslintignore => .eslintignore [DEPRECATED] (100%) diff --git a/.eslintignore b/.eslintignore [DEPRECATED] similarity index 100% rename from .eslintignore rename to .eslintignore [DEPRECATED] From e3e80600506be714f8362642f45edc065869d6ff Mon Sep 17 00:00:00 2001 From: darkred Date: Thu, 6 Mar 2025 22:08:45 +0200 Subject: [PATCH 09/13] Migrate to flat config format --- .eslintrc.json [DEPRECATED] | 61 ++++++++++ eslint.config.js | 208 +++++++++++++++++++++++++++++++++++ 2 files changed, 269 insertions(+) create mode 100644 .eslintrc.json [DEPRECATED] create mode 100644 eslint.config.js diff --git a/.eslintrc.json [DEPRECATED] b/.eslintrc.json [DEPRECATED] new file mode 100644 index 0000000..a34a4d6 --- /dev/null +++ b/.eslintrc.json [DEPRECATED] @@ -0,0 +1,61 @@ +{ + "root": true, + "env": { + "browser": true, + "es6": true, + "greasemonkey": true, + "jquery": true + }, + "parserOptions": { + "ecmaVersion": "latest", + "sourceType": "script", + "ecmaFeatures": { + "globalReturn ": true, + "impliedStrict": true + } + }, + "extends": [ + "eslint:recommended", + "plugin:css/recommended", + "plugin:jsonc/recommended-with-json", + "plugin:no-jquery/deprecated", + "plugin:regexp/recommended" + ], + "plugins": [ + "css", + "jsonc", + "no-jquery", + "regexp" + ], + "rules": { + "complexity": ["warn", 20], + "eqeqeq": "warn", + "func-style": "off", + "indent": ["warn","tab", { "ignoreComments": false, "SwitchCase": 1 } ], + "linebreak-style": ["warn","unix"], + "max-len": "off", + "max-statements-per-line": "off", + "new-cap": "off", + "no-alert": "warn", + "no-console": "warn", + "no-dupe-keys": "warn", + "no-extra-semi": "warn", + "no-inline-comments": "off", + "no-magic-numbers": "off", + "no-misleading-character-class": "warn", + "no-mixed-spaces-and-tabs": "warn", + "no-multiple-empty-lines": "off", + "no-tabs": "off", + "no-unused-labels": "warn", + "no-unused-vars": ["warn", {"vars": "all", "args": "after-used"}], + "no-useless-escape": "warn", + "padded-blocks": "off", + "quotes": ["warn", "single", { "allowTemplateLiterals": true }] , + "require-jsdoc": "off", + "require-unicode-regexp": "off", + "semi": ["warn","always"], + "space-before-function-paren": "off", + "unicode-bom": ["warn", "never"] + }, + "reportUnusedDisableDirectives": true +} diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..d7f634b --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,208 @@ +/* eslint-disable @stylistic/js/quotes */ +/* eslint-disable @stylistic/js/indent */ + +// import * as cssPlugin from "eslint-plugin-css"; +import css from "@eslint/css"; +import eslintPluginJsonc from 'eslint-plugin-jsonc'; +import json from "@eslint/json"; +import noJquery from "eslint-plugin-no-jquery"; +import * as regexpPlugin from "eslint-plugin-regexp"; +import markdown from "@eslint/markdown"; +import globals from "globals"; +import js from "@eslint/js"; +import stylisticJs from "@stylistic/eslint-plugin-js"; + + +export default [ + { + files: ['**/*.js', '**/*.mjs'], + ...js.configs.recommended + }, + // cssPlugin.configs["flat/recommended"], + ...eslintPluginJsonc.configs['flat/recommended-with-jsonc'], + { + files: ['**/*.js', '**/*.mjs'], + ...regexpPlugin.configs["flat/recommended"], + }, + ...markdown.configs.recommended, + { + files: ["**/*.js"], + ignores: ["**/*.min.js"], + + plugins: { + "@stylistic/js": stylisticJs + }, + + linterOptions: { + reportUnusedDisableDirectives: true, + }, + + languageOptions: { + globals: { + ...globals.browser, + ...globals.greasemonkey, + ...globals.jquery, + }, + + ecmaVersion: "latest", + sourceType: "module", + + + parserOptions: { + ecmaFeatures: { + "globalReturn ": true, + impliedStrict: true, + }, + }, + }, + + rules: { + complexity: ["warn", 20], + eqeqeq: "warn", + "func-style": "off", + + "@stylistic/js/indent": ["warn", "tab", { + ignoreComments: false, + SwitchCase: 1, + }], + + "@stylistic/js/linebreak-style": ["warn", "unix"], + "@stylistic/js/max-len": "off", + "@stylistic/js/max-statements-per-line": "off", + "new-cap": "off", + "no-alert": "warn", + "no-console": "warn", + "no-dupe-keys": "warn", + "@stylistic/js/no-extra-semi": "warn", + "no-inline-comments": "off", + "no-magic-numbers": "off", + "no-misleading-character-class": "warn", + "@stylistic/js/no-mixed-spaces-and-tabs": "warn", + "@stylistic/js/no-multiple-empty-lines": "off", + "@stylistic/js/no-tabs": "off", + "no-unused-labels": "warn", + + "no-unused-vars": ["warn", { + vars: "all", + args: "after-used", + }], + + "no-useless-escape": "warn", + "@stylistic/js/padded-blocks": "off", + + "@stylistic/js/quotes": ["warn", "single", { + allowTemplateLiterals: true, + }], + + "require-jsdoc": "off", + "require-unicode-regexp": "off", + "@stylistic/js/semi": ["warn", "always"], + "@stylistic/js/space-before-function-paren": "off", + "unicode-bom": ["warn", "never"], + }, + + }, + + + // https://github.com/eslint/json#usage + { + plugins: { + json, + }, + }, + // lint JSON files // (from: https://github.com/eslint/json#recommended-configuration) + { + files: ["**/*.json"], + language: "json/json", + ...json.configs.recommended, + }, + + // lint JSON-C files + { + // files: ["**/*.jsonc"], + files: ["**/*.jsonc", ".vscode/*.json"], // https://github.com/eslint/json/pull/11 + language: "json/jsonc", + ...json.configs.recommended, + }, + + + + // https://github.com/eslint/markdown#configuring + { + // 1. Add the plugin + plugins: { + markdown + } + }, + + // https://www.npmjs.com/package/eslint-plugin-markdown + // https://eslint.org/docs/latest/use/configure/plugins + // https://github.com/eslint/json + { + // 2. Enable the Markdown processor for all .md files. + files: ["**/*.md"], + // files: ["**/*.md/*.js"], + // plugins: { + // markdown + // }, + processor: "markdown/markdown" + }, + { + // // 3. Optionally, customize the configuration ESLint uses for ```js + // // fenced code blocks inside .md files. + files: ["**/*.md/*.js"], + rules: { + // ... + + // 2. Disable other rules. + // "no-console": "off", + // "import/no-unresolved": "off" + } + }, + + + + + + + + + // https://eslint.org/blog/2025/02/eslint-css-support/ [NEW ADDITION 20/2/2025] + // + // lint css files + { + files: ["**/*.css"], + plugins: { + css, + }, + language: "css/css", + rules: { + "css/no-duplicate-imports": "error", + }, + }, + + + + + // https://eslint.org/docs/latest/use/configure/ignore + // https://eslint.org/docs/latest/use/configure/migration-guide#ignoring-files + { + // Note: there should be no other properties in this object + ignores: [ + + "node_modules/*", + "**/*.min.js", + "package-lock.json" + + ] + + } + + + + + + + + +]; \ No newline at end of file From 7af1130058bfe5a997276da477226845c313c4d6 Mon Sep 17 00:00:00 2001 From: darkred Date: Thu, 6 Mar 2025 23:43:11 +0200 Subject: [PATCH 10/13] Update eslint.config.js --- eslint.config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eslint.config.js b/eslint.config.js index d7f634b..5b0a1aa 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -45,7 +45,8 @@ export default [ }, ecmaVersion: "latest", - sourceType: "module", + // sourceType: "module", + sourceType: "script", parserOptions: { From 8dbf3b1b942c44a12d0627ee81395438d1dbe1fe Mon Sep 17 00:00:00 2001 From: darkred Date: Thu, 6 Mar 2025 23:45:10 +0200 Subject: [PATCH 11/13] Revert "Update eslint.config.js" This reverts commit 7af1130058bfe5a997276da477226845c313c4d6. --- eslint.config.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index 5b0a1aa..d7f634b 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -45,8 +45,7 @@ export default [ }, ecmaVersion: "latest", - // sourceType: "module", - sourceType: "script", + sourceType: "module", parserOptions: { From b7fda557e6ab3ab3ef203cfea3e74b6a58a81b1c Mon Sep 17 00:00:00 2001 From: darkred Date: Fri, 7 Mar 2025 00:29:38 +0200 Subject: [PATCH 12/13] Update package.json --- package.json | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index d678f81..36eeb6d 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,29 @@ { + "type": "module", "devDependencies": { - "eslint": "*", + "@biomejs/biome": "*", + "@eslint/config-inspector": "*", + "@eslint/css": "*", + "@eslint/eslintrc": "*", + "@eslint/js": "*", + "@eslint/json": "*", + "@eslint/markdown": "*", + "@eslint/migrate-config": "*", + "@stylistic/eslint-plugin": "*", + "@stylistic/eslint-plugin-js": "*", + "eslint": "^9.10.0", "eslint-plugin-css": "*", "eslint-plugin-es-x": "*", + "eslint-plugin-jsdoc": "*", "eslint-plugin-jsonc": "*", "eslint-plugin-no-jquery": "*", "eslint-plugin-regexp": "*", "eslint-plugin-userscripts": "*", - "eslint-plugin-yml": "*" + "eslint-plugin-yml": "*", + "globals": "*" + }, + "dependencies": { + "rescript": "*", + "turbo": "*" } } From 5137627e96d6e06cb0d13cc6ebdc5f4f9917cb0a Mon Sep 17 00:00:00 2001 From: darkred Date: Fri, 7 Mar 2025 00:34:49 +0200 Subject: [PATCH 13/13] Drop .eslintrc.js --- .eslintrc.js => .eslintrc.js [DEPRECATED] | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .eslintrc.js => .eslintrc.js [DEPRECATED] (100%) diff --git a/.eslintrc.js b/.eslintrc.js [DEPRECATED] similarity index 100% rename from .eslintrc.js rename to .eslintrc.js [DEPRECATED]