diff --git a/modules/ve-mw/ui/inspectors/ve.ui.MWLinkNodeInspector.js b/modules/ve-mw/ui/inspectors/ve.ui.MWLinkNodeInspector.js index 6dc2cb91e8..9ab8ffb063 100644 --- a/modules/ve-mw/ui/inspectors/ve.ui.MWLinkNodeInspector.js +++ b/modules/ve-mw/ui/inspectors/ve.ui.MWLinkNodeInspector.js @@ -34,11 +34,6 @@ ve.ui.MWLinkNodeInspector.static.title = OO.ui.deferMsg( 'visualeditor-linknodei ve.ui.MWLinkNodeInspector.static.modelClasses = [ ve.dm.MWNumberedExternalLinkNode ]; ve.ui.MWLinkNodeInspector.static.actions = ve.ui.MWLinkNodeInspector.super.static.actions.concat( [ - { - action: 'open', - label: OO.ui.deferMsg( 'visualeditor-linkinspector-open' ), - modes: [ 'edit', 'insert' ] - }, { action: 'convert', label: OO.ui.deferMsg( 'visualeditor-linknodeinspector-add-label' ), @@ -60,34 +55,10 @@ ve.ui.MWLinkNodeInspector.prototype.initialize = function () { validate: ve.init.platform.getExternalLinkUrlProtocolsRegExp() } ); - // Events - this.targetInput.connect( this, { change: 'onTargetInputChange' } ); - // Initialization this.form.$element.append( this.targetInput.$element ); }; -/** - * Handle target input change events. - * - * Updates the open button's hyperlink location. - * - * @param {string} value New target input value - */ -ve.ui.MWLinkNodeInspector.prototype.onTargetInputChange = function () { - var href = this.targetInput.getValue(), - inspector = this; - this.targetInput.isValid().done( function ( valid ) { - inspector.actions.forEach( { actions: 'open' }, function ( action ) { - action.setHref( href ).setTarget( '_blank' ).setDisabled( !valid ); - // HACK: Chrome renders a dark outline around the action when it's a link, but causing it to - // re-render makes it magically go away; this is incredibly evil and needs further - // investigation - action.$element.hide().fadeIn( 0 ); - } ); - } ); -}; - /** * @inheritdoc */