| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
ve.ui.MWLinkInspectorTool = function VeUiMwLinkInspectorTool() { |
| 22 |
|
| 23 |
ve.ui.MWLinkInspectorTool.super.apply( this, arguments ); |
| 24 |
|
| 25 |
const educationPopup = new ve.ui.MWEducationPopupWidget( this.$link, { |
| 26 |
popupTitle: ve.msg( 'visualeditor-linkinspector-educationpopup-title' ), |
| 27 |
popupText: mw.message( 'visualeditor-linkinspector-educationpopup-text' ).parseDom(), |
| 28 |
popupImage: 'link', |
| 29 |
trackingName: 'link' |
| 30 |
} ); |
| 31 |
|
| 32 |
this.$link.after( educationPopup.$element ); |
| 33 |
}; |
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
OO.inheritClass( ve.ui.MWLinkInspectorTool, ve.ui.LinkInspectorTool ); |
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
ve.ui.MWLinkInspectorTool.static.modelClasses = [ |
| 42 |
...ve.ui.MWLinkInspectorTool.super.static.modelClasses, |
| 43 |
ve.dm.MWNumberedExternalLinkNode, |
| 44 |
ve.dm.MWMagicLinkNode |
| 45 |
]; |
| 46 |
|
| 47 |
ve.ui.MWLinkInspectorTool.static.associatedWindows = [ 'link', 'linkNode', 'linkMagicNode' ]; |
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
ve.ui.toolFactory.register( ve.ui.MWLinkInspectorTool ); |
| 52 |
|
| 53 |
ve.ui.commandRegistry.register( |
| 54 |
new ve.ui.Command( |
| 55 |
'link', 'link', 'open', { supportedSelections: [ 'linear' ] } |
| 56 |
) |
| 57 |
); |
| 58 |
|
| 59 |
ve.ui.sequenceRegistry.register( |
| 60 |
new ve.ui.Sequence( 'wikitextLink', 'linkNoExpand', '[[', 2 ) |
| 61 |
); |
| 62 |
|
| 63 |
ve.ui.commandHelpRegistry.register( 'textStyle', 'link', { sequences: [ 'wikitextLink' ] } ); |