jenkins-bot has submitted this change and it was merged.

Change subject: Linker: Do not show the tool for headings
......................................................................


Linker: Do not show the tool for headings

Bug: T126312
Change-Id: I275dab84d42ccce9dce45088cbbc183865f28133
---
M modules/tools/ext.cx.tools.link.js
1 file changed, 7 insertions(+), 0 deletions(-)

Approvals:
  Nikerabbit: Checked; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/tools/ext.cx.tools.link.js 
b/modules/tools/ext.cx.tools.link.js
index 83234d6..d9dee6f 100644
--- a/modules/tools/ext.cx.tools.link.js
+++ b/modules/tools/ext.cx.tools.link.js
@@ -1204,6 +1204,13 @@
                } else if ( selection.jquery && selection.is( 'a' ) ) {
                        this.$link = selection;
                }
+
+               // Do not show the tool for headings.
+               if ( this.getParentSection().is( 'h1, h2, h3, h4, h5, h6' ) ) {
+                       this.stop();
+                       return;
+               }
+
                this.show();
                this.listen();
        };

-- 
To view, visit https://gerrit.wikimedia.org/r/269382
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I275dab84d42ccce9dce45088cbbc183865f28133
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh <santhosh.thottin...@gmail.com>
Gerrit-Reviewer: Nikerabbit <niklas.laxst...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to