@ecency/render-helper 2.5.14 → 2.5.16

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.
@@ -43,6 +43,8 @@ var WHITE_LIST = [
43
43
  "ecency.com",
44
44
  "hive.blog",
45
45
  "peakd.com",
46
+ "snapie.io",
47
+ "hivesuite.app",
46
48
  "travelfeed.io",
47
49
  "dapplr.in",
48
50
  "leofinance.io",
@@ -867,7 +869,7 @@ var matchesHref = (href, value) => {
867
869
  return normalizeValue(value) === normalizedHref;
868
870
  };
869
871
  var normalizeDisplayText = (text2) => {
870
- const beforeTrailingSlash = text2.trim().replace(/^https?:\/\/(www\.)?(ecency\.com|peakd\.com|hive\.blog)/i, "").replace(/^\/+/, "").split("?")[0].replace(/#@.*$/i, "");
872
+ const beforeTrailingSlash = text2.trim().replace(/^https?:\/\/(www\.)?(ecency\.com|peakd\.com|hive\.blog|leofinance\.io|inleo\.io|snapie\.io|hivesuite\.app)/i, "").replace(/^\/+/, "").split("?")[0].replace(/#@.*$/i, "");
871
873
  return trimTrailingSlash(beforeTrailingSlash).toLowerCase();
872
874
  };
873
875
  var getInlineMeta = (el, href, author, permlink, communityTag) => {
@@ -1644,8 +1646,11 @@ function iframe(el, parentDomain = "ecency.com", forApp = false, renderOptions)
1644
1646
  return;
1645
1647
  }
1646
1648
  if (src.match(SKATEHIVE_IPFS_REGEX)) {
1647
- el.setAttribute("src", src);
1648
- el.setAttribute("allowfullscreen", "true");
1649
+ const video = el.ownerDocument.createElement("video");
1650
+ video.setAttribute("src", src);
1651
+ video.setAttribute("controls", "");
1652
+ el.parentNode.insertBefore(video, el);
1653
+ el.parentNode.removeChild(el);
1649
1654
  return;
1650
1655
  }
1651
1656
  if (src.match(SKATEHYPE_EMBED_REGEX)) {