summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@gmail.com>2019-10-30 13:37:56 -0400
committerPliable Pixels <pliablepixels@gmail.com>2019-10-30 13:37:56 -0400
commit4ffc9dc9963f24dfed6c6a13b7c10a8fef17c7c8 (patch)
treefb0fcf238631454bebee2d92cd40d29b4edd0332 /www
parent920301a1d601b9d3512c1f58031a8b79ee48c4a5 (diff)
take our news feed - medium 403s these days
Diffstat (limited to 'www')
-rw-r--r--www/js/NewsCtrl.js3
-rwxr-xr-xwww/js/app.js55
-rw-r--r--www/templates/menu.html2
3 files changed, 6 insertions, 54 deletions
diff --git a/www/js/NewsCtrl.js b/www/js/NewsCtrl.js
index 1e84e535..86916c2e 100644
--- a/www/js/NewsCtrl.js
+++ b/www/js/NewsCtrl.js
@@ -104,6 +104,7 @@ angular.module('zmApp.controllers').controller('zmApp.NewsCtrl', ['$scope', '$ro
$scope.newsItems = [];
+ /*
$http.get(zm.blogUrl, {
responseType: 'text',
@@ -124,6 +125,6 @@ angular.module('zmApp.controllers').controller('zmApp.NewsCtrl', ['$scope', '$ro
});
}
- });
+ }); */
}]);
diff --git a/www/js/app.js b/www/js/app.js
index 1473cd9b..d01006d0 100755
--- a/www/js/app.js
+++ b/www/js/app.js
@@ -805,57 +805,7 @@ angular.module('zmApp', [
//console.log ("UPDATE " + zmVersion);
});
- NVR.log("Checking for news updates");
- $http.get(zm.blogUrl, {
- responseType: 'text',
- transformResponse: undefined
- })
-
- .then(function (datastr) {
- // again, for cordova-http
-
- datastr = datastr.data;
- var trunc = "])}while(1);</x>";
- datastr = datastr.substr(trunc.length);
-
- var data = JSON.parse(datastr);
- $rootScope.newBlogPost = "";
- if (data.payload.posts.length <= 0) {
- $rootScope.newBlogPost = "";
- return;
- }
-
- var lastDate = NVR.getLatestBlogPostChecked();
- //console.log ("************ BLOG LAST DATE " + lastDate);
- if (!lastDate) {
-
- $rootScope.newBlogPost = "(" + $translate.instant('kNewPost') + ")";
- NVR.setLatestBlogPostChecked(moment().format("YYYY-MM-DD HH:mm:ss"));
- return;
-
- }
- var mLastDate = moment(lastDate);
- var mItemDate = moment(data.payload.posts[0].createdAt);
-
- if (mItemDate.diff(mLastDate, 'seconds') > 0) {
- /*console.log ("DIFF IS "+mItemDate.diff(mLastDate, 'seconds'));
- console.log ("DIFF mLastDate="+mLastDate);
- console.log ("DIFF mItemDate="+mItemDate);
- console.log ("FORMAT DIFF mLastDate="+mLastDate.format("YYYY-MM-DD HH:mm:ss") );
- console.log ("FORMAT DIFF mItemDate="+mItemDate.format("YYYY-MM-DD HH:mm:ss") );*/
-
- NVR.debug("New post dated " + mItemDate.format("YYYY-MM-DD HH:mm:ss") + " found, last date checked was " + mLastDate.format("YYYY-MM-DD HH:mm:ss"));
-
- $rootScope.newBlogPost = "(" + $translate.instant('kNewPost') + ")";
- NVR.setLatestBlogPostChecked(mItemDate.format("YYYY-MM-DD HH:mm:ss"));
-
-
-
- } else {
- NVR.debug("Latest post dated " + mItemDate.format("YYYY-MM-DD HH:mm:ss") + " but you read " + lastDate);
- }
-
- });
+
}
}
@@ -2350,7 +2300,7 @@ angular.module('zmApp', [
})
-
+/*
.state('app.news', {
data: {
requireLogin: false
@@ -2361,6 +2311,7 @@ angular.module('zmApp', [
controller: 'zmApp.NewsCtrl',
})
+ */
.state('app.monitors', {
data: {
diff --git a/www/templates/menu.html b/www/templates/menu.html
index 1a630b98..f621424c 100644
--- a/www/templates/menu.html
+++ b/www/templates/menu.html
@@ -126,7 +126,7 @@
- <div ng-if="$root.showBlog">
+ <div ng-if="$root.showBlog && 0">
<!--<ion-item nav-clear menu-close ng-click="navigateView('app.news')" >-->
<ion-item nav-clear menu-close href="#/app/news">
<span class=" item-icon-left">