diff --git a/src/brackets.js b/src/brackets.js index a9ac0bd01b7..f93a664bd4a 100644 --- a/src/brackets.js +++ b/src/brackets.js @@ -96,7 +96,8 @@ define(function (require, exports, module) { NodeConnection = require("utils/NodeConnection"), ExtensionUtils = require("utils/ExtensionUtils"), DragAndDrop = require("utils/DragAndDrop"), - ColorUtils = require("utils/ColorUtils"); + ColorUtils = require("utils/ColorUtils"), + NativeApp = require("utils/NativeApp"); // Load modules that self-register and just need to get included in the main project require("command/DefaultMenus"); @@ -148,7 +149,7 @@ define(function (require, exports, module) { LiveDevServerManager : require("LiveDevelopment/LiveDevServerManager"), DOMAgent : require("LiveDevelopment/Agents/DOMAgent"), Inspector : require("LiveDevelopment/Inspector/Inspector"), - NativeApp : require("utils/NativeApp"), + NativeApp : NativeApp, ExtensionLoader : ExtensionLoader, ExtensionUtils : ExtensionUtils, UpdateNotification : require("utils/UpdateNotification"), @@ -346,9 +347,13 @@ define(function (require, exports, module) { // navigate. Also, a capture handler is more reliable than bubble. window.document.body.addEventListener("click", function (e) { // Check parents too, in case link has inline formatting tags - var node = e.target; + var node = e.target, url; while (node) { if (node.tagName === "A") { + url = node.getAttribute("href"); + if (url && !url.match(/^#/)) { + NativeApp.openURLInDefaultBrowser(url); + } e.preventDefault(); break; } diff --git a/src/extensibility/ExtensionManagerView.js b/src/extensibility/ExtensionManagerView.js index 5641c143227..a0c000d6902 100644 --- a/src/extensibility/ExtensionManagerView.js +++ b/src/extensibility/ExtensionManagerView.js @@ -155,9 +155,6 @@ define(function (require, exports, module) { ExtensionManager.markForRemoval($target.attr("data-extension-id"), true); } else if ($target.hasClass("undo-update")) { ExtensionManager.removeUpdate($target.attr("data-extension-id")); - } else { - // Open any other link in the external browser. - NativeApp.openURLInDefaultBrowser($target.attr("href")); } }) .on("click", "button.install", function (e) { diff --git a/src/extensions/default/WebPlatformDocs/InlineDocsViewer.js b/src/extensions/default/WebPlatformDocs/InlineDocsViewer.js index 32dc6c2d0ca..68b4bea39f3 100644 --- a/src/extensions/default/WebPlatformDocs/InlineDocsViewer.js +++ b/src/extensions/default/WebPlatformDocs/InlineDocsViewer.js @@ -81,10 +81,8 @@ define(function (require, exports, module) { }); this._sizeEditorToContent = this._sizeEditorToContent.bind(this); - this._handleLinkClick = this._handleLinkClick.bind(this); this._handleWheelScroll = this._handleWheelScroll.bind(this); - this.$wrapperDiv.on("click", "a", this._handleLinkClick); this.$wrapperDiv.find(".scroller").on("mousewheel", this._handleWheelScroll); } @@ -95,15 +93,6 @@ define(function (require, exports, module) { InlineDocsViewer.prototype.$wrapperDiv = null; - /** Clicking any link should open it in browser, not in Brackets shell */ - InlineDocsViewer.prototype._handleLinkClick = function (event) { - var url = $(event.currentTarget).attr("href"); - if (url) { - NativeApp.openURLInDefaultBrowser(url); - } - }; - - /** Don't allow scrollwheel/trackpad to bubble up to host editor - makes scrolling docs painful */ InlineDocsViewer.prototype._handleWheelScroll = function (event) { var scrollingUp = (event.originalEvent.wheelDeltaY > 0), diff --git a/src/help/HelpCommandHandlers.js b/src/help/HelpCommandHandlers.js index 3f62a3e1a0a..700642467a3 100644 --- a/src/help/HelpCommandHandlers.js +++ b/src/help/HelpCommandHandlers.js @@ -105,17 +105,6 @@ define(function (require, exports, module) { $(this).trigger("load"); } }); - - // Create a link for each contributor image to their github account - $contributors.on("click", "img", function (e) { - var url = $(e.target).data("url"); - if (url) { - // Make sure the URL has a domain that we know about - if (/(^|\.)github\.com$/i.test(PathUtils.parseUrl(url).hostname)) { - NativeApp.openURLInDefaultBrowser(url); - } - } - }); }).fail(function () { $spinner.removeClass("spin"); $contributors.html(Mustache.render("

{{ABOUT_TEXT_LINE6}}

", Strings)); diff --git a/src/htmlContent/contributors-list.html b/src/htmlContent/contributors-list.html index 07a594e746a..ae5d1eb7ab0 100644 --- a/src/htmlContent/contributors-list.html +++ b/src/htmlContent/contributors-list.html @@ -1,5 +1,5 @@ {{#.}} - + {{login}} {{/.}} \ No newline at end of file diff --git a/src/htmlContent/update-list.html b/src/htmlContent/update-list.html index e8450118deb..b986ac33838 100644 --- a/src/htmlContent/update-list.html +++ b/src/htmlContent/update-list.html @@ -1,6 +1,6 @@ {{#.}}
-

{{versionString}} - {{dateString}} ({{Strings.RELEASE_NOTES}})

+

{{versionString}} - {{dateString}} ({{Strings.RELEASE_NOTES}})