Browser extension that demonstrates the Web Annotation Discovery mechanism: subscribe to people’s annotation collections/‘feeds’, to see their notes on the web; and create & publish annotations yourself.

web-annotation-discovery-we.../src/popup/ Popup.tsx
34 lines
883 B

  1. import { Component, h, Fragment } from 'preact';
  2. import { AnnotationSourcesList } from '../components/AnnotationSourcesList';
  3. import { AnnotationStoreSelector } from './AnnotationStoreSelector';
  4. import classes from './Popup.module.scss';
  5. interface PopupProps {}
  6. interface PopupState {}
  7. export class Popup extends Component<PopupProps, PopupState> {
  8. state: PopupState = {};
  9. render({}: PopupProps, {}: PopupState) {
  10. return (
  11. <>
  12. <h1>Web Annotator</h1>
  13. <h2>Creating annotations</h2>
  14. <AnnotationStoreSelector />
  15. <h2>Your annotation library:</h2>
  16. <AnnotationSourcesList withAnnotations={false} />
  17. <br />
  18. <a
  19. class={classes.button}
  20. href={browser.runtime.getURL('overview/index.html')}
  21. target="_blank"
  22. >
  23. Show all stored annotations.
  24. </a>
  25. </>
  26. );
  27. }
  28. }