goga5,
исправил проверяйте
<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<script>
window.addEventListener("DOMContentLoaded", function() {
(function(a) {
[].slice.call(document.links).forEach(function(b) {
a.some(function(a) {
return !!~b.getAttribute("href").indexOf(a)
}) && b.parentNode.removeChild(b)
})
})(["domen1.ru", "domen3.ru"])
});
</script>
</head>
<body>
<a href="domen1.ru">domen1.ru</a>
<a href="domen3.ru">domen3.ru</a>
<a href="domen2.ru">domen2.ru</a>
</body>
</html>