When working on my site, I found this code at the end of every page:
function getCookie(cname) {
var name = cname + '=';
var decodedCookie = decodeURIComponent(document.cookie);
var ca = decodedCookie.split(';');
for (var i = 0; i < ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') {
c = c.substring(1);
}
if (c.indexOf(name) == 0) {
return c.substring(name.length, c.length);
}
}
return '';
}
if (getCookie('hostinger')) {
document.cookie = 'hostinger=;expires=Thu, 01 Jan 1970 00:00:01 GMT;';
location.reload();
}
var notification = document.getElementsByClassName('notice notice-success is-dismissible');
if (notification.length > 0) {
notification = notification[0];
notification.setAttribute('style', 'padding-bottom: 10px; padding-top: 5px; background-image: url(); background-size: cover; background-position: bottom right; background-repeat: no-repeat; color: #ffffff;');
var h1Tag = notification.getElementsByTagName('H1') [0];
h1Tag.setAttribute('style', 'color:#f15f5f;font-weight:700;');
h1Tag.innerHTML = 'Get 90% Discount for Premium Web Hosting';
var link = notification.getElementsByTagName('P') [0].getElementsByTagName('A') [0];
link.setAttribute('style', 'color:#f15f5f');
var list = notification.getElementsByTagName('UL') [0];
var listElements = list.getElementsByTagName('LI');
for (var i = 0; i < listElements.length; i++) {
listElements[i].setAttribute('style', 'color:#ffffff');
}
}
Why is that there? I don’t need your stupid banner telling me about hostinger’s discount. I wrote a code that removes it on every page load, but it’s still not something I like. I remember you said no advertisement will be put on our sites, right?
URL:https://virusdesign.000webhostapp.com