Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
nleush committed Dec 18, 2024
2 parents 61e9a65 + 9352045 commit ec145a1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 40 deletions.
1 change: 1 addition & 0 deletions plugins/domains/c-span.org/c-span.org-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ export default {

getData: function(url, options) {
options.exposeStatusCode = true;
options.followHTTPRedirect=true
}
};
36 changes: 0 additions & 36 deletions plugins/domains/cnn.com.js

This file was deleted.

18 changes: 14 additions & 4 deletions plugins/links/iframely-link.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,31 @@ export default {
if (appname) {
appname = appname.toLowerCase();
}

let ignoreIframely = false;
let links = [];

if (appname && Object.keys(meta).some(key => key.indexOf(appname) === 0)) {
ignoreIframely = true;
}

for (const [key, value] of Object.entries(meta)) {
for (const [key, v] of Object.entries(meta)) {
if (key.indexOf(appname) === 0 || (!ignoreIframely && key.indexOf(CONFIG.R.iframely) === 0)) {

const value = typeof(v) === 'string' ? {href: v} : v; // If link has no `media` and no `type` attributes, HTMLMetaHandler assigns the value=href;

let wlr = whitelistRecord;
if (whitelistRecord.isDefault
&& !Array.isArray(value) && value.href
&& (!value.type || value.type === CONFIG.T.text_html)) {
wlr = options.getWhitelistRecord(value.href, {exclusiveRel: 'html-meta'});
}

links = links.concat(
utils.parseMetaLinks(
key,
typeof(value) === 'string' ? {href: value} : value, // If link has no `media` and no `type` attributes, HTMLMetaHandler assigns the value=href;
whitelistRecord,
value,
wlr,
ignoreIframely && appname
)
);
Expand Down

0 comments on commit ec145a1

Please sign in to comment.