Install Webpage as APP with custom Icon (like in Edge)

I’m currently evaluating Brave as a potential solution for my company to run two different Dynamics instances from two tenants including MS SSO, device conditional access, etc on the same laptop (which Edge sadly currently is not supporting).

All is now working fine so far, the Microsoft extension “MS Single Sign On” is installed and managing the technology, now only one questions is left. I would like to install/deploy the Microsoft Dynamics site as Application, so that the dedicated window is opening and without the URL line, etc…
This I’ve also foundwhile just creating a shortcut like: “C:\Program Files\BraveSoftware\Brave-Browser\Application\brave.exe” --app=https://xxxxxxxxx.crm4.dynamics.com
I can also change the icon of the shortcut to our custom ones, but when I open it, the brave-icon is shown in the taskbar and the windows one from Dynamics in the opened window. This is not dramatic, but also not nice. Also I can add the shortcut with the Icon to the taskbar, but when clicking a new icon is open…

I wonder if there would be nice solution like in Edge to “Install Webpage as App” and then selecting the Custom Icon for it in the next step (or just defining another parameter in the above shortcut link to hand over icon to be used), that the layout is consistent.

Thanks,
Kai

Brave has Web App Universal Install disabled by default.
So the option “Install Webpage as App” is shown only in websites that offer a PWA.
The website you mentioned doesn’t offer a PWA.
So to have this option “Install Webpage as App” shown to all websites, you need to go to brave://flags/#web-app-universal-install
and enable the option.
When you enable it, restart your browser and the option “Install Webpage as App” will be available in all websites like it is in Chrome and Edge.
Btw, I would never use PWAs created by Edge. I hate them because Edge took Chromium’s great PWA support and added their bloatware even on that. Edge PWAs are registed as msix packages and this way Microsoft managed to destroy the nice portability Chromium PWAs have.

2 Likes

Thanks for your reply. I’ve been scouring everywhere (but here) seeking for a solution for my beloved PWA going MIA. I rely on this feature for work and leisure. Stinks its an added step to re-enable. But, in the grand scheme of things, if this is all i get to complain about today, I’m doing all right.

Thanks again!

1 Like

Thanks @erebus , that was a great answer simplifying the creation of the WebApp (probably not only for me).

Sadly it doesn’t solve the second part of the question, with a custom icon. When I’m getting the install as app pop-up I can’t change the icon in Brave, while I can in Edge, where there is a small edit icon below the automatic taken icon, as shown in the screenshot.

Screenshot 2024-09-10 155824
Screenshot 2024-09-10 155956

I know it’s easy to just change the icon on the desktop shortcut. But changing the icon in Edge also changes the icon in the taskbar, when it is open and also on the top left in the app window. Brave always uses only the Microsoft Dynamics favicon.

Screenshot 2024-09-11 120618

OK, for now I’ve found a workaround. I’ve asked chatGPT to create an extension to overwrite the favicon of the current webpage with a custom icon. And when I export this webpage as App, the custom icon is used instead of the original Microsoft one. Now I will start looking into how to export this app for deployment on other laptops :wink:

Quick guide on how to create the extension:

  • Create a folder named “favicon-changer”

  • Inside the favicon-changer folder, create a file named manifest.json with the following content:

{
  "manifest_version": 3,
  "name": "Favicon Changer",
  "version": "1.0",
  "description": "Change the favicon of any webpage easily.",
  "permissions": [
    "activeTab",
    "scripting"
  ],
  "action": {
    "default_popup": "popup.html",
    "default_title": "Change Favicon"
  }
}
  • Create a popup.html file with the following content:
<!DOCTYPE html>
<html>
  <head>
    <title>Change Favicon</title>
    <style>
      body { width: 200px; font-family: Arial, sans-serif; padding: 10px; }
      input { width: 100%; margin-bottom: 10px; }
      button { width: 100%; padding: 5px; }
    </style>
  </head>
  <body>
    <h3>Change Favicon</h3>
    <input type="text" id="faviconUrl" placeholder="Enter favicon URL" />
    <button id="changeFavicon">Change Favicon</button>
    <script src="popup.js"></script>
  </body>
</html>
  • Create a popup.js file with the following content:
document.getElementById("changeFavicon").addEventListener("click", () => {
  const faviconUrl = document.getElementById("faviconUrl").value;

  if (faviconUrl) {
    chrome.tabs.query({ active: true, currentWindow: true }, (tabs) => {
      const tabId = tabs[0].id;

      chrome.scripting.executeScript({
        target: { tabId: tabId },
        function: changeFavicon,
        args: [faviconUrl]
      });
    });
  }
});

function changeFavicon(newFaviconUrl) {
  // Change the 'icon' favicon
  let iconLink = document.querySelector("link[rel~='icon']");
  if (!iconLink) {
    iconLink = document.createElement('link');
    iconLink.rel = 'icon';
    document.getElementsByTagName('head')[0].appendChild(iconLink);
  }
  iconLink.href = newFaviconUrl;

  // Change the 'shortcut icon' favicon
  let shortcutLink = document.querySelector("link[rel~='shortcut icon']");
  if (!shortcutLink) {
    shortcutLink = document.createElement('link');
    shortcutLink.rel = 'shortcut icon';
    document.getElementsByTagName('head')[0].appendChild(shortcutLink);
  }
  shortcutLink.href = newFaviconUrl;
}
  1. Open Chrome or Brave and navigate to chrome://extensions/.
  2. Enable Developer mode in the top right corner.
  3. Click Load unpacked and select the favicon-changer folder you just created.
    The extension will now appear in the extensions list and will be ready to use to replace the favicon for every webpage with a custom one.

After changing the icon, you can install the page with the new custom icon as APP as described from @erebus :

Brave has Web App Universal Install disabled by default.
So the option “Install Webpage as App” is shown only in websites that offer a PWA.
The website you mentioned doesn’t offer a PWA.
So to have this option “Install Webpage as App” shown to all websites, you need to go to brave://flags/#web-app-universal-install
and enable the option.
When you enable it, restart your browser and the option “Install Webpage as App” will be available in all websites like it is in Chrome and Edge.

Not sure if Brave Developes will consider to add the change icon option to the export functionality. But at least this seems to resolve the topic.

but i can install youtube as an app EDGE but not on brave browser. whats the solution