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

feat:Quick categories #93

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from
Draft

feat:Quick categories #93

wants to merge 9 commits into from

Conversation

DanieliusAsm
Copy link
Contributor

What

Screenshot

Fixes bug(s)

Part of

$("ul[id^='products_'].search_results li[data-code]").each(function(index, element) {
let code = $(this).attr('data-code');

$('<div id="quick_category_' + code + '" class="list_categories_card"></div>').insertBefore( $('a.list_product_a', this) );

Check warning

Code scanning / CodeQL

DOM text reinterpreted as HTML Medium

DOM text
is reinterpreted as HTML without escaping meta-characters.
function showListHungerGamesButtons(){
$("ul[id^='products_'].search_results li[data-code]").each(function(index, element) {
let barcode = $(this).attr('data-code');
$(this).append('<a class="list_hunger_games_logo_search" alt="Hunger games logo search" title="Hunger games logo search" href="https://hunger.openfoodfacts.org/logos/search?barcode='+barcode+'"><span class="material-icons" id="list_button">image_search</span></a>');

Check warning

Code scanning / CodeQL

DOM text reinterpreted as HTML Medium

DOM text
is reinterpreted as HTML without escaping meta-characters.
@CharlesNepote CharlesNepote changed the title Draft: feat:Quick categories feat:Quick categories Jan 10, 2025
Copy link
Member

@CharlesNepote CharlesNepote left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DanieliusAsm sorry to review this so late. You have added a bunch of code, so I needed to take time to review it. In fact, some of the code, such as function getFrontImagesToRotate, were just moved to another place.

Also you are doing two different things in this PR: you're fixing a bug, and you're adding a feature. Both are interesting, but it's more difficult to review. And "quick categories" does not seem to work on my side :(

It would be better to have separate PR for the bug and for the feature, could you do this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

Successfully merging this pull request may close these issues.

2 participants