Skip to content

Commit 753d50b

Browse files
committed
try to hide title
1 parent 81bfc25 commit 753d50b

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

plugins/domains/documentcloud.org.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,8 @@ export default {
4141

4242
try {
4343
var iframe = oembed.getIframe();
44-
var href = !hideTitle ? iframe.replaceQuerystring({ title: 1 }) : iframe.src;
45-
46-
// Remove title attribute from HTML if hiding
47-
if (hideTitle) {
48-
html = html.replace(/\s+title="[^"]*"/g, '');
49-
}
44+
// title=1 shows title (default since Jan 2025), title=0 hides it explicitly
45+
var href = iframe.replaceQuerystring({ title: hideTitle ? 0 : 1 });
5046

5147
if (page && page !== '1') {
5248
if (href) {

0 commit comments

Comments
 (0)