Skip to content

Instantly share code, notes, and snippets.

@MasterGroosha
Last active August 29, 2015 14:21
Show Gist options
  • Save MasterGroosha/3c4984eeee693384b1ea to your computer and use it in GitHub Desktop.
Save MasterGroosha/3c4984eeee693384b1ea to your computer and use it in GitHub Desktop.
Remove Ads in user's feed in Vk.com
// ==UserScript==
// @name Vk HateAds
// @namespace none
// @version 1.1
// @description Remove ads inside user's feed in Vk.com
// @author Master_Groosha
// @match https://*vk.com/*
// @grant none
// ==/UserScript==
// Update 23.05.2015: New version because of VK's CSS change
function addGlobalStyle(css) {
var head, style;
head = document.getElementsByTagName('head')[0];
if (!head) { return; }
style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = css;
head.appendChild(style);
}
addGlobalStyle('.post[data-ad-view] { display: none !important; }');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment