Permalink
Browse files

Display all posts added by Engrave fix

  • Loading branch information...
bgornicki committed Nov 25, 2018
1 parent 84661e1 commit 18df6bde552cf13cb1fab8dbf3a3991fb92ee75f
@@ -428,7 +428,8 @@ module.exports.removeWebsiteAdvertsElements = (body) => {
let b = a.replace(/(\*\*\*\*\*\*\*\*\*\*\*\n\nArtykuł autorstwa: @)(?:.*)(, dodany za pomocą serwisu )(?:.*)\(https:\/\/(?:.*)\)/g, "");
let c = b.replace(/(\n\*\*\*\n\n###\sOriginally posted on \[)(.*)(\)\.\sSteem blog powered by \[)(.*)(\)\.)/g, "");
let d = c.replace(/(\n\*\*\*\n\s###\sPierwotnie opublikowano na \[)(.*)(\)\.\sBlog na Steem napędzany przez \[)(.*)(\)\.)/g, "");
return d;
let e = d.replace(/(\n\*\*\*\n\n###\sOryginally posted on \[)(.*)(\)\.\sSteem blog powered by \[)(.*)(\)\.)/g, "");
return e;
}


@@ -670,12 +671,7 @@ function canPostBeDisplayed(post) {
}

if((post.beneficiaries.length && (post.beneficiaries[0].account == 'nicniezgrublem' || post.beneficiaries[0].account == 'engrave') )) {

let pattern_en = /(\n\*\*\*\n<center>\s###\sOriginally posted on \[)(.*)(\)\.\sSteem blog powered by \[)(.*)(\)\.\n\<\/center\>)/;
let pattern_pl = /(\n\*\*\*\n<center>\s###\sPierwotnie opublikowano na \[)(.*)(\)\.\sBlog na Steem napędzany przez \[)(.*)(\)\.\n\<\/center\>)/;

return pattern_en.test(post.body) || pattern_pl.test(post.body) ;

return true;
} else {
return false;
}
@@ -6,6 +6,5 @@ for i in $(find instances/ -maxdepth 1 ! -path instances/ -type d);
do
BLOG=$(echo $i | sed 's#instances/##'); # pm2 process is equal to directory name but without trailing dot and slash
echo $BLOG;
sudo cp -r blog/* $i/; # copy all files
sudo pm2 reload $BLOG # restart blog instance
done

This file was deleted.

Oops, something went wrong.

0 comments on commit 18df6bd

Please sign in to comment.