Skip to content
This repository was archived by the owner on Jan 22, 2026. It is now read-only.

Commit ed8d02f

Browse files
author
Bill Heaton
committed
Disable comments, social media seems to work fine for now
1 parent 0153cb5 commit ed8d02f

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

app/views/post.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
import Ember from 'ember';
2+
import config from '../config/environment';
23

34
export default Ember.View.extend({
45
didInsertElement: function () {
5-
var notTesting = !Ember.testing;
6-
var notCrawler = window.location.search.match(/_escaped_fragment_/) === null;
7-
var notPrerender = window.navigator.userAgent.match(/Prerender/) === null;
8-
var notLocal = window.location.hostname.match(/localhost/) === null;
9-
if (notTesting && notCrawler && notPrerender && notLocal) {
6+
if (config.APP.COMMENTS_ENABLED) {
107
this.configureDisqus();
118
this.setupDisqus();
129
}

config/environment.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ module.exports = function(environment) {
2020
API_HOST: '',
2121
API_PATH: 'api/v1',
2222
API_AUTH: 'api/auth',
23+
COMMENTS_ENABLED: false,
2324
GOOGLE_ANALYTICS: null
2425
},
2526
contentSecurityPolicy: {

0 commit comments

Comments
 (0)