Skip to content

Commit

Permalink
Minor update version 1.5.7 (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
keybraker committed Nov 26, 2023
1 parent ef4e2a9 commit 32f5de7
Show file tree
Hide file tree
Showing 13 changed files with 32 additions and 23 deletions.
Binary file added assets/store_images/chrome.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/store_images/firefox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 9 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# ![Alt Text](../src/assets/icons/48.png) Skroutz Sponsored Flagger

Skroutz Sponsored Flagger is a browser extension that detects and highlights sponsored products on [skroutz.gr](https://skroutz.gr).<br>
You can start using it by simply downloading it from the [Chrome Extension Store](https://chrome.google.com/webstore/detail/skroutz-sponsored-flagger/amglnkndjeoojnjjeepeheobhneeogcl) or [Firefox Add-ons Store](https://addons.mozilla.org/en-US/firefox/addon/skroutz-sponsored-flagger).

![Alt Text](../assets/large_promo.png)

Expand Down Expand Up @@ -44,3 +43,12 @@ If you have any suggestions for improvements or are facing a bug, feel free to s
## License

This extension is licensed under the GNU general public license. See the LICENSE file for more details.

<p align="center">
<a href="https://addons.mozilla.org/en-US/firefox/addon/skroutz-sponsored-flagger">
<img src="../assets/store_images/firefox.png" alt="Firefox" width="300" style="vertical-align: middle;">
</a>
<a href="https://chrome.google.com/webstore/detail/skroutz-sponsored-flagger/amglnkndjeoojnjjeepeheobhneeogcl">
<img src="../assets/store_images/chrome.png" alt="Chrome" width="300" style="vertical-align: middle;">
</a>
</p>
Binary file modified src/assets/icons/128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/icons/48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/icons/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 0 additions & 3 deletions src/css/flaggerToggle.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@


.flagger-toggle-product {
display: flex;
align-items: center;
justify-content: center;
margin: 8px 16px 16px 0px !important;
padding: 9px 17px !important;
display: flex !important;
Expand Down
18 changes: 9 additions & 9 deletions src/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@

.align-end {
text-align: end !important;
/* font-style: italic !important; */
}

text-black {
Expand All @@ -46,8 +45,9 @@ text-black {
.sponsored-label,
.flagged-list-title,
.label-text {
border-radius: 5px !important;
padding: 2px 6px 2px !important;
border-radius: 2px !important;
padding: 8px 12px !important;

background-color: #ffdbdf !important;
font-weight: bold !important;
color: red !important;
Expand All @@ -60,21 +60,21 @@ text-black {
}

.info-label-positive {
border: 1px solid var(--color-text-success-default) !important; /* Updated to use variable */
border: 1px solid var(--color-text-success-default) !important;
line-height: 1.4 !important;
font-size: 16px !important;
font-weight: 500 !important;
background-color: var(--color-background-success-weak) !important; /* Updated to use variable */
color: var(--color-text-success-default) !important; /* Updated to use variable */
background-color: var(--color-background-success-weak) !important;
color: var(--color-text-success-default) !important;
}

.info-label-negative {
border: 1px solid var(--custom-light-red, #ff0000) !important; /* Existing implementation */
border: 1px solid var(--custom-light-red, #ff0000) !important;
line-height: 1.4 !important;
font-size: 16px !important;
font-weight: 500 !important;
background-color: var(--color-background-accent-weak) !important; /* Matches existing color */
color: var(--color-text-accent-default) !important; /* Matches existing color */
background-color: var(--color-background-accent-weak) !important;
color: var(--color-text-accent-default) !important;
}

.sponsored-label svg,
Expand Down
4 changes: 2 additions & 2 deletions src/handlers/sponsoredProductHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ export class SponsoredProductHandler {

private hasSponsoredLabelText(listItem: Element): boolean {
const labelTextElement = listItem.querySelector(".label-text");
return !!labelTextElement && isSponsored(labelTextElement);
return isSponsored(labelTextElement);
}

private hasFlaggedLabelText(listItem: Element): boolean {
const labelTextElement = listItem.querySelector(".label-text");
return !!labelTextElement && isFlagged(labelTextElement);
return isFlagged(labelTextElement);
}
}
2 changes: 1 addition & 1 deletion src/manifest_chrome.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Skroutz Sponsored Flagger",
"description": "Flags sponsored products on Skroutz.gr",
"version": "1.5.6",
"version": "1.5.7",
"manifest_version": 3,
"permissions": [],
"content_scripts": [
Expand Down
2 changes: 1 addition & 1 deletion src/manifest_firefox.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Skroutz Sponsored Flagger",
"description": "Flags sponsored products on Skroutz.gr",
"version": "1.5.6",
"version": "1.5.7",
"manifest_version": 3,
"permissions": [],
"content_scripts": [
Expand Down
9 changes: 6 additions & 3 deletions src/popup/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Skroutz Sponsored Flagger</title>
<link rel="stylesheet" href="popup.css" />
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap" rel="stylesheet">
Expand Down Expand Up @@ -32,13 +33,15 @@
</div>

<div class="rate-section">
<p><strong>If you enjoy SSF<br>rate it on</strong></p>
<p><strong>If you enjoy the extension<br>rate it on</strong></p>
<div class="icons">
<a href="https://addons.mozilla.org/en-US/firefox/addon/skroutz-sponsored-flagger/reviews/" target="_blank" rel="noopener noreferrer" class="icon-link">
<img src="https://www.mozilla.org/media/protocol/img/logos/firefox/browser/logo.eb1324e44442.svg" alt="Rate on Firefox Add-ons" class="rate-icon" />
<img src="https://raw.githubusercontent.com/keybraker/skroutz-sponsored-flagger/main/assets/store_images/firefox.png" width="150" alt="Rate on Firefox Add-ons" class="rate-icon" />
<!-- src="https://www.mozilla.org/media/protocol/img/logos/firefox/browser/logo.eb1324e44442.svg" -->
</a>
<a href="https://chrome.google.com/webstore/detail/skroutz-sponsored-flagger/amglnkndjeoojnjjeepeheobhneeogcl?hl=en&authuser=0" target="_blank" rel="noopener noreferrer" class="icon-link">
<img src="https://www.google.com/chrome/static/images/chrome-logo-m100.svg" alt="Rate on Chrome Web Store" class="rate-icon" />
<img src="https://raw.githubusercontent.com/keybraker/skroutz-sponsored-flagger/main/assets/store_images/chrome.png" width="150" alt="Rate on Chrome Web Store" class="rate-icon" />
<!-- src="https://www.google.com/chrome/static/images/chrome-logo-m100.svg" -->
</a>
</div>
</div>
Expand Down
7 changes: 4 additions & 3 deletions src/utilities/sponsoredUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ export function updateSponsoredTextSingle(
}
}

export function isSponsored(element: Element | null) {
if (!element || !element?.textContent) {
export function isSponsored(element: Element | null): boolean {
if (!element || !element.textContent) {
return false;
}

Expand All @@ -64,5 +64,6 @@ export function isSponsored(element: Element | null) {
"Sponsored",
];

return sponsoredTexts.includes(element.textContent);
return sponsoredTexts.includes(element.textContent.trim());
}

0 comments on commit 32f5de7

Please sign in to comment.