How to disable a specific JavaScript alert
You can use the Greasemonkey add-on to rewrite the alert
function:
// ==UserScript==
// @name Catch JS Alert
// @namespace http://igalvez.net
// @include http://*
// @version 1
// @grant none
// @run-at document-start
// ==/UserScript==
window.alert = function(message) {
if(message == 'Adblock detected, please consider disabling it') {
console.log(message);
} else {
confirm(message);
}
}
The way this works is as follows:
If the alert box's message matches "Adblock detected, please consider disabling it", then discard it to the JS console (it will not be displayed). Otherwise, display the alert box as a confirm
box.