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 NHLabbreves()
{
  var f = document.editform, t = f.wpTextbox1;
  t.value = t.value.split('EDM').join('[[Edmonton Oilers]]');
  t.value = t.value.split('ATL').join('[[Atlanta Thrashers]]');
  t.value = t.value.split('ANA').join('[[Anaheim Ducks]]');
  t.value = t.value.split('NJD').join('[[New Jersey Devils]]');
  t.value = t.value.split('NYR').join('[[New York Rangers]]');
  t.value = t.value.split('PIT').join('[[Pittsburgh Penguins]]');
  t.value = t.value.split('COL').join('[[Colorado Avalanche]]');
  t.value = t.value.split('SJS').join('[[San Jose Sharks]]');
  t.value = t.value.split('VAN').join('[[Vancouver Canucks]]');
  t.value = t.value.split('BOS').join('[[Boston Bruins]]');
  t.value = t.value.split('DET').join('[[Detroit Red Wings]]');
  t.value = t.value.split('DAL').join('[[Dallas Stars]]');
  t.value = t.value.split('LAK').join('[[Los Angeles Kings]]');
  t.value = t.value.split('PHX').join('[[Phoenix Coyotes]]');
  t.value = t.value.split('CHI').join('[[Chicago Blackhawks]]');
  t.value = t.value.split('NYI').join('[[New York Islanders]]');
  t.value = t.value.split('FLA').join('[[Florida Panthers]]');
  t.value = t.value.split('MTL').join('[[Montreal Canadiens]]');
  t.value = t.value.split('WSH').join('[[Washington Capitals]]');
  t.value = t.value.split('BUF').join('[[Buffalo Sabres]]');
  t.value = t.value.split('CBJ').join('[[Columbus Blue Jackets]]');
  t.value = t.value.split('OTT').join('[[Ottawa Senators]]');
  t.value = t.value.split('PHI').join('[[Philadelphia Flyers]]');
  t.value = t.value.split('TOR').join('[[Toronto Maple Leafs]]');
  t.value = t.value.split('CGY').join('[[Calgary Flames]]');
  t.value = t.value.split('STL').join('[[St. Louis Blues]]');
  t.value = t.value.split('NSH').join('[[Nashville Predators]]');
  t.value = t.value.split('MIN').join('[[Minnesota Wild]]');
  t.value = t.value.split('CAR').join('[[Carolina Hurricanes]]');
  t.value = t.value.split('TBL').join('[[Tampa Bay Lightning]]');
  f.wpSummary.value = "Changed team abbreviations to full names";
}

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

$(NHLtab);

// </pre>