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

Extension: Disable share buttons when domain is blackisted #9694

Merged
merged 6 commits into from
Jan 2, 2025

Conversation

PopDaph
Copy link
Contributor

@PopDaph PopDaph commented Jan 2, 2025

Description

  • New hook to access the current domain
  • Disable buttons if the domain is blacklisted.

Risk

Can be rolled back.

Deploy Plan

1/ Merge the base branch PR #9688.
2/ Publish the SDK package.
3/ Bump the extension package on the extension.

@PopDaph PopDaph requested a review from tdraier January 2, 2025 12:54
@tdraier
Copy link
Contributor

tdraier commented Jan 2, 2025

we should also handle the right click , all actions must be disabled

@PopDaph
Copy link
Contributor Author

PopDaph commented Jan 2, 2025

Indeed, good catch !!!!

setCurrentDomain(url.hostname);
}
} catch (e) {
console.error("Invalid URL:", e);
Copy link
Contributor

Choose a reason for hiding this comment

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

we don't want to log an error here (can be a normal behaviour if we are on chrome:// urls for example)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Chrome urls does not raise errors so if there's an error I think we want to know! But you're right, I still added a commit to handle chrome urls to also disable the buttons when we're on Chrome

Base automatically changed from extension-blacklist-domains-api to main January 2, 2025 15:39
@PopDaph PopDaph force-pushed the extension-blacklist-domains branch from f1a796e to 0a77ff6 Compare January 2, 2025 15:47
@PopDaph PopDaph force-pushed the extension-blacklist-domains branch from 0a77ff6 to c72dff6 Compare January 2, 2025 15:50
@PopDaph
Copy link
Contributor Author

PopDaph commented Jan 2, 2025

Will handle the right click on my next PR!

@PopDaph PopDaph merged commit b341e3a into main Jan 2, 2025
3 checks passed
@PopDaph PopDaph deleted the extension-blacklist-domains branch January 2, 2025 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants