Skip to content

Commit

Permalink
change locations of internalLinkDomainsDefault to utils
Browse files Browse the repository at this point in the history
  • Loading branch information
mneunomne committed Mar 5, 2023
1 parent 4dc9d32 commit 483c246
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/js/adn/adn-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ import { i18n$ } from '../i18n.js';

/**************************** exports *********************************/

// targets on these domains are never internal (may need to be regex)
export const internalLinkDomainsDefault = ['google.com', 'asiaxpat.com', 'nytimes.com',
'columbiagreenemedia.com', '163.com', 'sohu.com', 'zol.com.cn', 'baidu.com',
'yahoo.com', 'facebook.com', 'youtube.com', 'flashback.org'
];

export const makeCloneable = function (notes) {
notes && notes.forEach(function (n) { delete n.func }); // remove func to allow clone
// see https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm
Expand Down
4 changes: 3 additions & 1 deletion src/js/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ import {
originFromURI,
} from './uri-utils.js';

import { internalLinkDomainsDefault } from './adn/adn-utils.js'; // adn

/******************************************************************************/

// Not all platforms may have properly declared vAPI.webextFlavor.
Expand Down Expand Up @@ -88,7 +90,7 @@ const hiddenSettingsDefault = {
userResourcesLocation: 'unset',
showAdsDebug: false, // Adn set "true" to show ads that can be potentially be collected #2136
costPerClick: 1.03, // Adn https://github.com/dhowe/AdNauseam/issues/2131
internalLinkDomains: `google.com, asiaxpat.com, nytimes.com, columbiagreenemedia.com, 163.com, sohu.com, zol.com.cn, baidu.com, yahoo.com, youtube.com, flashback.org`, // Adn
internalLinkDomains: internalLinkDomainsDefault.join(','), // Adn
};

const userSettingsDefault = {
Expand Down
2 changes: 2 additions & 0 deletions src/js/contentscript-extra.js
Original file line number Diff line number Diff line change
Expand Up @@ -511,9 +511,11 @@ class ProceduralFilterer {
/* ADN parse procedural selector hits */
if ( nodes.length > 0) {
console.log("[ADN] parse procedural selector hits", nodes)
/*
for ( const node of nodes ) {
vAPI.adCheck && vAPI.adCheck(node);
}
*/
}
/* end ADN */
const t1 = Date.now();
Expand Down

0 comments on commit 483c246

Please sign in to comment.