There is a chat on the site with a telegram Replain . Example

enter image description here

iframe styles goes through iframe . Is it possible to replace the telegram icon with the logo of your site? Through the styles do not roll ..

 #__replain_widget #__replain_widget_iframe .ctc__show { background-color: transparent!important; } #__replain_widget #__replain_widget_iframe .ctc__show__img { background-image: url(images/call_logo.png)!important; } 
  • for what a minus something? - Vasya

1 answer 1

Not.

If on different domains, then only using JS is not . (Same-origin policy or Rule> domain restrictions)

The restriction of “ one source ” prohibits windows and frames from different sources from invoking each other’s methods and reading data from each other.

At the same time "from one source" means "the protocol, domain and port match ".

If on the same domain, then the usual JS like this:

 var cssLink = document.createElement("link") cssLink.href = "style.css"; cssLink.rel = "stylesheet"; cssLink.type = "text/css"; frames['nameOfElementIframe'].document.body.appendChild(cssLink); 

Source: https://ru.stackoverflow.com/a/571570/221218