Skip to content

Commit caa24fa

Browse files
committed
Update
1 parent 0bd8520 commit caa24fa

File tree

12 files changed

+109
-36
lines changed

12 files changed

+109
-36
lines changed

.eslintrc.json

Lines changed: 0 additions & 23 deletions
This file was deleted.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules/
2+
package-lock.json

.idea/.gitignore

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/inspectionProfiles/Project_Default.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/web_userscripts.iml

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

better-strava.user.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// @name Better Strava
33
// @author https://github.com/qligier/
44
// @namespace qligier
5-
// @version 20230307
5+
// @version 20250315
66
// @updateURL https://raw.githubusercontent.com/qligier/web_userscripts/master/better-strava.user.js
77
// @match https://www.strava.com/activities/*/edit
88
// @grant none
@@ -24,23 +24,23 @@
2424
function improveEditPage() {
2525
// Nodes of the page
2626
const nameField = document.querySelector('input[name="activity[name]"]')
27-
const shoeField = document.querySelector('select[name="activity[athlete_gear_id]"]')
27+
//const shoeField = document.querySelector('select[name="activity[athlete_gear_id]"]')
2828

2929
// New nodes
3030
const nameSuggestionsNode = document.createElement('p')
3131
nameField.parentNode.insertBefore(nameSuggestionsNode, nameField.nextSibling)
3232

33-
const names = ['Arve Acacias-Sierne', 'Rhône Acacias-Evaux', 'Aire Acacias-Lully', 'Bout-du-Monde intervalles', 'Grimpe - bloc', 'HIIT', 'Workout']
33+
const names = ['Lausanne - UNIL (10km)', 'Lausanne - Saint-Sulpice (12km)', 'Lausanne - Préverenges (21km)', 'Pierre-de-Coubertin intervalles', 'Grimpe - bloc', 'HIIT', 'Workout']
3434
for (let index in names) {
3535
const nameSuggestionNode = document.createElement('span')
3636
nameSuggestionNode.innerText = names[index]
3737
nameSuggestionNode.style = 'color: #007FB6; cursor: pointer; margin-right: 15px; font-size: 0.9em;'
3838
nameSuggestionNode.onclick = () => {
3939
nameField.value = names[index]
4040
document.querySelector('input[name="activity[visibility]"][value="everyone"]').checked = true
41-
if (index < 4) {
42-
shoeField.value = '12740691'
43-
}
41+
/*if (index < 4) {
42+
shoeField.value = '20076348'
43+
}*/
4444
}
4545
nameSuggestionsNode.appendChild(nameSuggestionNode)
4646
}

eslint.config.mjs

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import { defineConfig } from "eslint/config";
2+
import globals from "globals";
3+
import path from "node:path";
4+
import { fileURLToPath } from "node:url";
5+
import js from "@eslint/js";
6+
import { FlatCompat } from "@eslint/eslintrc";
7+
8+
const __filename = fileURLToPath(import.meta.url);
9+
const __dirname = path.dirname(__filename);
10+
const compat = new FlatCompat({
11+
baseDirectory: __dirname,
12+
recommendedConfig: js.configs.recommended,
13+
allConfig: js.configs.all
14+
});
15+
16+
export default defineConfig([{
17+
extends: compat.extends("eslint:recommended"),
18+
19+
languageOptions: {
20+
globals: {
21+
...globals.browser,
22+
...globals.greasemonkey,
23+
},
24+
25+
ecmaVersion: 12,
26+
sourceType: "script",
27+
28+
parserOptions: {
29+
ecmaFeatures: {
30+
jsx: false,
31+
experimentalObjectRestSpread: true,
32+
},
33+
},
34+
},
35+
36+
files: ["*.js"],
37+
38+
rules: {
39+
indent: ["error", 2],
40+
},
41+
}]);

0 commit comments

Comments
 (0)