Created
May 26, 2019 22:56
-
-
Save 0xF6/8cc192b60a77983346eaed2e759afa2f to your computer and use it in GitHub Desktop.
VK Feed repost disabler
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 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