UltrasonicNXT has submitted this change and it was merged.
Change subject: Setting it so any links in chat-topic open in new tab
......................................................................
Setting it so any links in chat-topic open in new tab
Using jQuery .attr() to set target="_blank" on any links in MediaWikiChat's
chat topic. A similar code had been manually added in enbricki's Common.js,
however this patch should be available for any MediaWikiChat users without the
need for an addition to Common.js.
Change-Id: Ic577aaa9d489a55b14d197c229a2e05f5d483e52
---
M MediaWikiChat.js
1 file changed, 3 insertions(+), 0 deletions(-)
Approvals:
UltrasonicNXT: Verified; Looks good to me, approved
diff --git a/MediaWikiChat.js b/MediaWikiChat.js
index 3ae7f10..2a111b8 100644
--- a/MediaWikiChat.js
+++ b/MediaWikiChat.js
@@ -675,6 +675,9 @@
$( '#mwchat-users' ).animate( { 'height': height }, 'fast' );
$( '#mwchat-me' ).animate( { 'top': height }, 'fast' );
} );
+
+ // Open any link in chat-topic in a new tab
+ $( '#mwchat-topic a').attr( 'target', '_blank');
} );
$( window ).blur( function() {
--
To view, visit https://gerrit.wikimedia.org/r/129619
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic577aaa9d489a55b14d197c229a2e05f5d483e52
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MediaWikiChat
Gerrit-Branch: master
Gerrit-Owner: GeorgeBarnick <[email protected]>
Gerrit-Reviewer: UltrasonicNXT <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits