nodebb-plugin-link-preview 2.0.13 → 2.0.15
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/library.js
CHANGED
|
@@ -93,8 +93,11 @@ async function process(content, { type, pid, tid, attachments }) {
|
|
|
93
93
|
if (pid && Array.isArray(attachments) && attachments.length) {
|
|
94
94
|
const attachmentData = await posts.attachments.getAttachments(attachments);
|
|
95
95
|
attachmentData.filter(Boolean).forEach(({ url, _type }) => {
|
|
96
|
-
const
|
|
97
|
-
|
|
96
|
+
const isInlineImage = new RegExp(`<img.+?src="${url}".+?>`).test(content);
|
|
97
|
+
if (!isInlineImage) {
|
|
98
|
+
const type = _type || 'attachment';
|
|
99
|
+
requests.set(url, { type });
|
|
100
|
+
}
|
|
98
101
|
});
|
|
99
102
|
}
|
|
100
103
|
|
package/package-lock.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nodebb-plugin-link-preview",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.15",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "nodebb-plugin-link-preview",
|
|
9
|
-
"version": "2.0.
|
|
9
|
+
"version": "2.0.15",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"cheerio": "^1.0.0-rc.12",
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<div class="col-sm-6">
|
|
2
2
|
<div class="ratio" style="--bs-aspect-ratio: 177%;">
|
|
3
|
-
<iframe src="https://www.tiktok.com/embed/v2/{video}" title="TikTok video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
|
|
3
|
+
<iframe src="https://www.tiktok.com/embed/v2/{video}" title="TikTok video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" allowfullscreen></iframe>
|
|
4
4
|
</div>
|
|
5
5
|
</div>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<div class="col-sm-6">
|
|
2
2
|
<div class="ratio" style="--bs-aspect-ratio: 177%;">
|
|
3
|
-
<iframe src="https://www.youtube-nocookie.com/embed/{video}" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
|
|
3
|
+
<iframe src="https://www.youtube-nocookie.com/embed/{video}" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" allowfullscreen></iframe>
|
|
4
4
|
</div>
|
|
5
5
|
</div>
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
<div class="ratio ratio-16x9">
|
|
2
|
-
<iframe src="https://www.youtube-nocookie.com/embed/{video}" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
|
|
2
|
+
<iframe src="https://www.youtube-nocookie.com/embed/{video}" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" allowfullscreen></iframe>
|
|
3
3
|
</div>
|