hidden.js 889 B

12345678910111213141516171819202122232425262728293031323334
  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. app.views.HiddenPage = class HiddenPage extends app.View {
  10. static initClass() {
  11. this.events = { click: "onClick" };
  12. }
  13. constructor(el, entry) {
  14. this.onClick = this.onClick.bind(this);
  15. this.el = el;
  16. this.entry = entry;
  17. super(...arguments);
  18. }
  19. init() {
  20. this.addSubview((this.notice = new app.views.Notice("disabledDoc")));
  21. this.activate();
  22. }
  23. onClick(event) {
  24. let link;
  25. if ((link = $.closestLink(event.target, this.el))) {
  26. $.stopEvent(event);
  27. $.popup(link);
  28. }
  29. }
  30. };
  31. app.views.HiddenPage.initClass();