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

Change subject: (bug 44978) loop over authors instead of setting same url
......................................................................


(bug 44978) loop over authors instead of setting same url

Instead of setting all author links to the same url,
loop over all links and fix each url.

Bug: 44978
Change-Id: I7da8899c9bf757179e21adca774b8f648a9b21da
---
M resources/mw.MediaWikiPlayerSupport.js
1 file changed, 6 insertions(+), 5 deletions(-)

Approvals:
  Aaron Schulz: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/resources/mw.MediaWikiPlayerSupport.js 
b/resources/mw.MediaWikiPlayerSupport.js
index 3b41139..c901462 100644
--- a/resources/mw.MediaWikiPlayerSupport.js
+++ b/resources/mw.MediaWikiPlayerSupport.js
@@ -144,11 +144,12 @@
                                // Update link to be absolute per page url 
context:
                                var $links = $authorText.find('a');
                                if( $links.length ) {
-                                       var authUrl = 
$authorText.find('a').attr('href');
-                                       authUrl = mw.absoluteUrl( authUrl,  
articleUrl );
-                                       $authorText.find('a').attr('href',
-                                               authUrl
-                                       )
+                                       $links.each(function(i, authorLink) {
+                                               var $authorLink = $(authorLink);
+                                               var authUrl = 
$authorLink.attr('href');
+                                               authUrl = mw.absoluteUrl( 
authUrl,  articleUrl );
+                                               $authorLink.attr('href', 
authUrl);
+                                       });
                                }
                                $creditLine.append( $( '<br />' ),
                                        mw.msg('mwe-embedplayer-credit-author', 
$authorText.html() )

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7da8899c9bf757179e21adca774b8f648a9b21da
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: master
Gerrit-Owner: J <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Mdale <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to