let el: HTMLStyleElement | null = null;

export function toggle(on: boolean): void {
  if (on) {
    if (document.getElementById('accessmate-links')) return;
    el = document.createElement('style');
    el.id = 'accessmate-links';
    el.textContent =
      'a{outline:2px solid currentColor!important;' +
      'text-decoration:underline!important;' +
      'text-underline-offset:3px!important}';
    document.head.appendChild(el);
  } else {
    el?.remove();
    el = null;
  }
}
