Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
//<pre>

function NBAabbreves()
{
  var f = document.editform, t = f.wpTextbox1;
  t.value = t.value.split('BOS').join('[[Boston Celtics]]');
  t.value = t.value.split('NJN').join('[[New Jersey Nets]]');
  t.value = t.value.split('NYK').join('[[New York Knicks]]');
  t.value = t.value.split('PHI').join('[[Philadelphia 76ers]]');
  t.value = t.value.split('TOR').join('[[Toronto Raptors]]');
  t.value = t.value.split('CHI').join('[[Chicago Bulls]]');
  t.value = t.value.split('CLE').join('[[Cleveland Cavaliers]]');
  t.value = t.value.split('DET').join('[[Detroit Pistons]]');
  t.value = t.value.split('IND').join('[[Indiana Pacers]]');
  t.value = t.value.split('MIL').join('[[Milwaukee Bucks]]');
  t.value = t.value.split('ATL').join('[[Atlanta Hawks]]');
  t.value = t.value.split('CHA').join('[[Charlotte Bobcats]]');
  t.value = t.value.split('MIA').join('[[Miami Heat]]');
  t.value = t.value.split('ORL').join('[[Orlando Magic]]');
  t.value = t.value.split('WAS').join('[[Washington Wizards]]');
  t.value = t.value.split('DAL').join('[[Dallas Mavericks]]');
  t.value = t.value.split('HOU').join('[[Houston Rockets]]');
  t.value = t.value.split('MEM').join('[[Memphis Grizzlies]]');
  t.value = t.value.split('NOH').join('[[New Orleans Hornets]]');
  t.value = t.value.split('SAN').join('[[San Antonio Spurs]]');
  t.value = t.value.split('GSW').join('[[Golden State Warriors]]');
  t.value = t.value.split('LAC').join('[[Los Angeles Clippers]]');
  t.value = t.value.split('LAL').join('[[Los Angeles Lakers]]');
  t.value = t.value.split('PHX').join('[[Phoenix Suns]]');
  t.value = t.value.split('SAC').join('[[Sacramento Kings]]');
  t.value = t.value.split('DEN').join('[[Denver Nuggets]]');
  t.value = t.value.split('MIN').join('[[Minnesota Timberwolves]]');
  t.value = t.value.split('POR').join('[[Portland Trailblazers]]');
  t.value = t.value.split('SEA').join('[[Seattle SuperSonics]]');
  t.value = t.value.split('UTA').join('[[Utah Jazz]]');
  f.wpSummary.value = "Changed team abbreviations to full names";
}

function NBAtab()
{
  // Only add for pages with the right string somewhere in the title
  if (document.title.indexOf("Editing ") != -1)
    {
      mw.util.addPortletLink('p-cactions', 'javascript:NBAabbreves()', "NBA fixes");
    }
}

$(NBAtab);

// </pre>