Skip to content

Conversation

@idow09
Copy link
Contributor

@idow09 idow09 commented Jul 28, 2020

Added the requested support. Some notes:

  • Semantic Scholar takes its time when retrieving the results (there is a loading animation but the page is considered idle) so I needed a hook for delaying the script execution. I used a MutationObserver on document.body that waits until the results' nodes are added.
  • The observer should disconnect() but I can't figure how to self-inform that the execution is done and it's no longer needed.
  • The script should match only "https://www.semanticscholar.org/search*" but for some reason when redirected to the results' page from the home page the script isn't executed. A refresh solves it as it recognizes an explicit loading of a matched page but that's of course not good enough. So currently "https://www.semanticscholar.org/*" is used but it's inefficient because the observer is registered in the home page for no reason.
  • The icon is embedded into the code as an SVG HTML element. I guess it's OK...
  • Fixes Support Semantic Scholar #4

@eladrich
Copy link
Owner

Looks great! We should probably also support paper pages, as in Arxiv, and not only search pages.

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

Successfully merging this pull request may close these issues.

Support Semantic Scholar

2 participants