Array.prototype.forEach.call(
  document.querySelectorAll('[href^="/sw/Timesheet/TimesheetVie*!*w*/!*"]'),
  function(element){
    element.setAttribute('href',
      element.getAttribute('href').replace('Vie*!*w*/!*', 'Edit')
    );
  }
);
Вы в первом посте от руки писали? Зачем 0_о?