MediaWiki talk:Wikimediaplayer.js

In today's world, MediaWiki talk:Wikimediaplayer.js is a topic that has captured everyone's attention, whether due to its historical relevance, its impact on modern society or its influence on the development of technology. For centuries, MediaWiki talk:Wikimediaplayer.js has been the subject of study, debate and controversy, and its importance continues to increase. In this article, we will explore the various facets of MediaWiki talk:Wikimediaplayer.js, from its origins to its influence today, considering its impact on different areas of daily life. We will also examine the opinions and perspectives of experts in the field, with the goal of offering a broad and comprehensive overview of this fascinating topic.

{{editprotected}} Hi there. An issue was identified at Wikipedia:Village Pump (technical)#Prose size script that I believe is caused by a combination of bad behavior in Internet Explorer and this module. In short, the use of a for/in loop with HTMLCollection objects returned from getElementsByTagName("a") has incorrect behavior if there are any named anchors in the page whose name attribute starts with a number (as is the case when section names start with a number). If this is the case, any attempt to use bracket syntax to select the node from the collection will interpret the first part of the name attribute as a number and fail if that numeric index does not exist.

One fix is to use a traditional for loop to fix this. The requested changes is to change the two instances of this code (lines 95 and 125):

for( var key in links )

To be this code:

for( var key = 0; key < links.length; key++ )

This will cause all browsers to use only numeric indexes that are in range and fix problems people are seeing in Internet Explorer. The problems with this script seem to be preventing all user JavaScript from loading on affected pages. Mike Dillon 15:49, 23 May 2007 (UTC)

Done. Cheers. --MZMcBride 19:25, 23 May 2007 (UTC)
Thanks. The users reporting the problem have confirmed that this change fixed it. Mike Dillon 03:03, 27 May 2007 (UTC)