From 9a8fba5d8baa79f6f4ec95fdb49be9d0e188456b Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Thu, 5 Dec 2024 11:34:59 +0100 Subject: [PATCH] Add "external" icon to links to other domains (#324) (cherry picked from commit 69d5727c35f8520ba57cf1b59d9419d5be36c2ba) --- docs/js/custom.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/js/custom.js b/docs/js/custom.js index 9a68a3bc..28eeaa1f 100644 --- a/docs/js/custom.js +++ b/docs/js/custom.js @@ -75,6 +75,12 @@ $(document).ready(function() { } }); + $('.md-content a:not(.md-icon):not(.md-source):not(.instantsearch__entry)') + .filter(function() { + return this.hostname && this.hostname !== location.hostname; + }) + .addClass('external'); + docsearch({ container: '#docsearch', appId: 'WLX2XJZTRM',