-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use ES2015 classes instead of having prototype-based functions #73
Conversation
Signed-off-by: Tomáš Taro <tomas@getadblock.com>
Signed-off-by: Tomáš Taro <tomas@getadblock.com>
Signed-off-by: Tomáš Taro <tomas@getadblock.com>
Signed-off-by: Tomáš Taro <tomas@getadblock.com>
Signed-off-by: Tomáš Taro <tomas@getadblock.com>
Signed-off-by: Tomáš Taro <tomas@getadblock.com>
Signed-off-by: Tomáš Taro <tomas@getadblock.com>
Signed-off-by: Tomáš Taro <tomas@getadblock.com>
Signed-off-by: Tomáš Taro <tomas@getadblock.com>
Signed-off-by: Tomáš Taro <tomas@getadblock.com>
Signed-off-by: Tomáš Taro <tomas@getadblock.com>
Signed-off-by: Tomáš Taro <tomas@getadblock.com>
Signed-off-by: Tomáš Taro <tomas@getadblock.com>
Signed-off-by: Tomáš Taro <tomas@getadblock.com>
Signed-off-by: Tomáš Taro <tomas@getadblock.com>
Signed-off-by: Tomáš Taro <tomas@getadblock.com>
…rectly by a resourceblock page Signed-off-by: Tomáš Taro <tomas@getadblock.com>
Signed-off-by: Tomáš Taro <tomas@getadblock.com>
Solution was to not execute scripts which have already been executed An algorithm, which shows tabs has also been refactored Empty constructors in filters.js file have been deleted catblock.js and catblock.css files have been moved Signed-off-by: Tomáš Taro <tomas@getadblock.com>
Signed-off-by: Tomáš Taro <tomas@getadblock.com>
…fari 6.x Signed-off-by: Tomáš Taro <tomas@getadblock.com>
…pport for already unsupported versions of Safari by Apple Signed-off-by: Tomáš Taro <tomas@getadblock.com>
Signed-off-by: Tomáš Taro <tomas@getadblock.com>
Signed-off-by: Tomáš Taro <tomas@getadblock.com>
Signed-off-by: Tomáš Taro <tomas@getadblock.com>
throw new Error("Implemented by subclass. Call callback with up-to-date listings."); | ||
} | ||
}; | ||
|
||
} | ||
|
||
// Channel containing hard coded cats loaded from disk. | ||
// Subclass of Channel. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Second comment not needed as it is now explicit in the code.
@@ -238,23 +239,26 @@ AprilFoolsCatsChannel.prototype = { | |||
L(109, 385, "tall6.jpg") | |||
]); | |||
} | |||
}; | |||
|
|||
} | |||
|
|||
|
|||
// Abstract base class for Flickr-based Channels. | |||
// Subclass of Channel. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also here as well
@@ -301,55 +305,51 @@ FlickrChannel.prototype = { | |||
} | |||
return result; | |||
} | |||
}; | |||
} | |||
|
|||
// Channel pulling from Flickr search results. | |||
// Subclass of FlickrChannel. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And again
var that = this; | ||
this._api("flickr.photos.search", { text: this._query }, function(resp) { | ||
callback(that._toListings(resp.photos)); | ||
}); | ||
} | ||
}; | ||
} | ||
|
||
// Channel pulling from a Flickr photoset. | ||
// Subclass of FlickrChannel. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll just let you find the rest. Do a git grep subclass
or something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kpeckett I've removed all those comments.
if (this._subscriptions[id].subscribed) { | ||
//if forceFetch, set the last update timestamp of the malware to zero, so it's updated now. | ||
if (forceFetch) { | ||
this._subscriptions.malware.last_update = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this completely removed? I can't tell where it's moved to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kpeckett Nope, it wasn't.
Signed-off-by: Tomáš Taro <tomas@getadblock.com>
Signed-off-by: Tomáš Taro <tomas@getadblock.com>
Signed-off-by: Tomáš Taro <tomas@getadblock.com>
This change will practically improve readability of the code.
An algorithm for showing tabs in Options has also been reworked, which as a result improves performance.
@kpeckett Could you please review the changes I've made? Thanks 😀