Feat: enhanced AdBlock with outbrain widget

This commit is contained in:
SukkaW
2024-09-30 04:30:18 +08:00
parent dfe1600a90
commit 00a265e9d0
2 changed files with 67 additions and 13 deletions

View File

@@ -0,0 +1,53 @@
(function () {
'use strict';
const noopfn = () => {
// noop
};
const obr = {};
const methods = [
'callClick',
'callLoadMore',
'callRecs',
'callUserZapping',
'callWhatIs',
'cancelRecommendation',
'cancelRecs',
'closeCard',
'closeModal',
'closeTbx',
'errorInjectionHandler',
'getCountOfRecs',
'getStat',
'imageError',
'manualVideoClicked',
'onOdbReturn',
'onVideoClick',
'pagerLoad',
'recClicked',
'refreshSpecificWidget',
'renderSpaWidgets',
'refreshWidget',
'reloadWidget',
'researchWidget',
'returnedError',
'returnedHtmlData',
'returnedIrdData',
'returnedJsonData',
'scrollLoad',
'showDescription',
'showRecInIframe',
'userZappingMessage',
'zappingFormAction'
];
obr.extern = {
video: {
getVideoRecs: noopfn,
videoClicked: noopfn
}
};
methods.forEach((a) => {
obr.extern[a] = noopfn;
});
window.OBR = obr;
}());