Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work in reader view (F9) #28

Open
badrazizi opened this issue Jan 13, 2022 · 0 comments
Open

Does not work in reader view (F9) #28

badrazizi opened this issue Jan 13, 2022 · 0 comments

Comments

@badrazizi
Copy link

Unable to make it inject script into reader view, though it does show counter as been injected

URL pattern

about\:reader\?url=.*

code

(function shortCutSetter() {
  var previous = document.getElementsByClassName('narrate-skip-previous');
  if (previous.length > 0) {
    if (previous[0].getAttribute('accesskey') == null) {
      previous[0].setAttribute('accesskey', 'z');
    }
  }
  
  var playStop = document.getElementsByClassName('narrate-start-stop');
  if (playStop.length > 0) {
    if (playStop[0].getAttribute('accesskey') == null) {
      playStop[0].setAttribute('accesskey', 'x');
    }
  }
  
  var next = document.getElementsByClassName('narrate-skip-next');
  if (next.length > 0) {
    if (next[0].getAttribute('accesskey') == null) {
      next[0].setAttribute('accesskey', 'c');
    }
  }
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant