NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript==
// @name VK Feed Ads remover
// @namespace http://tampermonkey.net/
// @version 0.2
// @description Удаляет рекламные посты из ленты новостей, рекламный блок слева, рекомендации приложений справа, раздел Stories вверху ленты, назойливый попап с подтверждением номера телефона
// @author TheFriedCucumber
// @match *://vk.com/*
// @icon https://www.google.com/s2/favicons?domain=vk.com
// @grant none
// @require http://code.jquery.com/jquery-3.4.1.min.js
// @license MIT
// @grant none
// @copyright 2021, TheFriedCucumber (https://openuserjs.org/users/TheFriedCucumber)
// ==/UserScript==
window.addEventListener("load", function(){
try {
var emailbox = document.getElementsByClassName('actualize_email_box')
if (emailbox.length){
document.getElementsByClassName('box_x_button').click();
console.log('emailbox closed');
}
}
finally{console.log("Emailbox was not found")}
document.body.addEventListener('DOMSubtreeModified', function(){
var adsblockone = document.getElementsByClassName('_ads_block_data_w')
adsblockone.forEach(function(element, index) {
element.style.display='none';
});
});
var adleft = document.getElementById('ads_left')
adleft.style.position = 'absolute';
adleft.style.marginLeft = '-9999px';
var stories = document.getElementsByClassName('stories_feed_wrap')
stories.forEach(function(element, index) {
// current DOM element
element.style.display = 'none';
});
var adsright = document.querySelector('.apps_feedRightAppsBlock_single_app')
function tryremoveads(){
try {adsright.forEach(function(element, index) {
element.style.display = 'none';
});
}
finally {
// always runs
}
}
});