Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from honestbleeps:master #20

Open
wants to merge 68 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
7fd526f
Replace webpack with esbuild (#5488)
larsjohnsen Feb 15, 2024
f5c54ce
Update codeql.yml
benmcgarry Feb 15, 2024
63713ff
Delete .github/workflows/codeql.yml
benmcgarry Feb 15, 2024
b0f7b5b
Create codeql.yml
benmcgarry Feb 15, 2024
8772517
Delete .travis.yml
benmcgarry Feb 16, 2024
5465c25
Bump ip from 1.1.8 to 1.1.9 (#5490)
dependabot[bot] Feb 20, 2024
5069784
update deps
larsjohnsen Feb 29, 2024
bb35be5
Chrome Manifest v3 Support (#5403)
benmcgarry Mar 2, 2024
8918570
v5.23.1 (#5491)
benmcgarry Mar 2, 2024
3132a1b
Fix Chromebeta build.
benmcgarry Mar 2, 2024
f10a514
Update pipeline
benmcgarry Mar 2, 2024
4f8bc3b
Update and rename v5.23.1.md to v5.23.2.md
benmcgarry Mar 2, 2024
7d4dc66
v5.23.2 (#5492)
benmcgarry Mar 2, 2024
d321a5c
Remove un-needed perms (#5494)
benmcgarry Mar 4, 2024
8a39c1d
New build for manifest fix
benmcgarry Mar 4, 2024
34b92fe
Update and rename v5.23.2.md to v5.23.3.md
benmcgarry Mar 4, 2024
9e9f3ef
Fix MV3 apis not in FF MV2 Compat + Firefox for Android prelim suppor…
benmcgarry Mar 5, 2024
980c235
v5.23.4 changelog
benmcgarry Mar 6, 2024
c46cc6e
.5 release
benmcgarry Mar 6, 2024
f85e8c9
Fix changelog
benmcgarry Mar 6, 2024
5cd768b
build script: Fix manifest placeholders
larsjohnsen Mar 6, 2024
d952801
update deps
larsjohnsen Mar 6, 2024
f32c736
Move to browser_specific_settings (#5496)
benmcgarry Mar 6, 2024
185e941
v5.23.6 (#5497)
benmcgarry Mar 6, 2024
325a10a
Update SECURITY.md
benmcgarry Mar 7, 2024
41273bb
Update versions
benmcgarry Mar 8, 2024
c201755
Firefox Mobile needs min 120 due to API support (#5498)
benmcgarry Mar 10, 2024
4cb4300
v5.23.7 (#5499)
benmcgarry Mar 12, 2024
89f3d08
Update gh release action to v2 to remove node dep notice
benmcgarry Mar 12, 2024
b8f6839
5.24.0 (#5501)
benmcgarry Mar 19, 2024
28f4860
Move hosts to optional permissions (#5503)
benmcgarry Mar 24, 2024
4758751
5.24.1 (#5504)
benmcgarry Mar 24, 2024
5a7db19
Move Geolocation to optional (#5505)
benmcgarry Mar 24, 2024
b87f12c
5.24.2
benmcgarry Mar 24, 2024
6bb4343
Update to v5.24.2 changelog
benmcgarry Mar 24, 2024
cc8a567
Remove twitter external script (#5506)
benmcgarry Mar 24, 2024
6912e21
v5.24.3
benmcgarry Mar 24, 2024
701ea16
Update and rename v5.24.2.md to v5.24.3.md
benmcgarry Mar 24, 2024
abf25d4
Add support for twitter expandos on x.com links (twitter rename) (#5476)
aitchpat Mar 25, 2024
ee462dd
Rollback change to fix icon not switching (#5508)
benmcgarry Mar 29, 2024
580e8ea
v5.24.4 (#5510)
benmcgarry Mar 29, 2024
a395e32
Update SECURITY.md
benmcgarry Mar 30, 2024
88c091f
Update SECURITY.md
benmcgarry Mar 30, 2024
62c36e0
Remove code block causing CSP issues
benmcgarry Mar 29, 2024
00e838e
lint
benmcgarry Mar 29, 2024
41e8408
Bump tar from 6.2.0 to 6.2.1 (#5516)
dependabot[bot] Apr 11, 2024
bd77296
v5.24.5 (#5518)
benmcgarry Apr 29, 2024
7babe2c
showImages: Fix audio playing in the background (#5521)
larsjohnsen May 4, 2024
fcfb6ff
v5.24.6 (#5522)
benmcgarry May 4, 2024
bfbceb2
Bump ejs from 3.1.9 to 3.1.10 (#5520)
dependabot[bot] May 27, 2024
c7a11ad
Bump braces from 3.0.2 to 3.0.3 (#5527)
dependabot[bot] Jun 21, 2024
bbe1fc0
Use the native structuredClone instead of lodash's deepClone
larsjohnsen Jun 29, 2024
972bd8a
Update deps
larsjohnsen Jul 2, 2024
1b99cb8
Add flow definition for structuredClone
larsjohnsen Jul 2, 2024
e804618
Add kbd shortcut to toggle mute on ShowImages videos
FlaminSarge Mar 17, 2024
2837707
Update dependencies (#5537)
larsjohnsen Sep 15, 2024
3cbecf3
showImages/hosts: Update imgur (#5536)
larsjohnsen Sep 16, 2024
15c04de
Bump micromatch from 4.0.5 to 4.0.8 (#5535)
dependabot[bot] Sep 17, 2024
a735b44
Reddiquette links (#5532)
billythekid Sep 19, 2024
3b15c36
environment/permissions: Fix permission popup not showing (#5538)
larsjohnsen Sep 21, 2024
ee09506
v5.24.7 (#5539)
benmcgarry Sep 21, 2024
6914d97
Update showImages.js to fix google reverse image search URL (#5475)
tompreuss Nov 26, 2024
569c32b
Grammar fix to remove repeated word in subredditManager.js (#5545)
RincewindTVD Jan 5, 2025
43ebbfc
Bump cross-spawn from 7.0.3 to 7.0.6 (#5547)
dependabot[bot] Jan 5, 2025
e7810ce
Bump nanoid from 3.3.7 to 3.3.8 (#5554)
dependabot[bot] Jan 5, 2025
488544d
Added support for bluesky expandos (#5546)
steckums Jan 5, 2025
e93c541
Fix reddit poll expando (#5556)
Luc-Mcgrady Jan 9, 2025
0050670
v5.24.8 (#5559)
benmcgarry Jan 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"plugins": [
'@babel/plugin-proposal-export-namespace-from',
["@babel/plugin-proposal-class-properties", { "loose": true }],
"@babel/plugin-transform-modules-commonjs",
"@babel/plugin-transform-flow-strip-types"
"@babel/plugin-transform-flow-strip-types",
"@babel/plugin-syntax-import-attributes"
],
"sourceMaps": "inline"
}
10 changes: 5 additions & 5 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
"import/ignore": [
"node_modules",
"\\.(json|png|gif|html|scss)$"
],
"import/resolver": "webpack"
]
},
"env": {
"browser": true,
Expand Down Expand Up @@ -67,7 +66,7 @@
"import/default": 2,
"import/dynamic-import-chunkname": 2,
"import/exports-last": 0,
"import/extensions": [2, { "js": "never", "json": "always" }],
"import/extensions": [0, { "js": "always", "json": "always" }], // FIXME Extensions must be added
"import/first": 2,
"import/group-exports": 0,
"import/imports-first": 2,
Expand All @@ -92,7 +91,7 @@
"import/no-nodejs-modules": 2,
"import/no-self-import": 2,
"import/no-unassigned-import": 0,
"import/no-unresolved": 2,
"import/no-unresolved": [2, { "ignore": ["ava"] }],
"import/no-useless-path-segments": 0,
"import/no-webpack-loader-syntax": 0,
"import/order": 2,
Expand Down Expand Up @@ -153,7 +152,7 @@
"no-undef": [2, { "typeof": true }],
"no-undefined": 0,
"no-underscore-dangle": 0,
"no-unused-expressions": 0, // see flowtype/no-unused-expressions
"no-unused-expressions": 2,
"no-unused-vars": [2, { "ignoreRestSiblings": true }],
"no-use-before-define": [0, "nofunc"],
"no-useless-escape": 0,
Expand Down Expand Up @@ -188,6 +187,7 @@
"line-comment-position": 0,
"lines-around-comment": [0, { "allowBlockStart": true }],
"lines-between-class-members": [2, "always", { "exceptAfterSingleLine": true }],
"logical-assignment-operators": 0, // not support in used flowtype
"max-classes-per-file": 0,
"max-depth": 0,
"max-len": 0,
Expand Down
10 changes: 7 additions & 3 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
<PROJECT_ROOT>/examples/.*
<PROJECT_ROOT>/node_modules/.*/test/.*
<PROJECT_ROOT>/node_modules/.*/__tests__/.*
<PROJECT_ROOT>/node_modules/esbuild-plugin-flow/.*
<PROJECT_ROOT>/node_modules/hermes-estree/dist/generated/.*
<PROJECT_ROOT>/node_modules/hermes-estree/dist/.*
<PROJECT_ROOT>/node_modules/hermes-parser/dist/.*
<PROJECT_ROOT>/lib/utils/__tests__/.*
<PROJECT_ROOT>/lib/environment/utils/__tests__/.*
<PROJECT_ROOT>/lib/modules/backupAndRestore/__tests__/.*

[include]

Expand All @@ -13,9 +20,6 @@
[options]
module.use_strict=true

module.name_mapper='^sibling-loader\(\?.+\)?!.+$'->'<PROJECT_ROOT>/flow/stub/sibling-loader.js'
module.name_mapper='^exec-loader\(\?cache\)?!\(.+\)$'->'\2'

esproposal.export_star_as=enable
esproposal.optional_chaining=enable

Expand Down
40 changes: 24 additions & 16 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,50 +15,58 @@ on:
push:
branches: [ "master" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "master" ]
schedule:
- cron: '19 22 * * 0'
- cron: '19 13 * * 0'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners
# Consider using larger runners for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
# required for all workflows
security-events: write

# only required for workflows in private repositories
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Use only 'java' to analyze code written in Java, Kotlin or both
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
language: [ 'javascript-typescript' ]
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# 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.
# 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.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# 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.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
Expand All @@ -67,10 +75,10 @@ jobs:
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
26 changes: 13 additions & 13 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
lint_flow:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '16'
node-version: '22'
- run: yarn install --frozen-lockfile

- run: yarn flow check --show-all-errors
Expand All @@ -26,20 +26,20 @@ jobs:
build_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '16'
node-version: '22'
- run: yarn install --frozen-lockfile

- run: yarn build --env browsers=all
- run: yarn build --browsers=all

- uses: softprops/action-gh-release@v1
- uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
dist/zip/chrome.zip
dist/zip/chrome-beta.zip
dist/zip/chromebeta.zip
dist/zip/edge.zip
dist/zip/firefox.zip
dist/zip/opera.zip
Expand All @@ -50,11 +50,11 @@ jobs:
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '16'
node-version: '22'
- run: yarn install --frozen-lockfile

- run: yarn test
- run: yarn build --env browsers=all
- run: yarn build --browsers=all
9 changes: 2 additions & 7 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,17 @@
],
"rules": {
"alpha-value-notation": null,
"color-hex-case": null,
"color-named": null,
"color-function-notation": null,
"declaration-property-value-disallowed-list": null,
"font-family-no-missing-generic-family-keyword": [true, { "ignoreFontFamilies": "Batch" }],
"font-family-name-quotes": null,
"function-no-unknown": null,
"hue-degree-notation": null,
"indentation": "tab",
"import-notation": null,
"keyframes-name-pattern": null,
"max-line-length": null,
"max-nesting-depth": null,
"no-descending-specificity": null,
"number-leading-zero": null,
"order/properties-alphabetical-order": null,
"scss/double-slash-comment-empty-line-before": null,
"scss/at-function-pattern": null,
"scss/at-mixin-pattern": null,
Expand All @@ -36,7 +32,6 @@
"selector-max-compound-selectors": null,
"selector-max-id": null,
"selector-no-qualifying-type": null,
"shorthand-property-no-redundant-values": null,
"string-quotes": "single"
"shorthand-property-no-redundant-values": null
}
}
76 changes: 0 additions & 76 deletions .travis.yml

This file was deleted.

14 changes: 7 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Thinking about contributing to RES? Awesome! We just ask that you follow a few s
#### First time installation

1. Install [git](https://git-scm.com/).
1. Install [node.js](https://nodejs.org) (version >= 10).
1. Install [node.js](https://nodejs.org) (version >= 22).
1. Install [yarn](https://yarnpkg.com/lang/en/docs/install/)
1. [Clone this repository](https://help.github.com/articles/cloning-a-repository/).
1. Run `yarn` in that folder.
Expand All @@ -30,11 +30,11 @@ To load the extension into your browser, see [Loading RES into your browser](#lo

#### Build commands

**`yarn start [--env browsers=<browsers>]`** will clean `dist/`, then build RES (dev mode), and start a watch task that will rebuild RES when you make changes. Only changed files will be rebuilt.
**`yarn start [--browsers <browsers>]`** will clean `dist/`, then build RES (dev mode), and start a watch task that will rebuild RES when you make changes. Only changed files will be rebuilt.

**`yarn once [--env browsers=<browsers>]`** will clean `dist/`, then build RES (dev mode) a single time.
**`yarn once [--browsers <browsers>]`** will clean `dist/`, then build RES (dev mode) a single time.

**`yarn build [--env browsers=<browsers>]`** will clean `dist/`, then build RES (release mode). Each build output will be compressed to a .zip file in `dist/zip/`.
**`yarn build [--browsers <browsers>]`** will clean `dist/`, then build RES (release mode). Each build output will be compressed to a .zip file in `dist/zip/`.

`<browsers>` is a comma-separated list of browsers to target, e.g. `chrome,firefox`. `all` will build all targets. By default, `chrome` will be targeted.

Expand Down Expand Up @@ -95,7 +95,7 @@ The default host and port (`localhost` and `4444`) should work for most local in
- `locales`: RES i18n translations
- `tests/`: integration tests
- `package.json`: package info, dependencies
- `webpack.config.babel.js`: build script
- `build.js`: build script

## Adding new files

Expand All @@ -105,7 +105,7 @@ First, check to see if there is an existing module with the same focus.

See [`examples/module.js`](https://github.com/honestbleeps/Reddit-Enhancement-Suite/blob/master/examples/module.js) for an example.

Create a new `.js` file in `lib/modules`.
Create a new `.js` file in `lib/modules`. Export it in `lib/modules/index.js`
It will automatically be loaded when the build script is restarted.

All user-visible text must be translated. See the [locales README](/locales/locales/README.md) for details.
Expand All @@ -114,7 +114,7 @@ All user-visible text must be translated. See the [locales README](/locales/loca

See [`examples/host.js`](https://github.com/honestbleeps/Reddit-Enhancement-Suite/blob/master/examples/host.js) for an example.

Create a new `.js` file in `lib/modules/hosts`.
Create a new `.js` file in `lib/modules/hosts`. Export it in `lib/modules/hosts/index.js`
It will automatically be loaded when the build script is restarted.

If the host uses an API that does not support [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), you must add it to the browsers' manifests and the host's `permissions` property. For example, search for usages of `api.twitter.com`.
Expand Down
Loading