|
| 1 | +# External Links Enhanced |
| 2 | + |
| 3 | +Plugin that adds additional icons for external links. |
| 4 | + |
| 5 | +## Supported Links |
| 6 | + |
| 7 | +The following sites are supported out of the box: |
| 8 | + |
| 9 | +* Facebook (facebook.com) |
| 10 | +* Instagram (instagram.com) |
| 11 | +* Patreon (patreon.com) |
| 12 | +* Reddit (reddit.com) |
| 13 | +* Telegram (telegram.com | t.me) |
| 14 | +* TikTok (tiktok.com) |
| 15 | +* Tumblr (tumblr.com) |
| 16 | +* Twitch (twitch.tv) |
| 17 | +* Twitter (twitter.com | x.com) |
| 18 | +* VK (vk.com) |
| 19 | +* YouTube (youtube.com) |
| 20 | + |
| 21 | +Want more icons? It's pretty simple to add your own; however, it's recommended to request an icon to be added the CommunityScripts repository. When you install the plugin from the CommunityScripts repository, it will come bundled with icons that the community has contributed. |
| 22 | + |
| 23 | +## Creating a custom icon |
| 24 | + |
| 25 | +First, you'll need to locate the `custom/` directory found in the plugin's directory. This houses `custom.json` along with the custom icons. |
| 26 | + |
| 27 | +> NOTE: Images and SVGs are supported when using an icon. |
| 28 | +
|
| 29 | +In `custom.json`, you will find link definitions. Below is an example definition. |
| 30 | + |
| 31 | +```js |
| 32 | +{ |
| 33 | + name: "sitename", |
| 34 | + icon: "myicon.png", |
| 35 | + addresses: ["mysitename.com"] |
| 36 | +} |
| 37 | +``` |
| 38 | + |
| 39 | +The `name` is a unique identifier. The `icon` can be an SVG or image. The `addresses` array will be used in conjunction with the `regex` property (not shown above since it's not required) for link detection to properly categorize the icons. The default/fallback regex is `https?:\/\/(?:www\.)?${addr}\/` |
| 40 | + |
| 41 | +After you've created your definitions, simply toss your icons in the same directory as `custom.json`. |
| 42 | + |
| 43 | + |
| 44 | +## Things to know |
| 45 | + |
| 46 | +The plugin will fetch both the `custom.json` and icon files from the hard-coded plugin directory: |
| 47 | + |
| 48 | +`./plugin/externalLinksEnhanced/assets/custom` |
| 49 | + |
| 50 | +This means if you rename the `externalLinksEnhanced` directory, things will break. You would need to update `customAssetPath` in the `externalLinksEnhanced.js` file. |
| 51 | + |
| 52 | +## Support |
| 53 | + |
| 54 | +I (Qx) developed this plugin but I'm giving it to the community to change and update it as much as they like. The original source code can be found [here](https://github.com/QxxxGit/stash-plugins/tree/main/develop/external-links-enhanced). |
| 55 | + |
| 56 | +If you're looking for a clean install of the plugin without the custom icons, you can add my plugin repo source to Stash and install it that way: |
| 57 | + |
| 58 | +`https://qxxxgit.github.io/stash-plugins/index.yml` |
0 commit comments