2015-08-04 11:25:00 +10:00
|
|
|
import PostModel from 'discourse/models/post';
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: 'extend-post-model',
|
|
|
|
|
initialize() {
|
|
|
|
|
PostModel.reopen({
|
2015-08-25 14:30:23 +10:00
|
|
|
postSpecificCountDFP: function() {
|
2015-08-04 14:52:58 +10:00
|
|
|
return this.get('post_number') === parseInt(Discourse.SiteSettings.dfp_nth_post_code);
|
2015-08-25 14:30:23 +10:00
|
|
|
}.property('post_number'),
|
|
|
|
|
|
|
|
|
|
postSpecificCountAdsense: function() {
|
2015-08-28 15:25:11 +10:00
|
|
|
return this.get('post_number') === parseInt(Discourse.SiteSettings.adsense_nth_post_code);
|
2015-08-28 12:21:40 +10:00
|
|
|
}.property('post_number'),
|
2015-08-04 11:25:00 +10:00
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
};
|