Greasy Fork is available in English.

Remove inoreader ADS

Remove inoreader.com's advertisement in reading list, upgrae button and some annoying dialogs.

< Feedback on Remove inoreader ADS

Question/comment

§
Posted: 2019-01-21

bad end of the code (var relatedObj is not used)

should be:

var overlay_div_id = undefined; document.addEventListener('DOMNodeInserted', function(e) {

var relatedObj = e.originalTarget || e.target;

if(relatedObj.id && relatedObj.id.indexOf('_wrap') != -1) {
    var img_collections = relatedObj.getElementsByTagName('img');

    if(img_collections.length !=0 && img_collections.item(0) && img_collections.item(0).src.indexOf('adb_detected.png') != -1) {
        overlay_div_id = relatedObj.id.split('_')[0] + '_modal_overlay';
        relatedObj.parentNode.removeChild(relatedObj);
    }

    if(!relatedObj.style.zIndex) {
        relatedObj.style.zIndex = 1002;
    }
}else if(overlay_div_id){
    if(relatedObj.id && relatedObj.id == overlay_div_id) {
        relatedObj.parentNode.removeChild(relatedObj);
        overlay_div_id = undefined;
    }
}

})

HacksignAuthor
§
Posted: 2019-01-21
Edited: 2019-01-21

@rsdsoft 说道: should be:

var overlay_div_id = undefined; document.addEventListener('DOMNodeInserted', function(e) {

var relatedObj = e.originalTarget || e.target;

if(relatedObj.id && relatedObj.id.indexOf('_wrap') != -1) {
    var img_collections = relatedObj.getElementsByTagName('img');

    if(img_collections.length !=0 && img_collections.item(0) && img_collections.item(0).src.indexOf('adb_detected.png') != -1) {
        overlay_div_id = relatedObj.id.split('_')[0] + '_modal_overlay';
        relatedObj.parentNode.removeChild(relatedObj);
    }

    if(!relatedObj.style.zIndex) {
        relatedObj.style.zIndex = 1002;
    }
}else if(overlay_div_id){
    if(relatedObj.id && relatedObj.id == overlay_div_id) {
        relatedObj.parentNode.removeChild(relatedObj);
        overlay_div_id = undefined;
    }
}

})

Thanks for feedback. Script has been upgraded to v4.7.1 as your report~

Post reply

Sign in to post a reply.