hidden.js 870 B

123456789101112131415161718192021222324252627282930
  1. // TODO: This file was created by bulk-decaffeinate.
  2. // Sanity-check the conversion and remove this comment.
  3. /*
  4. * decaffeinate suggestions:
  5. * DS002: Fix invalid constructor
  6. * DS206: Consider reworking classes to avoid initClass
  7. * Full docs: https://github.com/decaffeinate/decaffeinate/blob/main/docs/suggestions.md
  8. */
  9. const Cls = (app.views.HiddenPage = class HiddenPage extends app.View {
  10. static initClass() {
  11. this.events =
  12. {click: 'onClick'};
  13. }
  14. constructor(el, entry) { this.onClick = this.onClick.bind(this); this.el = el; this.entry = entry; super(...arguments); }
  15. init() {
  16. this.addSubview(this.notice = new app.views.Notice('disabledDoc'));
  17. this.activate();
  18. }
  19. onClick(event) {
  20. let link;
  21. if (link = $.closestLink(event.target, this.el)) {
  22. $.stopEvent(event);
  23. $.popup(link);
  24. }
  25. }
  26. });
  27. Cls.initClass();