Telegram Web (Ads Remover), working A and K versions.
// ==UserScript==
// @name Telegram Web (Ads Remover)
// @namespace https://greasyfork.org/users/592063
// @version 0.2.2
// @description Telegram Web (Ads Remover), working A and K versions.
// @author wuniversales
// @match https://web.telegram.org/*
// @icon https://icons.duckduckgo.com/ip2/telegram.org.ico
// @grant none
// @license MIT
// ==/UserScript==
(function() {
'use strict';
async function addGlobalStyle(css) {
let head, style;
let escape_HTML_Policy = window.trustedTypes.createPolicy("Peach_Policy", {createHTML: (to_escape) => to_escape});
head = document.getElementsByTagName('head')[0];
if (!head) { return; }
style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = escape_HTML_Policy.createHTML(css.replace(/;/g, ' !important;'));
head.appendChild(style);
}
addGlobalStyle("div[class*='sponsored' i]:not([data-floating='1']),div.yMkfzjus[data-is-panel-open='true']{display:none;}");
})();