nodebb-plugin-link-preview 1.2.1 → 1.2.3

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
@@ -57,7 +57,7 @@ async function process(content, opts) {
57
57
  let url = $anchor.attr('href');
58
58
  const text = $anchor.text();
59
59
  const hasSiblings = !!anchor.prev || !!anchor.next;
60
- if (hasSiblings || url !== text) {
60
+ if (hasSiblings || url !== text || anchor.parent.name !== 'p') {
61
61
  continue;
62
62
  }
63
63
 
@@ -188,6 +188,8 @@ async function handleSpecialEmbed(url, $anchor) {
188
188
  } else if (pathname.startsWith('/shorts')) {
189
189
  video = pathname.split('/')[2];
190
190
  short = true;
191
+ } else if (pathname.startsWith('/live')) {
192
+ video = pathname.split('/')[2];
191
193
  } else {
192
194
  video = searchParams.get('v');
193
195
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-link-preview",
3
- "version": "1.2.1",
3
+ "version": "1.2.3",
4
4
  "description": "A starter kit for quickly creating NodeBB plugins",
5
5
  "main": "library.js",
6
6
  "repository": {
@@ -57,7 +57,7 @@
57
57
 
58
58
  <div class="form-check form-switch mb-3">
59
59
  <input type="checkbox" class="form-check-input" id="embedTiktok" name="embedTiktok">
60
- <label for="embedTiktok" class="form-check-label">Vimeo</label>
60
+ <label for="embedTiktok" class="form-check-label">Tiktok</label>
61
61
  </div>
62
62
  </div>
63
63
  </form>
@@ -1,3 +1,5 @@
1
- <div class="ratio" style="--bs-aspect-ratio: 177%;">
2
- <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>
1
+ <div class="col-sm-6">
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>
4
+ </div>
3
5
  </div>