// ==UserScript==
// @name           RemoveTwitterRTRT
// @namespace      http://blog.gifumaster.com
// @include        http://twitter.com/*
// ==/UserScript==


(function() {
	var d = document;
	function getElement(xpath) {
		var result = d.evaluate(xpath, d, null, 7, null);
		return result;
	}
	
	check();
	
    function check(){
    	var s = getElement('//ol[@id="timeline"]//li//span[@class="entry-content" and @class !="RTRT"]');
    	var c = s.snapshotLength;
    	for(i=0;i<c;i++){
    		var str = s.snapshotItem(i).innerHTML;
            s.snapshotItem(i).setAttribute("class","RTRT")
    		if(str.match(/RT.*RT/)){
    			t = s.snapshotItem(i).parentNode;
                t.style.MozOpacity = '0.4';
                t.addEventListener('mouseover',MozOn,false);
                t.addEventListener('mouseout',MozOff,false);
    		}
    	}
    }
    
    function MozOn(){
		this.style.MozOpacity = '1.0';
	}
    function MozOff(){
		this.style.MozOpacity = '0.4';
	}
    
    d.addEventListener('scroll',check, false);
})();
