From 9bf49af2b31c286c089b3efb5fff6f66a2d93390 Mon Sep 17 00:00:00 2001 From: maxgithubprofile <21055122+maxgithubprofile@users.noreply.github.com> Date: Mon, 9 Sep 2024 15:47:11 +0300 Subject: [PATCH] patch: electron monetization, removed comments (#1292) * v * Update satolist.js * v --- js/lib/client/sdk.js | 53 +++++++++++++++++++++++++++--------------- package.json | 4 ++-- tpls/index_el.html.tpl | 3 +++ 3 files changed, 39 insertions(+), 21 deletions(-) diff --git a/js/lib/client/sdk.js b/js/lib/client/sdk.js index ac52f6d3e..46ef9945e 100644 --- a/js/lib/client/sdk.js +++ b/js/lib/client/sdk.js @@ -1204,36 +1204,51 @@ var pSDK = function ({ app, api, actions }) { return _.filter(_.map(rawcomments, (c) => { + //if(c.deleted) return - if(!c.msgparsed && !c.msg) return null + /*if(!c.msgparsed && !c.msg) { + if(!c.deleted){ + return null + } + + }*/ - try { + if(c.msgparsed || c.msg) { - c.msgparsed = c.msgparsed || JSON.parse(c.msg) + try { - if(_.isObject(c.msgparsed)){ - c.msgparsed.url = clearStringXss(trydecode(c.msgparsed.url || "")); + c.msgparsed = c.msgparsed || JSON.parse(c.msg) - c.msgparsed.message = clearStringXss(trydecode(c.msgparsed.message || "")).replace(/\n{2,}/g, '\n\n') - - c.msgparsed.images = _.filter(_.map(c.msgparsed.images || [], function (i) { - - return checkIfAllowedImageApply(clearStringXss(trydecode(i))) - }), function(i){return i}); - } + if(_.isObject(c.msgparsed)){ + c.msgparsed.url = clearStringXss(trydecode(c.msgparsed.url || "")); - else{ + c.msgparsed.message = clearStringXss(trydecode(c.msgparsed.message || "")).replace(/\n{2,}/g, '\n\n') + + c.msgparsed.images = _.filter(_.map(c.msgparsed.images || [], function (i) { + + return checkIfAllowedImageApply(clearStringXss(trydecode(i))) + }), function(i){return i}); + } + + else{ + return null + } + + + + } + catch (e) { + console.error(e) + console.log(c) return null } - - } - catch (e) { - console.error(e) - console.log(c) - return null + else{ + if(!c.deleted){ + return null + } } diff --git a/package.json b/package.json index 62e202741..1a1651271 100644 --- a/package.json +++ b/package.json @@ -4,9 +4,9 @@ "version": "0.8.99", - "versionsuffix": "3", + "versionsuffix": "5", "cordovaversion": "1.8.99", - "cordovaversioncode": "180993", + "cordovaversioncode": "180995", "description": "Bastyon desktop application", "author": "Pocketnet Community ", diff --git a/tpls/index_el.html.tpl b/tpls/index_el.html.tpl index 6ffc164bd..907aab02f 100644 --- a/tpls/index_el.html.tpl +++ b/tpls/index_el.html.tpl @@ -201,6 +201,9 @@ + + +