Answer the question
In order to leave comments, you need to log in
Is it possible to change the style of this button?
Hello everyone
, there is such a button from the op network odnoklassniki, the problem is that it looks like this -> prntscr.com/b0i7wy
Why do I need this button, you can use it to find out whether a person has published a post or not
here is the detailed code
$mincod = '1'; $maxcod = '999999999999999'; $numberc = rand($mincod, $maxcod);
$klass22 = "http://connect.ok.ru/connect.js?m=$numberc";
<div id="ok_shareWidget"></div>
<script>
!function (d, id, did, st) {
var js = d.createElement("script");
js.src = "<? echo $klass22; ?>";
js.onload = js.onreadystatechange = function () {
if (!this.readyState || this.readyState == "loaded" || this.readyState == "complete") {
if (!this.executed) {
this.executed = true;
setTimeout(function () {
OK.CONNECT.insertShareWidget(id,did,st);
}, 0);
}
}};
d.documentElement.appendChild(js);
}(document,"ok_shareWidget","http://site.ru/post/share.php?user=<?echo $tt2;?>&rd=<?echo $randNUMBER;?>","{width:125,height:50,st:'straight',sz:45,ck:1,nc:1}");
function listenForShare() {
if (window.addEventListener) {
window.addEventListener('message', onShare, false);
} else {
window.attachEvent('onmessage', onShare);
}
}
function onShare(e) {
var args = e.data.split("$");
if (args[0] == "ok_shared") {
window.location="4.php"; // Вывод идентификатора фрейма кнопки - в случае нескольких кнопок на одной странице, по нему можно определить какая именно была кликнута
if (alert)
$( '#baner_grup' ).show();
$( '.classs' ).html('<meta http-equiv="refresh" content="0; url=http://site.ru/x.php" />');
$( '#class' ).hide();
$( '.player' ).hide();
}
}
listenForShare();
</script>
</div>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question