@ecency/render-helper 2.5.8 → 2.5.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/node/index.cjs
CHANGED
|
@@ -756,7 +756,7 @@ function a(el, forApp, parentDomain = "ecency.com", seoContext, renderOptions) {
|
|
|
756
756
|
el.setAttribute("data-author", author);
|
|
757
757
|
el.setAttribute("data-permlink", permlink);
|
|
758
758
|
} else {
|
|
759
|
-
const h =
|
|
759
|
+
const h = `/@${author}/${permlink}`;
|
|
760
760
|
el.setAttribute("href", h);
|
|
761
761
|
el.setAttribute("data-is-inline", "" + isInline);
|
|
762
762
|
}
|
|
@@ -835,7 +835,7 @@ function a(el, forApp, parentDomain = "ecency.com", seoContext, renderOptions) {
|
|
|
835
835
|
el.setAttribute("data-author", author);
|
|
836
836
|
el.setAttribute("data-permlink", permlink);
|
|
837
837
|
} else {
|
|
838
|
-
const h =
|
|
838
|
+
const h = `/@${author}/${permlink}`;
|
|
839
839
|
el.setAttribute("href", h);
|
|
840
840
|
el.setAttribute("data-is-inline", "" + isInline);
|
|
841
841
|
}
|
|
@@ -900,7 +900,7 @@ function a(el, forApp, parentDomain = "ecency.com", seoContext, renderOptions) {
|
|
|
900
900
|
el.setAttribute("data-author", author);
|
|
901
901
|
el.setAttribute("data-permlink", permlink);
|
|
902
902
|
} else {
|
|
903
|
-
const h =
|
|
903
|
+
const h = `/@${author}/${permlink}`;
|
|
904
904
|
el.setAttribute("href", h);
|
|
905
905
|
el.setAttribute("data-is-inline", "" + isInline);
|
|
906
906
|
}
|
|
@@ -986,7 +986,7 @@ function a(el, forApp, parentDomain = "ecency.com", seoContext, renderOptions) {
|
|
|
986
986
|
el.setAttribute("data-author", author);
|
|
987
987
|
el.setAttribute("data-permlink", permlink);
|
|
988
988
|
} else {
|
|
989
|
-
const h =
|
|
989
|
+
const h = `/@${author}/${permlink}`;
|
|
990
990
|
el.setAttribute("href", h);
|
|
991
991
|
el.setAttribute("data-is-inline", "" + isInline);
|
|
992
992
|
}
|
|
@@ -1530,7 +1530,7 @@ function linkify(content, forApp, renderOptions) {
|
|
|
1530
1530
|
const attrs = forApp ? `href="https://ecency.com/@${authorLower}/${permlink}"` : `href="/@${authorLower}/${permlink}"`;
|
|
1531
1531
|
return `${preceding}<a class="markdown-profile-link" ${attrs}>@${authorLower}/${permlink}</a>`;
|
|
1532
1532
|
} else {
|
|
1533
|
-
const attrs = forApp ? `data-author="${authorLower}" data-tag="${tag}" data-permlink="${permlink}"` : `href="
|
|
1533
|
+
const attrs = forApp ? `data-author="${authorLower}" data-tag="${tag}" data-permlink="${permlink}"` : `href="/@${authorLower}/${permlink}"`;
|
|
1534
1534
|
return `${preceding}<a class="markdown-post-link" ${attrs}>@${authorLower}/${permlink}</a>`;
|
|
1535
1535
|
}
|
|
1536
1536
|
}
|
|
@@ -1545,7 +1545,7 @@ function linkify(content, forApp, renderOptions) {
|
|
|
1545
1545
|
const attrs = forApp ? `href="https://ecency.com/@${uu}/${permlink}"` : `href="/@${uu}/${permlink}"`;
|
|
1546
1546
|
return ` <a class="markdown-profile-link" ${attrs}>@${uu}/${permlink}</a>`;
|
|
1547
1547
|
} else {
|
|
1548
|
-
const attrs = forApp ? `data-author="${uu}" data-tag="post" data-permlink="${permlink}"` : `href="
|
|
1548
|
+
const attrs = forApp ? `data-author="${uu}" data-tag="post" data-permlink="${permlink}"` : `href="/@${uu}/${permlink}"`;
|
|
1549
1549
|
return ` <a class="markdown-post-link" ${attrs}>@${uu}/${permlink}</a>`;
|
|
1550
1550
|
}
|
|
1551
1551
|
}
|
|
@@ -1640,7 +1640,7 @@ function text(node, forApp, renderOptions) {
|
|
|
1640
1640
|
if (!tag || !/^[a-z0-9_-]+$/i.test(tag)) return;
|
|
1641
1641
|
if (!isValidUsername(author)) return;
|
|
1642
1642
|
if (!isValidPermlink(permlink)) return;
|
|
1643
|
-
const attrs = forApp ? `data-tag="${tag}" data-author="${author}" data-permlink="${permlink}" class="markdown-post-link"` : `class="markdown-post-link" href="
|
|
1643
|
+
const attrs = forApp ? `data-tag="${tag}" data-author="${author}" data-permlink="${permlink}" class="markdown-post-link"` : `class="markdown-post-link" href="/@${author}/${permlink}"`;
|
|
1644
1644
|
const doc = DOMParser.parseFromString(
|
|
1645
1645
|
`<a ${attrs}>/@${author}/${permlink}</a>`,
|
|
1646
1646
|
"text/html"
|
|
@@ -1691,7 +1691,7 @@ function traverse(node, forApp, depth = 0, state = { firstImageFound: false }, p
|
|
|
1691
1691
|
|
|
1692
1692
|
// src/methods/clean-reply.method.ts
|
|
1693
1693
|
function cleanReply(s) {
|
|
1694
|
-
return (s ? s.split("\n").filter((item) => item.toLowerCase().includes("posted using [partiko") === false).filter((item) => item.toLowerCase().includes("posted using [dapplr") === false).filter((item) => item.toLowerCase().includes("posted using [leofinance") === false).filter((item) => item.toLowerCase().includes("posted via [neoxian") === false).filter((item) => item.toLowerCase().includes("posted using [neoxian") === false).filter((item) => item.toLowerCase().includes("posted with [stemgeeks") === false).filter((item) => item.toLowerCase().includes("posted using [bilpcoin") === false).filter((item) => item.toLowerCase().includes("posted using [inleo") === false).filter((item) => item.toLowerCase().includes("posted using [sportstalksocial]") === false).filter((item) => item.toLowerCase().includes("<center><sub>[posted using aeneas.blog") === false).filter((item) => item.toLowerCase().includes("<center><sub>posted via [proofofbrain.io") === false).filter((item) => item.toLowerCase().includes("<center>posted on [hypnochain") === false).filter((item) => item.toLowerCase().includes("<center><sub>posted via [weedcash.network") === false).filter((item) => item.toLowerCase().includes("<center>posted on [naturalmedicine.io") === false).filter((item) => item.toLowerCase().includes("<center><sub>posted via [musicforlife.io") === false).filter((item) => item.toLowerCase().includes("if the truvvl embed is unsupported by your current frontend, click this link to view this story") === false).filter((item) => item.toLowerCase().includes("<center><em>posted from truvvl") === false).filter((item) => item.toLowerCase().includes('view this post <a href="https://travelfeed.io/') === false).filter((item) => item.toLowerCase().includes("read this post on travelfeed.io for the best experience") === false).filter((item) => item.toLowerCase().includes('posted via <a href="https://www.dporn.co/"') === false).filter((item) => item.toLowerCase().includes("\u25B6\uFE0F [watch on 3speak](https://3speak") === false).filter((item) => item.toLowerCase().includes("<sup><sub>posted via [inji.com]") === false).filter((item) => item.toLowerCase().includes("view this post on [liketu]") === false).filter((item) => item.toLowerCase().includes("[via Inbox]") === false).filter((item) => item.toLowerCase().includes("<sub>[via apps from](") === false).join("\n") : "").replace('Posted via <a href="https://d.buzz" data-link="promote-link">D.Buzz</a>', "").replace('<div class="pull-right"><a href="/@hive.engage"></a></div>', "").replace('<div><a href="https://engage.hivechain.app"></a></div>', "").replace(`<div class="text-center"><img src="https://cdn.steemitimages.com/DQmNp6YwAm2qwquALZw8PdcovDorwaBSFuxQ38TrYziGT6b/A-20.png"><a href="https://bit.ly/actifit-app"><img src="https://cdn.steemitimages.com/DQmQqfpSmcQtfrHAtzfBtVccXwUL9vKNgZJ2j93m8WNjizw/l5.png"></a><a href="https://bit.ly/actifit-ios"><img src="https://cdn.steemitimages.com/DQmbWy8KzKT1UvCvznUTaFPw6wBUcyLtBT5XL9wdbB7Hfmn/l6.png"></a></div>`, "");
|
|
1694
|
+
return (s ? s.split("\n").filter((item) => item.toLowerCase().includes("posted using [partiko") === false).filter((item) => item.toLowerCase().includes("posted using [dapplr") === false).filter((item) => item.toLowerCase().includes("posted using [leofinance") === false).filter((item) => item.toLowerCase().includes("posted via [neoxian") === false).filter((item) => item.toLowerCase().includes("posted using [neoxian") === false).filter((item) => item.toLowerCase().includes("posted via [first context") === false).filter((item) => item.toLowerCase().includes("posted with [stemgeeks") === false).filter((item) => item.toLowerCase().includes("posted using [bilpcoin") === false).filter((item) => item.toLowerCase().includes("posted using [inleo") === false).filter((item) => item.toLowerCase().includes("posted using [sportstalksocial]") === false).filter((item) => item.toLowerCase().includes("<center><sub>[posted using aeneas.blog") === false).filter((item) => item.toLowerCase().includes("<center><sub>posted via [proofofbrain.io") === false).filter((item) => item.toLowerCase().includes("<center>posted on [hypnochain") === false).filter((item) => item.toLowerCase().includes("<center><sub>posted via [weedcash.network") === false).filter((item) => item.toLowerCase().includes("<center>posted on [naturalmedicine.io") === false).filter((item) => item.toLowerCase().includes("<center><sub>posted via [musicforlife.io") === false).filter((item) => item.toLowerCase().includes("if the truvvl embed is unsupported by your current frontend, click this link to view this story") === false).filter((item) => item.toLowerCase().includes("<center><em>posted from truvvl") === false).filter((item) => item.toLowerCase().includes('view this post <a href="https://travelfeed.io/') === false).filter((item) => item.toLowerCase().includes("read this post on travelfeed.io for the best experience") === false).filter((item) => item.toLowerCase().includes('posted via <a href="https://www.dporn.co/"') === false).filter((item) => item.toLowerCase().includes("\u25B6\uFE0F [watch on 3speak](https://3speak") === false).filter((item) => item.toLowerCase().includes("<sup><sub>posted via [inji.com]") === false).filter((item) => item.toLowerCase().includes("view this post on [liketu]") === false).filter((item) => item.toLowerCase().includes("[via Inbox]") === false).filter((item) => item.toLowerCase().includes("<sub>[via apps from](") === false).join("\n") : "").replace('Posted via <a href="https://d.buzz" data-link="promote-link">D.Buzz</a>', "").replace('<div class="pull-right"><a href="/@hive.engage"></a></div>', "").replace('<div><a href="https://engage.hivechain.app"></a></div>', "").replace(`<div class="text-center"><img src="https://cdn.steemitimages.com/DQmNp6YwAm2qwquALZw8PdcovDorwaBSFuxQ38TrYziGT6b/A-20.png"><a href="https://bit.ly/actifit-app"><img src="https://cdn.steemitimages.com/DQmQqfpSmcQtfrHAtzfBtVccXwUL9vKNgZJ2j93m8WNjizw/l5.png"></a><a href="https://bit.ly/actifit-ios"><img src="https://cdn.steemitimages.com/DQmbWy8KzKT1UvCvznUTaFPw6wBUcyLtBT5XL9wdbB7Hfmn/l6.png"></a></div>`, "");
|
|
1695
1695
|
}
|
|
1696
1696
|
var domSerializer = domSerializerModule__namespace.default || domSerializerModule__namespace;
|
|
1697
1697
|
var lolightPromise = null;
|