From 57893b0ec9f54c086853c0e161cba4a3acc49208 Mon Sep 17 00:00:00 2001 From: Thomas Prouvot <35368290+tprouvot@users.noreply.github.com> Date: Fri, 5 May 2023 15:12:43 +0200 Subject: [PATCH] [feat] General : add option to open links in new tab (#84) Fix #78 --- CHANGES.md | 1 + addon/popup.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 299e87d9..84bab2d8 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -3,6 +3,7 @@ Version 1.17 General ------- +* Add a configuration option for links to open in a new tab ([feature 78](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/75) ) * Import data as JSON ([feature 75](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/75) ) * Fix auto update action on data import ([issue 73](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/73) ) * Restore focus on suggested fields when pressing tab key in query editor ([issue 66](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/66) created by [Enrique Muñoz](https://github.com/emunoz-at-wiris)) diff --git a/addon/popup.js b/addon/popup.js index 958c2646..22b4e12f 100644 --- a/addon/popup.js +++ b/addon/popup.js @@ -131,7 +131,8 @@ class App extends React.PureComponent { let orgInstance = this.getOrgInstance(sfHost); let hostArg = new URLSearchParams(); hostArg.set("host", sfHost); - let linkTarget = inDevConsole ? "_blank" : "_top"; + let linkInNewTab = localStorage.getItem("openLinksInNewTab"); + let linkTarget = inDevConsole || linkInNewTab ? "_blank" : "_top"; return ( h("div", {}, h("div", { className: "header" },