Skip to content

Commit

Permalink
use internal util and add test url with title param
Browse files Browse the repository at this point in the history
  • Loading branch information
garmoncheg committed Nov 6, 2024
1 parent 6ed9647 commit 1eea7e7
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions plugins/domains/documentcloud.org.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,7 @@ export default {

try {
var iframe = oembed.getIframe();
var href = iframe.src;

if (title) {
var uri = new URL(href);
uri.searchParams.append("title", '1');
href = uri.toString();
}
var href = title ? iframe.replaceQuerystring({ title: 1 }) : iframe.src;

if (page && page !== '1') {
if (href) {
Expand Down Expand Up @@ -116,6 +110,7 @@ export default {
// 'https://www.documentcloud.org/documents/5766398-ASRS-Reports-for-737-max8/pages/2.html',
'https://www.documentcloud.org/documents/7203159-Joaqu%C3%ADn-El-Chapo-Guzm%C3%A1n-Appeal.html',
'https://www.documentcloud.org/documents/7203159-Joaqu%C3%ADn-El-Chapo-Guzm%C3%A1n-Appeal',
"https://www.documentcloud.org/documents/1995734-freddie-gray-charging-documents.html?_title=1",
// 'https://www.documentcloud.org/documents/7203159-Joaqu%C3%ADn-El-Chapo-Guzm%C3%A1n-Appeal/pages/2.html',
"https://www.documentcloud.org/documents/20059068-the-mueller-report#document/p17/a2001254",
"https://www.documentcloud.org/documents/20059068-the-mueller-report",
Expand Down

0 comments on commit 1eea7e7

Please sign in to comment.