r25150 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r25149‎ | r25150 | r25151 >
Date:03:31, 26 August 2007
Author:tlaqua
Status:old
Tags:
Comment:
Fixing rest of element existence checks.
Modified paths:
  • /trunk/extensions/ContributorsAddon/ContributorsAddon.js (modified) (history)

Diff [purge]

Index: trunk/extensions/ContributorsAddon/ContributorsAddon.js
@@ -24,8 +24,8 @@
2525 }
2626
2727 function showContributors() {
28 - var contributorsDiv = document.getElementById('contributorsDiv');
29 - if (contributorsDiv != null) {
 28+ if (document.getElementById('contributorsDiv')) {
 29+ var contributorsDiv = document.getElementById('contributorsDiv');
3030 contributorsDiv.className = 'contributorsDivShow pBody';
3131 var arrCoords = findPos(document.getElementById('t-contributors'));
3232 contributorsDiv.style.top = (arrCoords[1]-5) + 'px';
@@ -34,8 +34,8 @@
3535 }
3636
3737 function hideContributors() {
38 - var contributorsDiv = document.getElementById('contributorsDiv');
39 - if (contributorsDiv != null) {
 38+ if (document.getElementById('contributorsDiv')) {
 39+ var contributorsDiv = document.getElementById('contributorsDiv');
4040 contributorsDiv.className = 'contributorsDivHide';
4141 }
4242 }

Status & tagging log