Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
38 changes: 19 additions & 19 deletions .github/workflows/build-extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ jobs:
steps:
# Checks out a copy of your repository on the ubuntu-latest machine
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Configure node v16
uses: actions/setup-node@v3
- name: Configure node v20
uses: actions/setup-node@v4
with:
node-version: '16'
node-version: '20'

- name: Install test framework dependencies
run: npm install
Expand All @@ -48,12 +48,12 @@ jobs:
steps:
# Checks out a copy of your repository on the ubuntu-latest machine
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Configure node v16
uses: actions/setup-node@v3
- name: Configure node v20
uses: actions/setup-node@v4
with:
node-version: '16'
node-version: '20'

- name: Install web-ext tooling
run: npm install -g web-ext
Expand All @@ -71,7 +71,7 @@ jobs:
EXTENSION_BUILD_ID: ${{ github.run_number }}

- name: Upload build extension package
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.browser }}-extension-package
path: browser-extensions/${{ matrix.browser }}/build/web-ext-artifacts/running_challenges-*.zip
Expand All @@ -98,13 +98,13 @@ jobs:
- "parkrun.ie"
- "parkrun.it"
- "parkrun.jp"
- "parkrun.lt"
- "parkrun.my"
- "parkrun.no"
- "parkrun.org.uk"
- "parkrun.pl"
- "parkrun.se"
- "parkrun.sg"
- "parkrun.us"
# - "parkrun.ru" # Russian events are suspended
fail-fast: false
# max-parallel: 1
Expand All @@ -118,21 +118,21 @@ jobs:

# Checks out a copy of the repository
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

# Get previously built packages
- name: Download all built extension packages
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: browser-extensions/common/js/tests/ui-test/extension-binaries

- name: Show built extension packages
run: ls -lR extension-binaries

- name: Configure node v16
uses: actions/setup-node@v3
- name: Configure node v20
uses: actions/setup-node@v4
with:
node-version: '16'
node-version: '20'

- name: Install Required OS packages
run: |
Expand Down Expand Up @@ -178,7 +178,7 @@ jobs:
- name: list files in root dir
run: ls -l

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: always()
with:
name: ui-tests-chrome-${{ matrix.country_hostname }}
Expand All @@ -200,15 +200,15 @@ jobs:

steps:
- name: Download all built extension packages
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: extension-binaries

- name: Show built extension packages
run: ls -lR extension-binaries

- id: get-branch-version-tag
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
console.log(context)
Expand Down Expand Up @@ -249,7 +249,7 @@ jobs:


# - id: get-branch-version-tag
# uses: actions/github-script@v6
# uses: actions/github-script@v7
# with:
# script: |
# var version_tag = ''
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-staging-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
steps:
# Checks out a copy of your repository on the ubuntu-latest machine
- name: 📂 Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive

Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
# Get the latest copy of the repo
# We need to set a token here, otherwise it uses the default one that won't have permission to push
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
if: ${{ github.actor != 'dependabot[bot]' }}
with:
repository: fraz3alpha/running-challenges-staging
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
steps:
# Checks out a copy of your repository on the ubuntu-latest machine
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive

Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,16 +127,17 @@ roles, and they will need adding in in a few places:

It is impossible to add a new country until the new website is made live, and there are events on the map.

- Find the website URLs for the 3 pages the extension modifies. They seem to follow the english spelling these days:
- "*://www.parkrun.jp/results/athleteeventresultshistory/*"
- "*://www.parkrun.jp/results/athleteresultshistory/*"
- "*://www.parkrun.jp/*/results/athletehistory/*"
- Find the website URLs for the 2 pages the extension modifies. They seem to follow the english spelling these days, and are only available through the 'parkrunner' URLS, that replaced the older 'athlete' based ones:
- "*://www.parkrun.org.uk/parkrunner/*/all/"
- "*://www.parkrun.org.uk/parkrunner/*/"
Each of these needs to be added to the `manifest.json` file for all the supported browsers.
- Look in the volunteer rosters and attempt to find the translations to add to the `i18n.js` (internationalisation) file
- Look in the volunteer rosters and attempt to find the translations to add to the `i18n.js` (internationalisation) file - unless it has changed, look at https://www.parkrun.org.uk/parkrunner/88720/, as they have done nearly everything.
- Add the ISO code for the country to the flag map in `challenges.js`
- Add the ISO code to the list of flags for the website under the `flags.yml` data file.
- Get the flag from https://emojipedia.org/twitter/twemoji-2.6/ as described in the flags README.
- Add the country code and country name to `background.js`
- Update `browser-extensions/common/js/tests/ui-test/update.sh` with the new parkrun domain, and run the script to pull in new test files
- Add the new country to the Github actions test list: `.github/workflows/build-extension.yml`

# Version numbers

Expand Down
69 changes: 4 additions & 65 deletions browser-extensions/chrome/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 2,

"name": "Running Challenges",
"description": "Adds challenge progress information to your parkrun athlete results page.",
"description": "Adds challenge progress information to your parkrun results page.",
"version": "REPLACE_EXTENSION_BUILD_VERSION.REPLACE_EXTENSION_BUILD_ID",

"content_security_policy": "default-src 'self'; connect-src https://www.parkrun.org.uk https://running-challenges.co.uk https://images.parkrun.com",
Expand Down Expand Up @@ -32,6 +32,7 @@
"*://www.parkrun.se/parkrunner/*/all/",
"*://www.parkrun.fi/parkrunner/*/all/",
"*://www.parkrun.fr/parkrunner/*/all/",
"*://www.parkrun.lt/parkrunner/*/all/",
"*://www.parkrun.no/parkrunner/*/all/",
"*://www.parkrun.com.de/parkrunner/*/all/",
"*://www.parkrun.ru/parkrunner/*/all/",
Expand Down Expand Up @@ -65,38 +66,6 @@
],
"run_at": "document_end"
},
{
"matches": [
"*://www.parkrun.org.uk/results/athleteresultshistory/*",
"*://www.parkrun.com.au/results/athleteresultshistory/*",
"*://www.parkrun.co.nz/results/athleteresultshistory/*",
"*://www.parkrun.ca/results/athleteresultshistory/*",
"*://www.parkrun.ie/results/athleteresultshistory/*",
"*://www.parkrun.co.za/results/athleteresultshistory/*",
"*://www.parkrun.us/results/athleteresultshistory/*",
"*://www.parkrun.sg/results/athleteresultshistory/*",
"*://www.parkrun.pl/results/athleteresultshistory/*",
"*://www.parkrun.it/results/athleteresultshistory/*",
"*://www.parkrun.dk/results/athleteresultshistory/*",
"*://www.parkrun.se/results/athleteresultshistory/*",
"*://www.parkrun.fi/results/athleteresultshistory/*",
"*://www.parkrun.fr/results/athleteresultshistory/*",
"*://www.parkrun.com.de/results/athleteresultshistory/*",
"*://www.parkrun.no/results/athleteresultshistory/*",
"*://www.parkrun.ru/results/athleteresultshistory/*",
"*://www.parkrun.my/results/athleteresultshistory/*",
"*://www.parkrun.jp/results/athleteresultshistory/*",
"*://www.parkrun.co.nl/results/athleteresultshistory/*",
"*://www.parkrun.co.at/results/athleteresultshistory/*"
],
"js": [
"js/lib/third-party/browser-polyfill/browser-polyfill-76eeeac.js",
"js/lib/third-party/jquery/jquery-3.6.0.js",
"js/lib/i18n.js",
"js/content-scripts/content-script-athleteresultshistory.js"
],
"run_at": "document_end"
},
{
"matches": [
"*://www.parkrun.org.uk/parkrunner/*/",
Expand All @@ -113,6 +82,7 @@
"*://www.parkrun.se/parkrunner/*/",
"*://www.parkrun.fi/parkrunner/*/",
"*://www.parkrun.fr/parkrunner/*/",
"*://www.parkrun.lt/parkrunner/*/",
"*://www.parkrun.no/parkrunner/*/",
"*://www.parkrun.com.de/parkrunner/*/",
"*://www.parkrun.ru/parkrunner/*/",
Expand All @@ -135,6 +105,7 @@
"*://www.parkrun.se/parkrunner/*/all/",
"*://www.parkrun.fi/parkrunner/*/all/",
"*://www.parkrun.fr/parkrunner/*/all/",
"*://www.parkrun.lt/parkrunner/*/all/",
"*://www.parkrun.no/parkrunner/*/all/",
"*://www.parkrun.com.de/parkrunner/*/all/",
"*://www.parkrun.ru/parkrunner/*/all/",
Expand All @@ -149,38 +120,6 @@
"js/content-scripts/content-script-parkrunner-summary.js"
],
"run_at": "document_end"
},
{
"matches": [
"*://www.parkrun.org.uk/*/results/athletehistory/*",
"*://www.parkrun.com.au/*/results/athletehistory/*",
"*://www.parkrun.co.nz/*/results/athletehistory/*",
"*://www.parkrun.ca/*/results/athletehistory/*",
"*://www.parkrun.ie/*/results/athletehistory/*",
"*://www.parkrun.co.za/*/results/athletehistory/*",
"*://www.parkrun.us/*/results/athletehistory/*",
"*://www.parkrun.sg/*/results/athletehistory/*",
"*://www.parkrun.pl/*/athletehistory/*",
"*://www.parkrun.it/*/athletehistory/*",
"*://www.parkrun.dk/*/athletehistory/*",
"*://www.parkrun.se/*/athletehistory/*",
"*://www.parkrun.fi/*/athletehistory/*",
"*://www.parkrun.fr/*/athletehistory/*",
"*://www.parkrun.com.de/*/athletehistory/*",
"*://www.parkrun.no/*/athletehistory/*",
"*://www.parkrun.ru/*/athletehistory/*",
"*://www.parkrun.my/*/results/athletehistory/*",
"*://www.parkrun.jp/*/results/athletehistory/*",
"*://www.parkrun.co.nl/*/results/athletehistory/*",
"*://www.parkrun.co.at/*/results/athletehistory/*"
],
"js": [
"js/lib/third-party/browser-polyfill/browser-polyfill-76eeeac.js",
"js/lib/third-party/jquery/jquery-3.6.0.js",
"js/lib/i18n.js",
"js/content-scripts/content-script-athleteeventhistory.js"
],
"run_at": "document_end"
}
],
"web_accessible_resources": [
Expand Down
1 change: 1 addition & 0 deletions browser-extensions/common/js/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ function getCountryNameFromId(id) {
"42": "Ireland",
"44": "Italy",
"46": "Japan",
"54": "Lithuania",
"57": "Malaysia",
"64": "Netherlands",
"65": "New Zealand",
Expand Down

This file was deleted.

This file was deleted.

1 change: 1 addition & 0 deletions browser-extensions/common/js/lib/challenges.js
Original file line number Diff line number Diff line change
Expand Up @@ -1314,6 +1314,7 @@ function get_flag_image_src(country) {
"Ireland": "ie",
"Italy": "it",
"Japan": "jp",
"Lithuania": "lt",
"Malaysia": "my",
"Namibia": "na",
"Netherlands": "nl",
Expand Down
Loading