Skip to content

Commit

Permalink
Versioncheck: Open links in default browser
Browse files Browse the repository at this point in the history
(integrated from the KomodoIDE master branch change b3418ce3c6 by Nathan Rijksen <[email protected]>)

Komodo/KomodoIDE@b3418ce3c6
  • Loading branch information
Naatan committed Jul 11, 2017
1 parent 830a033 commit 51e8aaa
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/chrome/komodo/content/launch.p.js
Original file line number Diff line number Diff line change
Expand Up @@ -617,11 +617,34 @@ this.newVersionCheck = function(includeMinor=false)

var nav = bde.querySelector("NAV");
var bc = bde.querySelector(".breadcrumbs");
var bcu = bde.querySelector("#under-breadcrumb-actions");

if (nav)
nav.style.display = "none";
if (bc)
bc.style.display = "none";
if (bcu)
bcu.style.display = "none";

var links = $(browser.element().contentDocument).find("a[href]");
links.on("click", function (e)
{
ko.browse.openUrlInDefaultBrowser(e.target.href);
e.preventDefault();
e.stopPropagation();
return false;
});

browser.element().contentWindow.wrappedJSObject.open = (url) =>
{
if ( ! url)
return;

window.setTimeout(() =>
{
ko.browse.openUrlInDefaultBrowser(url);
}, 0);
};
});
}.bind(this));
}.bind(this));
Expand Down

0 comments on commit 51e8aaa

Please sign in to comment.