Created
May 19, 2017 21:35
-
-
Save aq1/0b64c67d73777c2994bce7a3c2a12312 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Remove ads | |
// @namespace whatevernamespace | |
// @include https://vk.com/ | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
var removeAdds = function () { | |
var adsLeft = document.getElementById('ads_left'); | |
if (adsLeft) { | |
adsLeft.remove(); | |
} | |
var posts = document.getElementsByClassName('_ads_promoted_post_data_w'); | |
for (var i = 0; i < posts.length; i++) { | |
posts[i].remove() | |
} | |
}; | |
setInterval(removeAdds, 1000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment