Open vadykoo opened 1 year ago
I found the following snippets in your repository. I will now analyze these snippets and come up with a plan.
content_script.js
✅ Commit 304c915
• Add a counter variable at the beginning of the `addEmojisToTextNode` function. • Increment this counter each time a brand is found. • After the page has been processed, save this counter to the Chrome storage with a key specific to the current page URL. • Also, update a global counter in the storage to keep track of the total number of times each brand has been found across all pages.Sandbox Execution Logs
trunk init
1/3 ✓⡿ Downloading Trunk 1.16.1... ⡿ Downloading Trunk 1.16.1... ⢿ Downloading Trunk 1.16.1... ⣻ Downloading Trunk 1.16.1... ⣽ Downloading Trunk 1.16.1... ⣾ Downloading Trunk 1.16.1... ⣷ Downloading Trunk 1.16.1... ⣯ Downloading Trunk 1.16.1... ⣟ Downloading Trunk 1.16.1... ⡿ Downloading Trunk 1.16.1... ⢿ Downloading Trunk 1.16.1... ⣻ Downloading Trunk 1.16.1... ⣽ Downloading Trunk 1.16.1... ⣾ Downloading Trunk 1.16.1... ✔ Downloading Trunk 1.16.1... done ⡿ Verifying Trunk sha256... ✔ Verifying Trunk sha256... done ⡿ Unpacking Trunk... ✔ Unpacking Trunk... done ✔ 7 linters were enabled (.trunk/trunk.yaml) checkov 2.4.9 (1 json, 1 yaml file) git-diff-check (11 files) oxipng 8.0.0 (3 png files) prettier 3.0.3 (1 html, 3 javascript, 1 json, 1 yaml file) trivy 0.45.1 (1 yaml file) trufflehog 3.57.0 (11 files) yamllint 1.32.0 (1 yaml file) (created .yamllint.yaml) Next Steps 1. Read documentation Our documentation can be found at https://docs.trunk.io 2. Get help and give feedback Join the Trunk community at https://slack.trunk.io
trunk fmt content_script.js
2/3 ✓✔ Formatted content_script.js Re-checking autofixed files... Checked 1 file ✔ No issues
trunk check --fix content_script.js
3/3 ✓Checked 1 file ✔ No issues
popup.js
✅ Commit bb4625a
• Retrieve the counter for the current page from the Chrome storage and display it in the popup. • Also, retrieve the global counter from the storage and display it in the popup.Sandbox Execution Logs
trunk init
1/3 ✓⡿ Downloading Trunk 1.16.1... ⡿ Downloading Trunk 1.16.1... ⢿ Downloading Trunk 1.16.1... ⣻ Downloading Trunk 1.16.1... ⣽ Downloading Trunk 1.16.1... ⣾ Downloading Trunk 1.16.1... ⣷ Downloading Trunk 1.16.1... ⣯ Downloading Trunk 1.16.1... ⣟ Downloading Trunk 1.16.1... ⡿ Downloading Trunk 1.16.1... ⢿ Downloading Trunk 1.16.1... ⣻ Downloading Trunk 1.16.1... ⣽ Downloading Trunk 1.16.1... ⣾ Downloading Trunk 1.16.1... ✔ Downloading Trunk 1.16.1... done ⡿ Verifying Trunk sha256... ✔ Verifying Trunk sha256... done ⡿ Unpacking Trunk... ✔ Unpacking Trunk... done ✔ 7 linters were enabled (.trunk/trunk.yaml) checkov 2.4.9 (1 json, 1 yaml file) git-diff-check (11 files) oxipng 8.0.0 (3 png files) prettier 3.0.3 (1 html, 3 javascript, 1 json, 1 yaml file) trivy 0.45.1 (1 yaml file) trufflehog 3.57.0 (11 files) yamllint 1.32.0 (1 yaml file) (created .yamllint.yaml) Next Steps 1. Read documentation Our documentation can be found at https://docs.trunk.io 2. Get help and give feedback Join the Trunk community at https://slack.trunk.io
trunk fmt popup.js
2/3 ✓✔ Formatted popup.js Re-checking autofixed files... Checked 1 file ✔ No issues
trunk check --fix popup.js
3/3 ✓Checked 1 file ✔ No issues
I have finished reviewing the code for completeness. I did not find errors for sweep/brand-counter
.
.
🎉 Latest improvements to Sweep:
💡 To recreate the pull request edit the issue title or description. To tweak the pull request, leave a comment on the pull request. Join Our Discord
also, it has to be the counter in storage of all times that brand was found on the page, it has to add a counter of brands on this page after the page is loaded and the loop of searching brands is finished to storage counter
Checklist
- [X] `content_script.js` ✅ Commit [`304c915`](https://github.com/vadykoo/boykottRussianBrands/commit/304c915922d8206ad1f55927c4c79323773a4f5d) - [X] `popup.js` ✅ Commit [`bb4625a`](https://github.com/vadykoo/boykottRussianBrands/commit/bb4625ad53b14f1b8653c39685f3e0e5809adadd)