I'm trying to prevent a certain website from being able to use javascript to redirect the browser to another page. The script that is used by website is given below.
<script>
$(document).ajaxComplete(function (event, xhr, settings) {
if (xhr.status == 601 || xhr.responseText.indexOf('8ba7aa83-447f-4e1f-b9fa-380e514f2140') > -1) {
window.location = '/Security/Authentication/UserLogin';
}
});
The script in question is an inline script. How can I remove that script in browser (Using Greasemonkey or any other technique) before page load so that I can view that page.
I am trying to use GreaseMonkey and Tampermonkey for this task but still no success.