# Change share icon by OS

**URL:** https://meta.discourse.org/t/change-share-icon-by-os/326617
**Category:** Theme component
**Created:** [September 16, 2024, 5:25am UTC](https://meta.discourse.org/t/change-share-icon-by-os/326617 "2024-09-16T05:25:51Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)
#### Post date: [September 16, 2024, 5:25am UTC](https://meta.discourse.org/t/change-share-icon-by-os/326617/1 "2024-09-16T05:25:51Z")

</div>

| | | |
| --- | --- | --- |
| ℹ | **Summary** | Change share icon by OS |
| 🛠 | **Repository** | [GitHub - VaperinaDEV/change-share-icon-by-os: This simple theme component will change share icon on posts and topics by OS. · GitHub](https://github.com/VaperinaDEV/change-share-icon-by-os) |
| ❤ | **Found it useful?** | [\> ./support --coffee](https://meta.discourse.org/u/don) |
| ❓ | **Install Guide** | [How to install a theme or theme component](https://meta.discourse.org/t/how-do-i-install-a-theme-or-theme-component/63682) |
| 📖 | **New to Discourse Themes?** | [Beginner’s guide to using Discourse Themes](https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966) |

Install this theme component

Hello 👋

This simple theme component will change share icon on posts and topics from to . On Android will change it to .

~~Note: If you use `copyLink` in `post_menu` than you probably don’t want to use this component as that’s copy post link instantly on desktop so the icon is a great choice for that. Maybe I should restrict this component for mobile or keep the original link icon on desktop if `copyLink` enabled. 🤔~~

To handle this I’ve added a setting with you can disable the icon change on desktop. It is recommended to enable, if the `copyLink` is added to the `post_menu`. copyLink is added by default so this setting is enabled by default. This will keep the default link icon on posts on desktop.

 ![Screenshot 2024-09-16 at 8.54.55](https://global.discourse-cdn.com/meta/original/4X/c/7/d/c7d90f4ecfc89fab62bc025b4c7b35acc6c4be6e.png)

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [September 16, 2024, 6:06am UTC](https://meta.discourse.org/t/change-share-icon-by-os/326617/2 "2024-09-16T06:06:42Z")

</div>

Keep the original one, please.

I like idea of that component, but I’m a bit wondering, as an apple mobile user, if it really works because the functionality of OS-icon in OS is different. It more than a just link or copying a link. But perhaps I’m just overthinking and overdramatizing this because I’m bored.

---

<div class="post-metadata">

### Author: ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)
#### Post date: [September 16, 2024, 5:15pm UTC](https://meta.discourse.org/t/change-share-icon-by-os/326617/3 "2024-09-16T17:15:22Z")

</div>

> [@Jagster](#):
>
> Keep the original one, please.

I’ve added a setting to keep the default link icon on desktop if the instant post copy link is active.

> [@Jagster](#):
>
> I’m a bit wondering, as an apple mobile user, if it really works because the functionality of OS-icon in OS is different. It more than a just link or copying a link.

On iOS and Android it will change the default link icon because it uses the native share panel. So not instantly copying the post link but open the native share panel.

Overall, it only keeps the link icon by default, if it’s instantly copy the post link. But it can be control with the setting . 🙂

---

<div class="post-metadata">

### Author: ![Roi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/roi/32/130587_2.png) [@Roi](https://meta.discourse.org/u/Roi)
#### Post date: [November 2, 2025, 10:20pm UTC](https://meta.discourse.org/t/change-share-icon-by-os/326617/4 "2025-11-02T22:20:56Z")

</div>

I got a deprecation notice for this great theme component in the developer console of the browser:

> [THEME 57 ‘Change share icon by OS’] Deprecation notice: Accessing `site.mobileView` or `site.desktopView` during the site initialization can lead to errors and inconsistencies when the browser window is resized. Please move these checks to a component, transformer, or API callback that executes during page rendering. [deprecated since Discourse 3.5.0.beta9-dev] [deprecation id: discourse.static-viewport-initialization] [info: [Designing for Different Devices (Viewport Size, Touch/Hover, etc.)](https://meta.discourse.org/t/367810)]

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [July 15, 2026, 6:55am UTC](https://meta.discourse.org/t/change-share-icon-by-os/326617/5 "2026-07-15T06:55:46Z")

</div>

FYI:

```plaintext
Admin Notice] Theme 'Change share icon by OS' contains code which needs updating. (id:discourse.static-viewport-initialization) (learn more)

```

---

<div class="post-metadata">

### Author: ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)
#### Post date: [July 18, 2026, 10:30am UTC](https://meta.discourse.org/t/change-share-icon-by-os/326617/6 "2026-07-18T10:30:03Z")

</div>

Thanks @Jagster, I fixed it.

---

<div class="post-metadata">

### Author: ![Roi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/roi/32/130587_2.png) [@Roi](https://meta.discourse.org/u/Roi)
#### Post date: [July 18, 2026, 10:44am UTC](https://meta.discourse.org/t/change-share-icon-by-os/326617/7 "2026-07-18T10:44:56Z")

</div>

> [@Don](#):
>
> I fixed it.

Thank you very much, the notification vanished! 😃
