-
Notifications
You must be signed in to change notification settings - Fork 76
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
[general] Customize favicon's color #197
Comments
That's a good idea which has been requested by other members of the community 👍 |
## Describe your changes This PR allows users to customize favicons with a custom url or predefined colors (green, orange, pink, purple, red, yellow) ## Issue ticket number and link #197 ## Checklist before requesting a review - [x] I have read and understand the [Contributions section](https://github.com/tprouvot/Salesforce-Inspector-reloaded#contributions) - [x] Target branch is releaseCandidate and not master - [x] I have performed a self-review of my code - [x] I ran the [unit tests](https://github.com/tprouvot/Salesforce-Inspector-reloaded#unit-tests) and my PR does not break any tests - [x] I documented the changes I've made on the [CHANGES.md](https://github.com/tprouvot/Salesforce-Inspector-reloaded/blob/master/CHANGES.md) and followed actual conventions - [x] I added a new section on [how-to.md](https://github.com/tprouvot/Salesforce-Inspector-reloaded/blob/master/docs/how-to.md) (optional) <img width="901" alt="image" src="https://github.com/tprouvot/Salesforce-Inspector-reloaded/assets/35368290/1bbd9cc8-2425-4e79-8a92-a4e954f3d369">
Will be released in 1.23 🚀 and in the beta version sooner |
Anyway to not have to set it for each org manually? Perhpas it can match the color of this extension somehow |
Hi @RebbePod, I don't know how are you dev skills but I think you/we can code something in order to add a favicon for all the orgs you've visited. |
@tprouvot Theres two parts to this, one the way I see it, have an option to auto set each org a different color. So every org visited is unique. Second part is copying the functionality of that other extension, giving an option for the favicon to be colored for the org pages not just inspector. My skills are limited, but I can definitely try to take a look if you give me some direction |
Part 2 is already developed and available in the beta version. |
Over 30 😀 |
it's also about ease of use. A setting to change the color makes sense, but why shouldn't auto assign one to start off? |
let colors = ['green', 'orange', 'pink', 'purple', 'red', 'yellow'];
let orgs = Object.keys(localStorage).filter((localKey) =>
localKey.endsWith("_isSandbox")
);
orgs.forEach((org) => {
let sfHost = org.substring(0, org.indexOf(("_isSandbox")));
let randomFavicon = colors[(Math.floor(Math.random() * colors.length))]
console.info(sfHost + "_customFavicon", randomFavicon);
localStorage.setItem(sfHost + "_customFavicon", randomFavicon);
}); |
Will this keep the color of each one, so it's the same color everytime I reopen it? |
@RebbePod yes |
@tprouvot it's working great so far, not sure if you'd like to incorporate it in somehow |
@RebbePod actually I documented the code in the how-to section and enhanced the feature by increasing the available colors with HTML codes |
When we open multiple tabs, both Salesforce and Inspector, then the inspector tabs are not easily identifiable (screenshots below).
For fewer tabs it's fine, but it becomes slightly difficult when we've many tabs open in a single browser window.
Would it be possible to change the color of the icon please or give users an option to do so?
Thanks.
It was easy in the original inspector:
The text was updated successfully, but these errors were encountered: