- function SummaryPerspective(options) {
- var old_callback = options.callback || function() {};
-
- options.callback = function() {
- var self = this;
-
- // first time page is rendered
- $('#summary-cover-refresh').click(function() {
- self.refreshCover();
- });
-
- old_callback.call(this);
- }
-
- $.wiki.Perspective.call(this, options);
- };
-
- SummaryPerspective.prototype = new $.wiki.Perspective();
-
- SummaryPerspective.prototype.refreshCover = function() {
- $('#summary-cover-refresh').attr('disabled', 'disabled');
- this.doc.refreshCover({
- success: function(text) {
- $('#summary-cover').attr('src', text);
- $('#summary-cover-refresh').removeAttr('disabled');
- }
- });
- };
-
- SummaryPerspective.prototype.showCharCount = function() {
- var cc;
- try {
- cc = this.doc.getLength();
- $('#charcount_untagged').hide();
+ class SummaryPerspective extends $.wiki.Perspective {
+ constructor(options) {
+ super(options);
+ var self = this;
+
+ // first time page is rendered
+ $('#summary-cover-refresh').click(function() {
+ self.refreshCover();
+ });