Last active
October 9, 2022 08:25
-
-
Save TheAndrey/19ed7f3f35fae7c7c8e0bb4db7da61cc to your computer and use it in GitHub Desktop.
VKontakte user styles and JS
This file contains 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
/* ==UserStyle== | |
@name VKontakte fixes | |
@namespace TheAndrey | |
@version 1.0.0 | |
@license WTFPL | |
@preprocessor default | |
@updateURL https://gist.github.com/TheAndrey/19ed7f3f35fae7c7c8e0bb4db7da61cc/raw/vk.user.css | |
==/UserStyle== */ | |
@-moz-document domain("vk.com") { | |
/* Бонус: убираем рекламу */ | |
#ads_left, | |
.post.page_block[data-ad], | |
.adaptive_ad.ver.ads_ad_box, | |
.page_block._ads_block_data_w { | |
display: none !important; | |
} | |
/* Долбанные рекомендации */ | |
.page_block.apps_feedRightAppsBlock, | |
.page_block.ShortVideoFeedBlock, | |
.page_block.feed_groups_recomm, | |
.feed_row .VideosFeedTitle, | |
.feed_row .VideosFeedTitle + .post, | |
.page_block.RecommendedNarrativesBlock, | |
.page_block.post.mark_top_verified.deep_active, | |
#block_aliexpress-recommendations-carousel { | |
display: none; | |
} | |
/* Ненужная кнопка перевода записей */ | |
.PostTranslationButton { display: none; } | |
/* Истории */ | |
#stories_feed_wrap { | |
display: none !important; | |
} | |
/* Кнопка наверх */ | |
#stl_left { max-width: 120px; } | |
#stl_side { display: none !important; } | |
/* Комбарь */ | |
#side_bar_inner #l_combo { | |
display: none; | |
} | |
/* Covid */ | |
.CovidStatus__wrapper, | |
.feed_section_coronavirus, | |
.page_block.stories_feed_wrap, | |
._im_dialog_link > img.emoji, | |
._im_page_peer_name > img.emoji, | |
.im-right-menu--text > img.emoji, | |
.image_status__status { | |
display: none; | |
} | |
/* Залогинься! */ | |
#page_bottom_banners_root { | |
display: none; | |
} | |
} |
This file contains 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 VK | |
// @namespace TheAndrey | |
// @match https://vk.com/* | |
// @grant none | |
// @version 1.0 | |
// @author TheAndrey | |
// @description Fixes for VK.com | |
// @updateURL https://gist.github.com/TheAndrey/19ed7f3f35fae7c7c8e0bb4db7da61cc/raw/vk.user.js | |
// @downloadURL https://gist.github.com/TheAndrey/19ed7f3f35fae7c7c8e0bb4db7da61cc/raw/vk.user.js | |
// ==/UserScript== | |
'use strict'; | |
window.addEventListener('load', function (event) { | |
document.body.addEventListener('DOMNodeInserted', function (event) { | |
const element = event.target; | |
/* Отключение повтора видео */ | |
if (element.id === 'video_player' || element.className === 'video_box_wrap') { | |
const videoPlayer = element.querySelector('video'); | |
if (videoPlayer && videoPlayer.loop) { | |
videoPlayer.loop = false; | |
console.info('Повтор видео выключен.'); | |
} | |
} | |
}, false); | |
}, false); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment