Skip to content

Commit

Permalink
[general] Fix hardcoded browser in generate token url (#139)
Browse files Browse the repository at this point in the history
  • Loading branch information
tprouvot authored Aug 18, 2023
1 parent 27688de commit d6f9438
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## General

- Fix hardcoded browser in Generate Token url [issue 137](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/137) (issue by [kkorynta](https://github.com/kkorynta))
- Add "Create New Flow" shortcut
- Update pop-up release note link to github pages
- Detect SObject on listview page [feature 121](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/121) (idea by [Mehdi Cherfaoui](https://github.com/mehdisfdc))
Expand Down
3 changes: 2 additions & 1 deletion addon/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ class App extends React.PureComponent {
hostArg.set("host", sfHost);
let linkInNewTab = localStorage.getItem("openLinksInNewTab");
let linkTarget = inDevConsole || linkInNewTab ? "_blank" : "_top";
let browser = navigator.userAgent.includes("Chrome") ? "chrome" : "moz";
return (
h("div", {},
h("div", { className: "slds-grid slds-theme_shade slds-p-vertical_x-small slds-border_bottom" },
Expand Down Expand Up @@ -188,7 +189,7 @@ class App extends React.PureComponent {
h("a",
{
ref: "generateToken",
href: `https://${sfHost}/services/oauth2/authorize?response_type=token&client_id=` + clientId + "&redirect_uri=chrome-extension://" + chrome.runtime.id + "/data-export.html?host=" + sfHost + "%26",
href: `https://${sfHost}/services/oauth2/authorize?response_type=token&client_id=` + clientId + "&redirect_uri=" + browser + "-extension://" + chrome.runtime.id + "/data-export.html?host=" + sfHost + "%26",
target: linkTarget,
className: !clientId ? "button hide" : "page-button slds-button slds-button_neutral"
},
Expand Down

0 comments on commit d6f9438

Please sign in to comment.