hidden.js 783 B

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