Skip to content

Commit

Permalink
Merge branch 'rework-pronoun-field-matching'
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsVipra committed Jul 14, 2023
2 parents 36f8f1e + 777724c commit 28921ce
Show file tree
Hide file tree
Showing 10 changed files with 497 additions and 73 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/codequality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,12 @@ jobs:
run: npm ci
- name: Run eslint
run: npm run lint

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
5 changes: 3 additions & 2 deletions jsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"compilerOptions": {
"module": "ESNext",
"target": "ESNext",
"checkJs": true
"checkJs": true,
"moduleResolution": "nodenext"
},
"include": ["src/**/*.js"]
"include": ["src/**/*.js", "tests/**/*.js"]
}
108 changes: 95 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"watch:webext": "web-ext run --keep-profile-changes --profile-create-if-missing --firefox-profile=.firefox-profile/",
"format": "prettier --write --ignore-path .gitignore .",
"package": "run-s -l build:**",
"lint": "eslint src/"
"lint": "eslint src/",
"test": "uvu tests/"
},
"devDependencies": {
"@sprout2000/esbuild-copy-plugin": "1.1.8",
Expand All @@ -17,6 +18,7 @@
"eslint-config-prettier": "^8.8.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.8.8",
"uvu": "^0.5.6",
"web-ext": "^7.6.2"
},
"prettier": {
Expand All @@ -25,10 +27,12 @@
"useTabs": true,
"trailingComma": "all"
},
"type": "module",
"webExt": {
"sourceDir": "dist/"
},
"dependencies": {
"sanitize-html": "^2.11.0",
"webextension-polyfill": "^0.10.0"
}
}
3 changes: 1 addition & 2 deletions src/content_scripts/protoots.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import {
accountNameFromURL,
addTypeAttribute,
normaliseAccountName,
sanitizePronouns,
} from "../libs/protootshelpers";

//before anything else, check whether we're on a Mastodon page
Expand Down Expand Up @@ -208,7 +207,7 @@ async function addProplate(element) {
if (pronouns == "null" && !isLogging()) {
return;
}
proplate.innerHTML = sanitizePronouns(pronouns);
proplate.innerText = pronouns;
//TODO?: alt text
proplate.classList.add("protoots-proplate");
if (accountName == "[email protected]" || accountName == "[email protected]") {
Expand Down
Loading

0 comments on commit 28921ce

Please sign in to comment.