From 9916669e2dee40d08a8b7e2af298b43e13a2af00 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Wed, 4 Dec 2024 17:51:42 +0100 Subject: [PATCH] custom.js: Add `external` CSS class to link to other domains --- 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',