Skip to content

Instantly share code, notes, and snippets.

@0xF6
Created May 26, 2019 22:56
Show Gist options
  • Save 0xF6/8cc192b60a77983346eaed2e759afa2f to your computer and use it in GitHub Desktop.
Save 0xF6/8cc192b60a77983346eaed2e759afa2f to your computer and use it in GitHub Desktop.
VK Feed repost disabler
// ==UserScript==
// @name Disable VK Repost
// @namespace http://tampermonkey.net/
// @version 0.1
// @author Yuuki Wesp
// @match https://vk.com/*
// @match http://vk.com/*
// @grant none
// @require https://code.jquery.com/jquery-3.3.1.min.js
// @require https://code.jquery.com/ui/1.12.1/jquery-ui.min.js
// ==/UserScript==
(function() {
'use strict';
var MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
var $ = jQuery.noConflict();
var observer = new MutationObserver(function(mutations, observer) {
if(window.location.pathname.indexOf("feed") !== -1)
{
$(".copy_quote").each((i, $el) => {
$($el).parent().parent().parent().parent().parent().parent().parent().remove();
});
}
});
observer.observe(document, {
subtree: true,
childList: true
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment