Skip to content

Commit db4e4bc

Browse files
committed
loom.com: change gif to jpg for c2p covering
1 parent 512bd0c commit db4e4bc

2 files changed

Lines changed: 12 additions & 16 deletions

File tree

_bt_test.mjs

Lines changed: 0 additions & 15 deletions
This file was deleted.

plugins/domains/loom.com.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export default {
3838
});
3939
}
4040

41-
return {
41+
var links = [{
4242
href: iframe.replaceQuerystring(q),
4343
type: CONFIG.T.text_html, // Validator fails because we receive x-frame-options. It actually works fine.
4444
rel: CONFIG.R.player,
@@ -49,8 +49,19 @@ export default {
4949
label: "Hide player attribution info"
5050
}
5151
}
52+
}];
53+
54+
var thumbnail = iframe.placeholder && iframe.placeholder.replace(/\.gif(?=[^.]*$)/i, '.jpg');
55+
if (thumbnail) {
56+
links.push({
57+
href: thumbnail,
58+
type: CONFIG.T.image,
59+
rel: CONFIG.R.thumbnail
60+
});
5261
}
5362

63+
return links;
64+
5465
},
5566

5667
tests: [

0 commit comments

Comments
 (0)