Skip to content

Instantly share code, notes, and snippets.

@azu
Created June 7, 2009 09:12
Show Gist options
  • Save azu/125253 to your computer and use it in GitHub Desktop.
Save azu/125253 to your computer and use it in GitHub Desktop.
scr_meta=<><![CDATA[
// ==UserScript==
// @name @troynt's Twitter Script
// @namespace http://twitter.com/troynt
// @description Nested Replies, RT button, Custom Search Tabs, YouTube Embed, TwitPic Embed, URL Expansion, Hash Tag Search Links
// @version 9.9
// @include http://twitter.com*
// @include http://www.twitter.com*
// @include https://twitter.com*
// @include https://www.twitter.com*
// ==/UserScript==
]]></>;
// Copyleft Michael Medley <[email protected]>, All Wrongs Reserved
CheckScriptForUpdate = {
// Config values, change these to match your script
id: '40617', // Script id on Userscripts.org
days: 2, // Days to wait between update checks
// Don't edit after this line, unless you know what you're doing ;-)
name: /\/\/\s*@name\s*(.*)\s*\n/i.exec(scr_meta)[1],
version: /\/\/\s*@version\s*(.*)\s*\n/i.exec(scr_meta)[1],
time: new Date().getTime() | 0,
call: function(response) {
GM_xmlhttpRequest({
method: 'GET',
url: 'http://userscripts.org/scripts/source/'+this.id+'.meta.js',
headers: {
'User-agent': window.navigator.userAgent,
'Accept': 'application/atom+xml,application/xml,text/xml',
},
onload: function(xpr) {CheckScriptForUpdate.compare(xpr,response);}
});
},
compare: function(xpr,response) {
this.xversion=/\/\/\s*@version\s*(.*)\s*\n/i.exec(xpr.responseText)[1];
this.xname=/\/\/\s*@name\s*(.*)\s*\n/i.exec(xpr.responseText)[1];
if ( (this.xversion != this.version) && (confirm('A new version of the '+this.xname+' user script is available. Do you want to update?')) ) {
GM_setValue('updated', this.time);
GM_openInTab('http://userscripts.org/scripts/source/'+this.id+'.user.js');
} else if ( (this.xversion) && (this.xversion != this.version) ) {
if(confirm('Do you want to turn off auto updating for this script?')) {
GM_setValue('updated', 'off');
GM_registerMenuCommand("Auto Update "+this.name, function(){GM_setValue('updated', new Date().getTime() | 0);CheckScriptForUpdate.call('return');});
alert('Automatic updates can be re-enabled for this script from the User Script Commands submenu.');
} else {
GM_setValue('updated', this.time);
}
} else {
if(response) alert('No updates available for '+this.name);
GM_setValue('updated', this.time);
}
},
check: function() {
if (GM_getValue('updated', 0) == 0) GM_setValue('updated', this.time);
if ( (GM_getValue('updated', 0) != 'off') && (+this.time > (+GM_getValue('updated', 0) + (1000*60*60*24*this.days))) ) {
this.call();
} else if (GM_getValue('updated', 0) == 'off') {
GM_registerMenuCommand("Enable "+this.name+" updates", function(){GM_setValue('updated', new Date().getTime() | 0);CheckScriptForUpdate.call(true);});
} else {
GM_registerMenuCommand("Check "+this.name+" for updates", function(){GM_setValue('updated', new Date().getTime() | 0);CheckScriptForUpdate.call(true);});
}
}
};
console = {};
console.log = function(msg){};
if(typeof unsafeWindow.console != 'undefined')
console = unsafeWindow.console;
GM_registerMenuCommand("Clear Twitter Cache", function(){
tnt_twitter.clear_cache();
alert('Cache Cleared');
});
var social_icons = {
academia:"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%10%00%00%00%10%08%06%00%00%00%1F%F3%FFa%00%00%00%04sBIT%08%08%08%08%7C%08d%88%00%00%02%90IDAT8%8D%3D%92Mk%9Ce%18%85%AF%FB%3C%F7%3B%D3%99F%A6%92d%22%F5%23%22%9A%8D%16J%B7%22%A5t%A1T%AD%20%14%2B%22~%ADt%23%A1t!%5D%B6%A0.%CC%0FpQ%5D%B8%D3%5D%EA%2F%90%BAQ%A2%E0N%AB%F8%11%AA)A%DA%9A%40f%E6y%EE%DBE%A2%E7%0F%9C%C3%B9.%E3%D4%B9%C4%02%D5B%B8%B0*%F0)%99%09Y%10I%98%D3)!%0A%D5f%90N%A1R%BC%87%97%ECC%02%02%D5)%C8%88%E6%C8%1A%96%85%A6%40%19%CC%9A%83M!%05L%A8%F4%A8%B3)j%9A%10%DA%A3%D9%0C%BAD%E6xI%A2%1B%10%25Q8a%80U%8CC%FBM8%10%40%C1%15N%A8%80%1F4%D2p%EF8%3A%1Ap%FF%E2C%DC%DD%DDa%A8%3E%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F%91%1C%98%1DZ~~%00%00%00%00IEND%AEB%60%82",
brightkite:"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%10%00%00%00%10%08%06%00%00%00%1F%F3%FFa%00%00%00%04sBIT%08%08%08%08%7C%08d%88%00%00%01%D7IDAT8%8D%9D%93OkSA%14%C5%7F3y%91%E6e%D1%D4X*I%A9%26%16%13%BA%D0%8D%20%F8%07w.%15A%17vY%11Q%DC%08%AED%BF%40%BF%81%DF%C0%85%3B%A1%1B%17.%2CB%E3%A6Y%B8%154H%15%82%A9%A9IM%DE%DC%B9.%F2%E7%E5%19%E2%A2%17%06%86%3Bs%CE%3D%F7%CC%1D%A3%AA%5C%BA%FD%409B%7Cx%FD%D2%98%8B77%12%60%EF%05%2F%82%AA%9F%09%B4%C6bS%01%C6Z%02%117%3EP%EF)%9Fq%3Cz%9C%26%CC%06q%1E%1D%EFF%F1%F0%5E%8FT%3AM%20%22qu%11J%E5.A%06%FA%1E%EE%AFCe%0D%9E%3EOv%A8%AA87%07%D6%12%88%8B%15%88%8B(%9F%3D%20%1A%93%E6Pu%7C%FF%D1%E1%B0c(%9Er%13%C5%16%11%E7%08%FCD%0B%DEE%94%AA%3F%89%FCHv%8E%C6%17%CB%8B'%F3%00%5C%BB%DE%E6%D6zsH%B0%80%B1%16%2B%22%88%08%E2%1CK%85%DF%F4%A5E_ZD%B2%0F%C0%C2%89%1E%CF6%3F%91%09%85%DAv%96%C8%FF%A2%EF%F7%11%EF%11%91%D8DU%CFR%F1%00%AF%FDD%BFs%19%C7%7C%BEC.%DFc%AF%11%E25%1A*p%60%CC%04%81%F7%14V%3ASO%D6j%1Ec%FB%EDI%F6%1A!%E5J%3B%F6%CB%0B*%06%2B%CE1X%11%AB%D5n%02%7C%E1r%13%0C%BCy%B5B%B9%D2%E6%C6%DD%AF%00t%3B)%FC%B0%ED%C0%0F%1DW%11%96K%BD%04%C1%9D%8D%CFS%8A%EA%B5%90w%5B%C7Q%AF%A8%8E%3DPV%AB%D3%F2G%B1%BB%13R%AFe%A9%7F%CC%F2%E70%05%180%83%C2%81%AA%82*%CB%A7%7B%D3%A0%9D%90%DD%04%C8%C4%17t0%5C%E3y%CD%2F%CAl%90af%98%C2%B9%2B%3A%C98%C8%FE%07%F1%2F%81%AAR%3C%7F%F5H%DF%F9%5B%FD%BD%F9%0Ba%BC%FFA%10%8FZ_%00%00%00%00IEND%AEB%60%82",
delicious:"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%10%00%00%00%10%08%02%00%00%00%90%91h6%00%00%00%07tIME%07%D8%07%15%14%22%02%B5%CDc%FF%00%00%00%09pHYs%00%00%0B%12%00%00%0B%12%01%D2%DD~%FC%00%00%00%04gAMA%00%00%B1%8F%0B%FCa%05%00%00%00(IDATx%DAc%FC%FF%FF%3F%036%C0%C8%88U%98%81%89%81D0%AA%81%18%C0%88K%E2%EE%DD%BBC%C5%0F%C3A%03%00%0D%F0%05%B5_%C2%F1%D2%00%00%00%00IEND%AEB%60%82",
digg:"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%10%00%00%00%10%08%06%00%00%00%1F%F3%FFa%00%00%00%07tIME%07%D8%07%17%14%0E%12%3BB%D0%BE%00%00%00%09pHYs%00%00%0B%12%00%00%0B%12%01%D2%DD~%FC%00%00%00%04gAMA%00%00%B1%8F%0B%FCa%05%00%00%01%1CIDATx%DA%A5R%CB%89%84%40%10%AD%19%E6n%10%26%60%12F%E0%C1%0C4%26%BDy3%03%0F%06%20%98%82%E8A%F0%E0EP%F0%8B%DAC5%5BM%DB%ED%B2%C2%3Eh%0A%AA%EB%BD%FA%02%FC%13%AF%BF%02%E28f%AA%AF%EF%7B%F0%7D%9Fs%3F%E4%0C%82%40%04%D2'%C1u%DD%8B%40%18%86P%96%253M%F3%F5!%B2%E7y%FCs%DB64L%15%99%A6%09%96e%E1%EF%D2%82J%9E%E7%19%86a%80%24I%C00%0CQA%D7u%9C%BC%AE%2B%A4i*%FE%DE%A4%24%93%C7q%E4%3E%C7qD%26%22S%05%96e%F1Y%88%19%C8d%0A%3A%CF%93%07a%CF%BFA%08%C8%E4%E38%B8%0F%ADm%DB%20Wy%BBFy%03%04%B5%FF%7D%DF%F9CQ%B48%07%0D%AA%10%DE%00%A2m%5B%D64%0D%AB%EB%9AUU%C5%8A%A2%60%18%8B%AB%7C%C3%03%C8%99%D1R%8B%97-P%F6%BBv%88%9C%E7%B9%26%A0%1D%D2%0F.%87D%99IL%13%40%E0%8Eq%CA%18%7CW%81%2C%80%EB%D5%04%A2(%D2%88w7%90e%D9%93%B1%3D%C7%17W%E4%06%18%0F%3F)X%00%00%00%00IEND%AEB%60%82",
facebook:"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%0E%00%00%00%0E%08%02%00%00%00%90*%BA%86%00%00%00%2CtEXtCreation%20Time%00Fri%2018%20Jul%202008%2016%3A31%3A09%20-0500%9E!%1E%04%00%00%00%07tIME%07%D8%07%12%14!%228Y(M%00%00%00%09pHYs%00%00%0B%12%00%00%0B%12%01%D2%DD~%FC%00%00%00%04gAMA%00%00%B1%8F%0B%FCa%05%00%00%00%7BIDATx%DAcL%AC%5Cs%EB%C1%1B%06B%40MA%84%99%5B%D6%89%A0%3A%20x%FB%E1%1B%0B.9Uy%E1%EE2O%11An%20%DB%26j%26%90d%C2%A5%14%AE%0E%0Ep%9A%8Al%1E%04%E04%15%130ZG%CE%40%13%3A%B2%2C%1DM%04b6%16%07%BCy%FF%15%EE%00%08%1B%A7%A9%C8f%93%E9V%12%94%B2pq%B2i(%89%E1%926%D2%96%810n%DC%7BEJ%60%11%9F%5C%00%08%3B%23%FE%CC%2B%BA%C8%00%00%00%00IEND%AEB%60%82",
flickr:"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%10%00%00%00%10%08%06%00%00%00%1F%F3%FFa%00%00%00%07tIME%07%D8%07%17%14%0E0%EE%22%91Z%00%00%00%09pHYs%00%00%0B%12%00%00%0B%12%01%D2%DD~%FC%00%00%00%04gAMA%00%00%B1%8F%0B%FCa%05%00%00%00%EEIDATx%DAc%60%18%05%8C0%C6%F1%3B%9F%FE%2F%3F%F5%16%2C%10n%26%CC%60%A5%C2%C7%88%AC%F0%FF%B1%C7%FF%19V%5E%032%80%9CH-%06FKYF%B8%01%B5%EB%1F%FDo%DE%F2%0C%C5%E4j%1Fi%86%D6%40%88%A2%FF%D5%FB%FE3%B4%1EC%B5%BA%D6%86%81%B1%D9%81%91%F1%18%D0f%AB%F6k%98ncbd%B8R%AD%C5%A0%F9%FE%2B%03%93%E1ld%C7%22%C0%86%10%06%A6%25%C7%DF%E0%F4%DF%DE%8B%EF%19%FE%ED%B8%8B%3B%00%B6%DEa%60%A24%10%99b%2CEpJ%3A%EB%0B20y*%E3%D6%ED%AD%C2%C0%04%0A%ED%3A_i%0C%B9%1A%2F)%06%1D%05%5EFf%03%09F%86jkL%CDu%C0%40%0C%D0%60%84%87%CC%A6%F3%EF%FEo%BF%F2%01%1CT%EE%3A%02%0C%FE%86B%A8%D1%B8%F1%E6%7F%86%9D%F7%80%0C%60%3C%02%5D%C5%E8%A7%8E%25TG%26%00%00%9D%7DDW%01q%E6%BE%00%00%00%00IEND%AEB%60%82",
friendfeed:"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%10%00%00%00%10%08%02%00%00%00%90%91h6%00%00%00%2CtEXtCreation%20Time%00Fri%2018%20Jul%202008%2016%3A31%3A31%20-0500%23AW%80%00%00%00%07tIME%07%D8%07%12%14!%16%19%ED%DC%F8%00%00%00%09pHYs%00%00%0B%12%00%00%0B%12%01%D2%DD~%FC%00%00%00%04gAMA%00%00%B1%8F%0B%FCa%05%00%00%01%2FIDATx%DAct%AE%3B%CE%40%0A%60%01%E2%5C%3F%0D%22UO%DEt%83%05%99%FF%F3%F7%DF%D7%1F%7F%02%19%7C%5C%AC%40%04%11%FC%F4%ED7%10%01%19%A2%FC%ECP%1B%80%E0%ED%E7%9F%07.%BEx%F6%EE%3B%5C%B3%94%10%A7%08%3F%C7%B3%B7%DF%DE%7C%FA%89%EE%24%A0%EAU%87%1E%FC%F9%FB%9F%95%85%89%9F%1Bd%CC%B7%9F%7F%80%9A!%FA%B98X%B9%D8A%CA%3E~%FD%F9%FB%CF%3F%10%0Bh6P%B5%9C8%9F%91%AA%18%DC%A4s%B7_%3D%7F%FB%C5FW%1Ab%04%04l8r%87%09H%01M%02%1A%83%AC%1Ad%DE%97%9F%CAR%02%C8%AA%816%20%FC%00%B1%14%E2%98%FD%E7%1F%01%19%40%DB%95%A5%05%20%82%8F%5E%7D%3Ew%EB%25%D0P%A8%06%11~N%B8I%BF%FF%FC%85%B3%F9%B9%D9%E0%B6%01%D5%20l%00%3A%14n%2FP52%17%02t%95D%80%E4%91%CBO%DF%7C%FC%CEDR4Cm%00j%05%1A%0C1%06h%EF%E5%7Bo%E0%06C%9C%07%14%01%8A%23%9C%04%B4%08n%00%D0%AFp.%90%0D%0F%1F%B8%20v'I%0Bsa%0A%06Z%C9%E1%D4%80%070%92%9A%BC%01%A0%C6%90%E8ME%CB%FB%00%00%00%00IEND%AEB%60%82",
goodreads:"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%10%00%00%00%10%08%06%00%00%00%1F%F3%FFa%00%00%00%04sBIT%08%08%08%08%7C%08d%88%00%00%01%93IDAT8%8D%A5%93%3FhSQ%14%C6%7F%E7%FA%8A%82%BE%F7%921%92%18%E8bPb%0A%FEA%C9%A0%B3%A3%E0%20q%D3%14%AA%5D%2C%88%AEJ%17'%5B%1C%AAHA%08%9AQ%11D%1DD%D4vriH%1A%D3t%89%09%CD%9C%3FX(%9Aw%1D%92%26%F7%19%03-%B9%DB%F98%E7%BB%DF%F7%DD%7Bd%FBWC3%C6Q%E3%0C%03(%91%F18%2C%A5%0E%D0%E9x%7D%40D%A8%D7%AA%3C%98%BBE%B9%98'%14%3E%86%ED%B8%B4%5BM%5E~%F8%D6%EB%1A%B8V%DA(D%14%96u%90%BB%E9%EB%C4%E2%09%BE%96%EA%A4%D2%B7)%17%F3%C6%A0%3F2%856%00%81%CD%1F%EB%D4k%3F%99%BD%FF%10k%E2%10WR79~%F2%D4H%0B~%05%08%1B%85%1C%B6%1B%C0v%83%88%08%A2%14%B1%F8%14%22%23%08LE%22%02%02%8E%1B%F05%B5%5B%CD%D1%0A%FC%9E%04%DB%09%B0U%AD%D0n6%FAh)%9F%EB%FAcX%86%D2f%06h%CE%26%2Fb%BB%012%CF%16%01%C8%3C%5D%A0%5E%AB0%B8%C8O%E2%FB%04%9E%E7q%D8%B6%99%7F%B2%CC%A7w%AF%B90%19%E4M%F6%05G%23QB%E1h%97%E4%1F%11%96Yh%ED%F1%E7%F7%0E%893%E7x%F5q%05%AD5%22%C2%F4%D5%CB%1Cq%1C%BA1%0Bf%F0C%DF%B0TX%E3%D2%89%08%9F%DF%BFEk%8F%EF%AB_(%AF%E79%7D%3E%89H%2FhC%86%FCo%99%B2%CBK%3C%7F%FC%A8__%BB1C%FA%CE%3D%23%03%E3%E9%87%09v%D9%F7%B6%A4%D60%B4%BF%ED%FE%0B%EA%B2%81%08%E1%14%F15%00%00%00%00IEND%AEB%60%82",
identica:"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%10%00%00%00%10%08%02%00%00%00%90%91h6%00%00%00%07tIME%07%D8%07%12%10%13%09~%9C-%A0%00%00%00%09pHYs%00%00%0B%12%00%00%0B%12%01%D2%DD~%FC%00%00%00%04gAMA%00%00%B1%8F%0B%FCa%05%00%00%00%93IDATx%DAc%944qd%20%050%91%A4%9A.%1AX%D0%F8%1C%ECl%CA*%D2F%06j%40%F6%B9%0B%B7%EE%DEy%FA%E3%E7%2F%9C%1A%80%AA%5D%5DL%B5%B5%15!%5Cii%D1%ABW%EF%EF%DEs%1AY%0F%8A%93%80f%C3UC%00%90%0B%14%C4%E9%07%88K%D0%00%9A%20e%A1%04%F4%25%A6%0A4A%14%0D%C00%01%FA%12Y%04%C8%05%0A%22%8B0%F3J!%7C%F9%E7%EF%DFG%8F%5E%BE~%FB%81%87%9B%F3%F3%E7o%07%0F_8s%E6%06Z%B02%0E%83%B4%04%00%D8m8%E9%16%02%85F%00%00%00%00IEND%AEB%60%82",
ipernity:"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%10%00%00%00%10%08%06%00%00%00%1F%F3%FFa%00%00%00%2CtEXtCreation%20Time%00Tue%2012%20Aug%202008%2013%3A21%3A23%20-0500%C1%3B%81%B3%00%00%00%07tIME%07%D8%08%0C%11%15*%B9%F5%26%1E%00%00%00%09pHYs%00%00%0B%12%00%00%0B%12%01%D2%DD~%FC%00%00%00%04gAMA%00%00%B1%8F%0B%FCa%05%00%00%01%F3IDATx%DA%85SKh%13Q%14%3D%D36i%02Q0-%EA%40%8D(%C5_6%05%11%11%91%8A%9A%ADk%17j%11%5C%B8%90%40QWv%A7.L)%D4M%A9q%EBRS%ADV%A1J%AD%BBnb%1C5!%15%F1W%DB%D0%A6%0Di%A6%CDL2%999%BE%CCB%9D%C4v%CE%5B%5C.%EF%9D%F3%DE%B9%F7%3E%09.%98Z%1E%A1%AA%E7%11%F0u%E0t%E7U%A9q%BFe%23%E2t%E1%3Eo%A4vS)N%40k%5D%C3%A7%E2%24%AE%A7B%9C.%8C%D2%EDR(%EA%04%FBS2S%EA8%FF%85%A2%3Eg%FF%BB%9DL%96%C66%17%19%9C%3D%C5g%8B%B7mR%CDx%C4%F5r%9F%88%8F%ED%FC%E5%D2%20%EFf%7Bi%D1d%93%85%95%DAO%3E%F8q%919m%16G%82%17%00~A%C5x%82v%EF%15%E8%C6C%91%7F%C6%E1m%E7%A0I%ABP%CD%BC%B3%06_%B5%19%C6%D2'Q%B3tD%0F%8EcG%5B%08%E2%16A%D2%C5nED%D3%3En%8AHZ%CE'%AF%9A9%DE%FCx%80%89%DC%00%1Ba%18c%C2%C2%25a!a%E7%2F%96b%8C%09%8BB%E4o%1D%EA%C4%A1l%84n%98%AF%A6Eg%F6%F0%7D%E9%E9%1F%B2m!S%7C%8D%13%F2e%D7%EEX%E2%E9%1E%9F%1F%B2%FF%90s%0Ej%D0%B1%AB%BD%C7U%40%F6%EEG%80A%CCk%99%86A%92%24%98B%C6%0D%AC%2F%C9%12%A4%16%A7%80%0F%5B%F0%AD%3C%E3*%B0PM%A3%2C%15%D0%E5%0F%3B%05z%82g%F1fa%14U%ACo*0%95%1B%81%EC%09%A3%D3%B3%B7%E9O%E0V%E6(%E3%DF%CF%D3%60%E5%BF%1Dx%B5%7C%8F%D7%92%5D%9C%AB%7Cp%8C%B1C%E9N%F6%18-%CB%C2%199%8A%EE%C0q%B4J%1E%FC%D2%14%BC%5D%8CcnMA_w%1C%E1%40D%DAP%A0%8E%C9%FC0%93%2B%09%E8%2C%D9Ek%83%17%FB%B6%F6%22%B2%3D%8A%0EO%A8%E9%FCob%1BOj!L%9B%82%00%00%00%00IEND%AEB%60%82",
lastfm:"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%10%00%00%00%10%08%06%00%00%00%1F%F3%FFa%00%00%00%04sBIT%08%08%08%08%7C%08d%88%00%00%02xIDAT8%8D%9D%92KH%94a%14%86%9F%FF%9Bq%A6%1Cgpt%AC%EC%A2%99iAETZ!%95%09)%15%A2A%97M%04Q%9B%16-%DA%B8%09%BA%08%D5%A2%82%84%22i%13%B5i%15%AD%8A%CC%5D%D7E.2s%A4%8B%98e8C)2%8Es%F9%2F%DF%7F%DA%8Cf%B5%08%7B%E1%5D%1C%9Es%CE%E2%9C%D7%D0%7D%3D%3B%F4%9D%8E%2B%7C%8Anf.%AAZ%F3%DAs%F4T%9B%919%DC%10cb%7C%D1%9C%86%A7%15.%8E%1B%C9%A6%B5%F2_%C39ymG%CF%14%02Hn%9Da%801%ABQ%007%C7%D4%2C%E6%B5l%8D%0Bd%B5KJ%0B%C6%922%24%93%C631F%C0%A3%C8S%06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%C7%7F%02%07%C0nKM%B5t%F7%00%00%00%00IEND%AEB%60%82",
linkedin:"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%10%00%00%00%10%08%02%00%00%00%90%91h6%00%00%00%2CtEXtCreation%20Time%00Fri%2018%20Jul%202008%2016%3A31%3A57%20-0500%86%FEk%3D%00%00%00%07tIME%07%D8%07%12%14%20%3BE)%B1%CC%00%00%00%09pHYs%00%00%0B%12%00%00%0B%12%01%D2%DD~%FC%00%00%00%04gAMA%00%00%B1%8F%0B%FCa%05%00%00%01%F1IDATx%DA%95RK%8B%13A%10%AE%9EG%9C%CD%3A%C9%905%91%CD%25%E2k%83%17%C5%837%BDxP%BC%E8Yd%05%AF%1E%3C%F8%03%BC%FA%1B%04%0F%3E%10%16%FC%07%82%82%5E%7D%90(dU%D0%154n0%CEvgfv2%D3%2F%AB'%D9M%5C%BCX%14E%15%FD%7DU_u7%B9%F9%F8%D9%93%CE%2Fi9%04%E6L%03p%00%09%20%0A%E7%26ZR%5C%BDTw%1Ev%C3%CB%E7O%1F%3DX%FD%0B-%0A%B4%DC%E1HPB%7F%FC%BA%F5%E8%E9%07%0B%1B%1F%AEW%10%E6%D9VP%B2%FF%89F%B7%149%BE%1C%80%10%0EB-%C3%82%5B'%0E%20%E7%C1z%B8A%F3%3D%E8Ink%3D%25p%A5%3D%9B%20%1As%07%08%CF%F5%DE%09%26%CA%C2%B9%83%12X.%99%86%BBo%07K%AE%D3%DDLg%BB%EE%A2%850h%8C%82%9B%094%93-%AFt%E5P%15%17%D0%1CZ~%A9Uu%BF%85%BC%D7%1F%9F%3D%B2%B8%E8%92%97%3D%F6%EA%FD%EF%82%80%92%14%B0D*G%B7k%1E%92%DF%FDH%9B%BE%D3nx%2B%0D%EFB%DB%9F%5C%5B%BB%B9%B0%1D%A5%CF_%0F4%17%16N%A4%89%8CS59%1Bg%0A%1B%A1%25cu%E3%DE%97sw%BA%9B%5B9%96%2B%CD2%A5%A8%96%1B%02%8Be2%23h)q%2FX%EF%A7o%3ES%C6%D2%EF%C3%14%CBz%C5e4)v%40B%24%E3%F2%94%90%99%09%86%20%A4bt%1B8%17%5C%9ARH%16%26%E6%0D%E0%3F%CDL%A0%23%19%EF%97%BB%92%84P%93%96Ft%96OK%AEhd%96!%FE%F5%B5%A8q%ACj%D9%A7%1A%0B%F8%C96~%26%81%AB%82%92%A6%2C%ED%F4%86%90%E7'%5B%E5%C0%23%88%EE%7C%0A%7D2%20%FE%B5%B5(%AA%C1%F2%12d%80%C7%85g%26fs%F9%8E!%C1Y%BDX%BB%FFb%1F%E7D%86%C3J%D6%2Fnt%A4%E3%D1L%F5%DC%BF_%BD%7D%E6%0F%D7%C89%D8%ECK%D0c%00%00%00%00IEND%AEB%60%82",
magnolia:"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%10%00%00%00%10%08%06%00%00%00%1F%F3%FFa%00%00%00%07tIME%07%D8%08%0C%110%1B%00%D8%F6%C3%00%00%00%09pHYs%00%00%0B%12%00%00%0B%12%01%D2%DD~%FC%00%00%00%04gAMA%00%00%B1%8F%0B%FCa%05%00%00%031IDATx%DAeS%DBk%D3%60%14%3Fm%9A4MZ%5B%B34k%EB%D6u(%B5%CC%CB%B6%BA%1B%08%0A%0A2%2F%20%F8%20%0A%A2%3E%8A%EF%82%E0%83(%88%F3%3F%10%F4I%04%7Dt%CC%CB%1C*(%22s%EA%DC%E6%9C%5D%DD%ECZ%D7%2C%CB%BA%D8nm%D3%5BRs%AA%15%D1%0F%0E9%DF%EFr8%DF%97%EF%98%E0%F7*%14%0A%94%A2(%5C*%95j(%95JV%86a%F2%82%20%C8%C8%C9%B2%2C%E4%F3y%86%A2%A8%22%CF%F3%AB%1C%C7)4M%97%90%B3%D4%0B%88%A2%E8U%95%B1%17%5E%DE%BA%A9%8E%A5%92%F3%CF%F1%EBvV%F6%03%F3%0B%93%C5%99d%A1%D0%B3%CFH%E3%B87%D7%C5S%13%A3%C7%1A%DDl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CB%D7%9F%23K%CA%86%2B%BD%BD%BDoM%D8b%22%91h%1A%1F%1F%EF%CC%E5%D6%1B2i%C5s%F2h%E0%1A%C3%F5%81*%25j%97h%F3%F8!%AF%8C%C2%BD%C1%85KN%17'%B1%ACc5%1C%0E%7F%F4%FB%FD%8B%A6%FA%934%86%C5j%CC%C3%26I%92%3C%E5%F5%A9%BB%DB%DBZ%7D6%5B%80DNU%17%CA%D331%91t%EC%3C%E5%F1x%24%9F%CF%974%86%AD%88%DC%9F%02%F5%95N%A77%0C%0F%0F%F7'%16%3E%9D8w%BA%F7(b7%EF%BC%1D%F4%07v%DC%EF%EF%EF%1Fv%B9%5Ck%7F%EB%FF%2B%F0%7B%7Cy%E3%7D%84%A2%D1h%10%F7%C1%600%1A%0A%85%22%C6x%A7%FE%D5%FE%04%E6%A1%8E%CD%8Dj%C5%E3%00%00%00%00IEND%AEB%60%82",
mixx:"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%10%00%00%00%10%08%06%00%00%00%1F%F3%FFa%00%00%00%04sBIT%08%08%08%08%7C%08d%88%00%00%00%8EIDAT8%8Dc%FC%FF%FF%3F%03%25%80%05%99s%CD%D1%E3%2F)%9A%B5%F6%EF%60%86%1Bp%CD%D1%E3%2F%3F%1F%3FI%B6%AF%96T%FC%CB%82.x%FF%D6-%92%0Ca%22I5%16%C0%C2%C0%80p%3E%CCv%EBk%E7%F0j%3A%AAe%84p%01%BAfR%01%93%D6%FE%1D%CC%1F%3F%7DdPTS%C3k%132%1B%C5%00%06%06Ht%E02%84%A0%0BH%D6Am%03%18aI%99%9C%C0%7C%FE%E1%C3%60%F2%02%03%03%24m%93%A29%F4%F9%7DfFJ%B33%00%AB%DB%3C%3A%E7%20%0C%9B%00%00%00%00IEND%AEB%60%82",
myspace:"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%10%00%00%00%10%08%06%00%00%00%1F%F3%FFa%00%00%00%04sBIT%08%08%08%08%7C%08d%88%00%00%01xIDAT8%8Du%93%3Bn%231%10D%9F%0D%07%CA%88%85n%60L%E6%B07S(%DFA7h%DE%C0w!o%20%EC9%9C%A9o0R%BA%91%602%1B%60%83%DE%80%9A%AFw%0B%18%F0%83%AE%9A%EAj%10ww%FFS%7C%89R%8A_.%EE%D7%EB%D5K)%5EJqM%17G%D4E%92kJ%5EJ%E3%3C%B9%BB%D7Z9%F7%3D%98!%AA%E4l%E4%9C%01H%AA%00%C4l%C0%0E%F8%04%0E%24%7DCUx%01%B8%DF%EF%C4h%80%910r%FC%85%88%60%406CDh%18%80%030%60f%D4%DA%F1%0C%F0%F5%FAJ%2Bo%85%A2_%D8%83%D2n%0C%EC%F7Bd%16%7D%01%E8j%9D.%DE%DF%7F%20%92%889%23%80%AA%82%80Y%063%0CA%10N%A7%0E%80'w%F7%183%D9v%C0%80%00%A2%60%0F%0B*s%F1%C7%B9G%60%3A%87%10%9A%C0%CFh%D8%C8%C0%1E%7D%8E%18P%15%2C%DB%A2-C%93r%EA%BA%EF%0EZ%D23y%8D9'%80%94%A4%85h%C8%A2xX%7C%5B%1CV%3F%B0hM%A0M%C0%26%A9%FFc-l%3CB%BC%DDn%EC%F7%7B%FA%3E%10s%9E%02%DCZ%DEB%C4%9A%00%40%AD%15%80%E3%F1%3C%855%DB%FDW%3BM%FAy%3C%84%10%08!%80%CC%ED%C0'b%DB%60%97%EEX%3B%08!%ACV%80%E3G%BF%18%F1%12%3BD%86%B5%83%91%BC%B69%3E%A2-%060%9B%05%B6%E4q%BF%1E%F1%D2I%0B%F8%2F%E7%B1%ED%AA%D6%DE%A3%22%00%00%00%00IEND%AEB%60%82",
picasa:"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%10%00%00%00%10%08%06%00%00%00%1F%F3%FFa%00%00%00%04sBIT%08%08%08%08%7C%08d%88%00%00%01%BEIDAT8%8D%95%91QHSQ%1C%C6%7F%9B%97%5DY%94Sd%14B%0D%82%E1S%5DQ%D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PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%10%00%00%00%10%08%02%00%00%00%90%91h6%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%0AOiCCPPhotoshop%20ICC%20profile%00%00x%DA%9DSgTS%E9%16%3D%F7%DE%F4BK%88%80%94KoR%15%08%20RB%8B%80%14%91%26*!%09%10J%88!%A1%D9%15Q%C1%11EE%04%1B%C8%A0%88%03%8E%8E%80%8C%15Q%2C%0C%8A%0A%D8%07%E4!%A2%8E%83%A3%88%8A%CA%FB%E1%7B%A3k%D6%BC%F7%E6%CD%FE%B5%D7%3E%E7%AC%F3%9D%B3%CF%07%C0%08%0C%96H3Q5%80%0C%A9B%1E%11%E0%83%C7%C4%C6%E1%E4.%40%81%0A%24p%00%10%08%B3d!s%FD%23%01%00%F8~%3C%3C%2B%22%C0%07%BE%00%01x%D3%0B%08%00%C0M%9B%C00%1C%87%FF%0F%EAB%99%5C%01%80%84%01%C0t%918K%08%80%14%00%40z%8EB%A6%00%40F%01%80%9D%98%26S%00%A0%04%00%60%CBcb%E3%00P-%00%60'%7F%E6%D3%00%80%9D%F8%99%7B%01%00%5B%94!%15%01%A0%91%00%20%13e%88D%00h%3B%00%AC%CFV%8AE%00X0%00%14fK%C49%00%D8-%000IWfH%00%B0%B7%00%C0%CE%10%0B%B2%00%08%0C%000Q%88%85)%00%04%7B%00%60%C8%23%23x%00%84%99%00%14F%F2W%3C%F1%2B%AE%10%E7*%00%00x%99%B2%3C%B9%249E%81%5B%08-q%07WW.%1E(%CEI%17%2B%146a%02a%9A%40.%C2y%99%192%814%0F%E0%F3%CC%00%00%A0%91%15%11%E0%83%F3%FDx%CE%0E%AE%CE%CE6%8E%B6%0E_-%EA%BF%06%FF%22bb%E3%FE%E5%CF%ABp%40%00%00%E1t~%D1%FE%2C%2F%B3%1A%80%3B%06%80m%FE%A2%25%EE%04h%5E%0B%A0u%F7%8Bf%B2%0F%40%B5%00%A0%E9%DAW%F3p%F8~%3C%3CE%A1%90%B9%D9%D9%E5%E4%E4%D8J%C4B%5Ba%CAW%7D%FEg%C2_%C0W%FDl%F9~%3C%FC%F7%F5%E0%BE%E2%24%812%5D%81G%04%F8%E0%C2%CC%F4L%A5%1C%CF%92%09%84b%DC%E6%8FG%FC%B7%0B%FF%FC%1D%D3%22%C4Ib%B9X*%14%E3Q%12q%8ED%9A%8C%F32%A5%22%89B%92)%C5%25%D2%FFd%E2%DF%2C%FB%03%3E%DF5%00%B0j%3E%01%7B%91-%A8%5Dc%03%F6K'%10Xt%C0%E2%F7%00%00%F2%BBo%C1%D4(%08%03%80h%83%E1%CFw%FF%EF%3F%FDG%A0%25%00%80fI%92q%00%00%5ED%24.T%CA%B3%3F%C7%08%00%00D%A0%81*%B0A%1B%F4%C1%18%2C%C0%06%1C%C1%05%DC%C1%0B%FC%606%84B%24%C4%C2B%10B%0Ad%80%1Cr%60)%AC%82B(%86%CD%B0%1D*%60%2F%D4%40%1D4%C0Qh%86%93p%0E.%C2U%B8%0E%3Dp%0F%FAa%08%9E%C1(%BC%81%09%04A%C8%08%13a!%DA%88%01b%8AX%23%8E%08%17%99%85%F8!%C1H%04%12%8B%24%20%C9%88%14Q%22K%915H1R%8AT%20UH%1D%F2%3Dr%029%87%5CF%BA%91%3B%C8%002%82%FC%86%BCG1%94%81%B2Q%3D%D4%0C%B5C%B9%A87%1A%84F%A2%0B%D0dt1%9A%8F%16%A0%9B%D0r%B4%1A%3D%8C6%A1%E7%D0%ABh%0F%DA%8F%3EC%C70%C0%E8%18%073%C4l0.%C6%C3B%B18%2C%09%93c%CB%B1%22%AC%0C%AB%C6%1A%B0V%AC%03%BB%89%F5c%CF%B1w%04%12%81E%C0%096%04wB%20a%1EAHXLXN%D8H%A8%20%1C%244%11%DA%097%09%03%84Q%C2'%22%93%A8K%B4%26%BA%11%F9%C4%18b21%87XH%2C%23%D6%12%8F%13%2F%10%7B%88C%C47%24%12%89C2'%B9%90%02I%B1%A4T%D2%12%D2F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%8F%2C%24F%E9%B7%93%EBo%DF%7B%C0%02%E7%10i%03%13%03%89%80%05%99c0%FD%02.u%172%0D%A8a%03%04%DC%9D%98%FE%F9%C6I%08%9BW%C3%5C9%7F%26E~%A0%BD%06%2C~%40s4%0Dlx%7Bd%ED%CF%D7OH%D0%F0%E1%EC.x%B0bw%12%F1%09%09j%C3%ED%7B%0F%20%9C%DB%EE%02%045%00%06%00N%D1%242%08%AB%04%BC%00%00%00%00IEND%AEB%60%82",
pownce:"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%10%00%00%00%10%08%06%00%00%00%1F%F3%FFa%00%00%00%2CtEXtCreation%20Time%00Fri%2018%20Jul%202008%2016%3A29%3A39%20-0500%C2%F7%86%D3%00%00%00%07tIME%07%D8%07%12%14%22%26%14%19%BF%97%00%00%00%09pHYs%00%00%0B%12%00%00%0B%12%01%D2%DD~%FC%00%00%00%04gAMA%00%00%B1%8F%0B%FCa%05%00%00%01%7FIDATx%DAc%94jd%FD%CF%40%26xV%FF%9B%91%05%C4%E8%F6%CF%60%60fd%60%60bdD%A3a%98%11C%3Eb%E9d%86%CE%CE%CE%FF%60%03%FE%FCc%60%B8%FAz7X%92%99%09%A2%88%05%0F%AD%24%E4%02w%05%D8%80%F3%CFw2%B0%80Lgb%60%E8p%BD%8E%D5%B9%07%EFu2%5Cz%BE%98%E1%1F%D0%C3%B7%DF%EE%86%8B3%81%88_%7F%FF3%FC%04%CA%80h%5C%C0%5E%A9%1C%2C%0F%C3%A8%06%FC%83%18%02%A2%F3%B7%AA%C3%25%ABvi2%D4%EE%D6d%F8%FE%E7%13%03%C4%22%90%DA%FF%60%1A%C5%0B%20%CD%20%E7%83%9C%C7%CC%84%90%84%893%40-%04i%06Y%CE%C2%84n%00P%82%19(%F1%0F(%C1%8C%E4%8B%1E%CF%1B(%DE%F8%0D%D4%FD%0Fj%11%16%170%02%25%80400%B1%81%0D%D7%DB%E0%16a%B8%00%14%80%2C%40%89%BF%8C%A8%92I%EBU%C1%06%B3%40%A3%17F%83%2C%C2p%C1%3FF%06x8%C0%00%DC%60%A08%0B%92%17%FF!Y%02fZ%C8%B8CC%F7%3F%98%F6%5B%AE%C4%10%B4R%19%CE%87%D1%3F%A1%B4%A6%98%2B%AA%0B%40)%D1%12h%C8%91%C7%3B%C1%CEsR%F4%04%BB%04%94%8C%D1%930H%EC%F7%3F%B40Xxd%1E%98%A3%20%2B%C5%E0%A6%EA%C50e%DF%1C%06b%018%C8A%99b%E2%8F%1A%86%1C%A7%14%B0%E6%7C%8E%16%D2%0C%00%01X%B6%0E%E3Me%90%FC-%CFP%5E%5E%CEH%8C%01%00%AAM%C0y(31%E1%00%00%00%00IEND%AEB%60%82",
slideshare:"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%10%00%00%00%10%08%06%00%00%00%1F%F3%FFa%00%00%00%04sBIT%08%08%08%08%7C%08d%88%00%00%02%89IDAT8%8D%8D%92Mh%94g%14%85%9F%F7%FD%BE%F9%92%F9%C9Dc%D3%9A%3F%B4%D0%88%B4!%92%B4%19%82%8B%EA%26*Dp%23%E2%CA.%C4e%E9J%0A-%E9B%5B%BB%D0%85%01%B1J%E9%22%8Bl%B5%E0%14%A4%B4%DD%D8(%0A%FELLT%14%EB%80%08C%CC%EF%8C%F3%F3%CD%F7%BE%EF%ED%22%252*%25%17%CE%E6r%CE%E1%5C%EEQ%C6%98%D6%DC%CC%EC%D5%C5%85%C5%8C%F64%EB%19%E7%84%D6t%CB%AD%81%1D%FD%FB%FCr%A5%92)%AE%143%C3%99!b1%7F%5D%06%D69%EE%E5%A63%2B%C5R%C6%17%11%12%898%C9d%02%A5%D4%BA%0C%00%D2%E94%22%8Ewg%16YE%C3J%DEI%7D%2B%B3%5B%7C%8C%7B%96E%C4%C3%EF%3B%82%0D60%F9%B4%C4%CD%F9%90%5Dm%01%87%B6%A5%1B%926%18%88%091%D7%BE%C1%16fpa%0D%B3%90'%DB%7B%82%2F%AF%BF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00%00%00%1F%F3%FFa%00%00%00%07tIME%07%D8%08%12%144%04_%B1%DCu%00%00%00%09pHYs%00%00%0B%12%00%00%0B%12%01%D2%DD~%FC%00%00%00%04gAMA%00%00%B1%8F%0B%FCa%05%00%00%02%3BIDATx%DA%95RMh%13A%18%7D3%3B%D9%FC%90%A6%26%B1%91%A2%89%0D%B1%1E%24H%F0%20(%EAE%10%84x%D0%93%1E%15%2F%22%1E%3DY%3Chn%82%E0%DD%A3%8A%8A%07k%83x%F1VA%ACH%89%A0PK%DB%A44m%FE6v%9B4%D9M2%E3%EC%26%A6-H0o%99%DD%9D%99%7Do%BF%EF%CD%23%E8A%AB%D6%8E%9Af'%2C%04%08%06%80%10%08UUV%03~%EF%82%3D%B7n%F3%99%DC%DD%AA%DE~%40%15%EA%1A%C8%96%10r%F0%0Eo%FA%7D%EC~%E2x%E4%11Y%CB%97c%1Fgs%F3%94%B4%BD%18%02%5C%B0%DA%F93%91%04%2B%14%B5%89%D55%DDC%60%0EA%17%F2ry%2C.3%0C%93%15K%3A%25h%F5%B7%C7%0F%F8%E0v%3B%F6P6%F5%06*%DA%F6.%01%93%1AF%90%B1v%87%A3T%DE%92%E6%B4%ED%ADD%FC%20n%DF%3C%87%F5%C2%A64%A8%EB%08%95%F2%A1%B1%11%DCK%CD%A0X%AE%F5%04%0CX%5C%D6jq%91%DF%F8%0D%97%B3%FB1c%14%C5%D2%16n%DCy%01E%A1%F6%9A%EAPp%FAd%14%2B9%0D%8Df%0B%9C%0B%E8%B5%16%0C%A3-X%D30%C9%A7%2F%8Bp%AA%14%1E%B7%8AC%E3%A3%B8u%FD%2C%9E%3E%B9%D6%AF%C0B%A5Z%C7%F4%FB%0C%96%B2%15%5B%A4%D3%01%CCV%9B%B0%BF%3D%C9%0C%C8%D1%C0%F3%D7s%C8%17t%8C%FA%DC%7D%B2%22%5Bx%9C%BA%82c%B1%10%BE%FF%5C%EF%05%A2%FB%60%DDw%ABT%0E%C19RS%97%10%0E%07%F0%EA%CD%D7%BE%80%E5%01%B7%12%B6%2B%24%04%CA%8E%00%88%9C%08n%C7%EC%F3%B7%2C.%5E%88%E3%C4%C3%CB%7BNaq%A9%84%D9%B9%95%9D8%91%9E%80%ECS%10%A2%CA%A5%8E%FD%87%E9%0F%3F%F0v%26%F3%CF%0C%13i%26H%D7XBU%CB%23%C1%1C%0EE%04%82~%0E%EE%A4%C3%24%91(%5EnqYh%BFkc2%EA%ABs%BEo%04B%FC'%5B%BAFy%DD%E2%B2%23%B1%89%85S%F1w%CF%B2%C5%B1%AB%AA%2B%E8!%94%0E%ACDH%A7%CD%86%B6%7D8%A4%BD%B4%B8%B6%AF%9A%A6%F9%D2%E9try97)%D3%A5%0E%12%60%0A5%A3%D1%C8%AFd2%99%0E%04%02%FA%1F%10%D4%E8%01Wb%1A%A9%00%00%00%00IEND%AEB%60%82",
squidoo:"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%10%00%00%00%10%08%06%00%00%00%1F%F3%FFa%00%00%00%04sBIT%08%08%08%08%7C%08d%88%00%00%02%E0IDAT8%8DM%91Mh%5Ce%18%85%9F%EF%E6f%F2%D7%26%A6%93%C4%065h%0A%06%2B%A2RT%C4%85%E2%1F.%B5%22%B1%1B%B1TT%C4%C6n%14%A1%A0%0B%17E%A4%E2B%0DUi%0A%ED%C6%D4jp%D3XWREk%0D%C51%94%24%22%9A%B4%CE%C4N231if%E6%DE%EF%7B%8F%8BNc%1Fx%17%07%0E%9C%F3r%08!H%26%C9%BC%CC%9B%12K%95%84%15%ADY%AA%F5%E5%A2%2C%04%25%16%94%9A%D7%E2%EF%C7e%96%C8%87T%DE%BC%BCyE%11%8E%3A%9E%80pM%8E%D8%C54G%9D%D8%F9%2F%C9%7D%BB%0B%17E4%BB%8807J%A58%8Fs%CD%D4%17NR%FE%E9C%92%CA_%E0-(%F5u%5Deq%E2Y%9D9%10iuv%5C%92T%95W%F9%B3!%FD%F06%92%A4%D9%7DhzbX%D5%F9cZ%2B%9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(%5B%93%2CQ%1A%AA%B2%10%14%AE93%93%0B%3EQ%F5%C2o%7C%7D%E8%3D%E6KEnZ-%F0%F83%2F%B3%E5%C9Wp%82%E0%1C%B1s%08%C75%B9%1B%FC%07R%3B2s%8DS%20%87%00%00%00%00IEND%AEB%60%82",
stumbleupon:"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%10%00%00%00%10%08%06%00%00%00%1F%F3%FFa%00%00%00%07tIME%07%D8%08%0C%14%1E%0C%8E%C7%B8%C3%00%00%00%09pHYs%00%00%0B%12%00%00%0B%12%01%D2%DD~%FC%00%00%00%04gAMA%00%00%B1%8F%0B%FCa%05%00%00%02%E1IDATx%DAe%93KhSA%14%86%FF%B97Ik%8C%ADVj%D2%DA*%15kDE%2B%BEZ%B0%15%A9%82%8F%EAF-(%EE%BA%D5%8D%E0V7%82%08.%7Cl%C4%85%A8(%C5%8Dh%F1%81%60M%A9%88E%B1%3E%09%ADQ%A9%26%8DM%9AW%F3%B87%B9%AF%F1Lr%AB%05%07%3E%EE%9C%B9s%CE%9C9%E7%1F%86%FF%07%23%24B%B6%BF%CC%5E%B7%08%D3%86%CF%DD%2C%86%830%84%ED%1F%5B%B7m%1A%D1%9EE%0Eo_%C6%13%F7%15%D5%12%A4%02%7Bi%C4%CC%11%B5%5B%B9B%7B%B2%842%1B%88%CD%3D%D9%FFem%BB%B3%D9%F5%3C%A9M%B9%0B%F9%02tMGI%2F%C12%AD%CAQ%8A%A4%A0%DD%EA%A2Y%98%C8%10%3A%9B%EB%AC%7B%D5%40%2C%1D%AB%D24%0D%86aP%9E%BC%E2h%D9%BB%12%0C%3F%B6%86K%2Bj%9Bv%93%F5%95H%B1%D9%B43%2C%3D%18O%FCv%D7%19-%F08%E7C%92%E5%F2U%99%2C%E1%A7%19%84Y%2C%D2y%C0%F4%CE%0C%EE%3D%FE%1C%3Fq%B0%F3%10m%18%17q%25v%93%9D%93%07%9D%3C%90%7F%C3%8B%96%C5%13%BAY%26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%CFW%5B9%86%93%92%00%00%00%00IEND%AEB%60%82",
technorati:"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%10%00%00%00%10%08%06%00%00%00%1F%F3%FFa%00%00%00%04sBIT%08%08%08%08%7C%08d%88%00%00%01fIDAT8%8D%A5%92%3F%2C%03a%18%C6%7F'%3D1%5Cs%D144%15%D5Hh%08%89E%A4%CA%C4%20%065XLX%C4%22a%B4%B0H%CCb6V%9A0%F4%96F*b%B8%26%17%B16%82I%A4%95%3B%A44nP7%9C%01%D7%D4%F9S%3C%D3%F7%E5y%9F%DF%F7%E6%FD%5E!%96%E2_%F2%00H%A2l%9BV%89%90%D4%C9%CE%C8yUA%26%9F%E0%A8%B0%CB%FD%F3%0D%00%8D%F5ML%84%E7%896%8F3%A4%08%82%07%B0M%AB%04%C0ld%B5*%BC%A0%0E%92%2Bj%AEWU%5Da8%10'%1B%B7m!%96%C2~%EB%82%FD%F1%07%A7h%E5x%12UW%BEm%7F.%B2J%DD%FB%25%EC%EDv%8C%BB%A7%EB%1F%C3%00%87%85d%05%F0%17%15%CBF%05p%F9x%EA%18%FE%86%20%3D%BE%E8%8F%80%B1%D6%99%0A%C0%B4Jd%F2%09%C7%5C%EF%DF%23%24u~%19%EE%F1EY%EA%DD%C4%19%22%F0%E97n%9F%ADqr%7B%40%AE%A8!%892ao7%A3-%D3L%B5%2F%02T%03%00%86%03q6%06j%DF.%D7%10U%5DA3%D25%855%23%FD%BA%89%1F%D5!%F79%E7L%3EA%9B%D4U%E5gu%85%C3B%92b%D9%F8%1C%E0o%08%A2%19i%B6r%CB%5C%99%17_v%20%89%B2%1B%20%89rM%5B%F8.%D7%10%7F%23I%94%A9%03%84%BF%02L%AB%24%BC%00%1C%B7r%E2%85%C83%A6%00%00%00%00IEND%AEB%60%82",
twittad:"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%10%00%00%00%10%08%02%00%00%00%90%91h6%00%00%00%07tIME%07%D9%01%1B%0E%15%2B%D2%0A%2C7%00%00%00%09pHYs%00%00%0B%12%00%00%0B%12%01%D2%DD~%FC%00%00%00%04gAMA%00%00%B1%8F%0B%FCa%05%00%00%02%1AIDATx%DA%8DR%CFk%13A%14~%B3%B3%3F%B2%9BM6K%AB%B5X%A5!i%A3%8D%04%95%14%3C%88P%8A%E0%C5%8B%E2%9F%A0(B%2F%FE%0D%C5%FFA%11%EAA%3C%08z%10%3CX%BC%A4xh%A1%B5%22J%B5I%ADI%B5%A6iCb7%B3%BB%B33%BBfM%C1%26%F1%E0%C70%0Co%DE%F7%E6%7B%F3%3E%14%04%01%FC%0F%1A%05%40%83%60L%08%FDW%ED%02u%E2%D5%08%FD%1Br~%F1%8Db%A3%F0%B0%7D%14%7B%B2%5D%2Fx%B2%BC%F6%A2%B8%91%88%A97sc%97%92'%C2%A8%12%05%D6t%D4%11h%BE%EB%22p%E6%DDy%F9f%A9%DA%B8%96%3B%7D99%7C%BF%F0%9E%DBl*%A3%01%98x%FC*%5D%99%87%D6%8F.I%8FV%BF%AC%EC%B6%8C%B8~o2%5B%9E%7B%10!%D6%EC%87O%F6%EB%19%D8%7C%06%89t%1C%BB%A0(!%81%B1%3F%3A%99%FB%F4%F3%BA%82%15%E0%DC%A7%01%93%04%EA4*%FEP%C9%A3%B0%F9%FC%E0g%02%14%12%16%B7%BF%B7%F7%3D%E2%EF%EC%07%BA%2Cp%06%B3o%97*%93%D3D7%C1%B1%16%9C%2C%1C%CF%23%B7N%1C%0E%D4%16%5D%80%C7%CBk%E5%BAE%18%D5d!%60TGt%FE%DB%B6%A6j*%C82%DF7%87%A7%E0T%1E%08%F58%05%C2%C4%AD%00%16%AB%7B%1F%1BDA8*%89%8A%80%5D%A4%0C%8A%24%08%3C%00I%02%2F%97%BD%00%10%05hF%8Ef%60%20)%A6%10%9C%8CE%AA%002%88%BA%A9%B7%B4%98%84%FC%60%EB%2BP%DF%C6%E8%88%A2e%CCH%A8%5E3%A2c%D3%60%18a%0Fw%F39%D2t%FDh%C4%8D%0D%20%5Df%09%13%0D%8Dr%2CY%0E%B9u.%8D%11%EE4%AC%1B%C6%C1%E0%AE%8C%8F%96j%3Bs%C5%5D%8A%05%C1%8F%7B%DC%B5%3C!%E6%E3%DB%D9%D4%F53%E9%9E%C9%A2%8E%97%7C%0E%AF%D6K%0B%E5Z%8Dr%05YgQs%22s%FEb*%8D%FA%8C%83%0E%9B%EF%A7e%DB%C4%C3Ve%C4Z%15r7%C2%BE%FA%D0e%8Dc%BA%0A%ED%25%2B%E0%A9%FF%CC%EE%7D%E1%10X%BF%2F%3B%F8%0D%FF%5C%E7l%C4%9A%E1%96%00%00%00%00IEND%AEB%60%82",
twitter:"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%10%00%00%00%10%08%06%00%00%00%1F%F3%FFa%00%00%00%01sRGB%00%AE%CE%1C%E9%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%07tIME%07%D8%04%04%130%3AOq%F7%1D%00%00%01%C5IDAT8%CB%8D%931n%14A%10E_u%F7%CE%8C%BC%16%06i%850%98%00H8%80%03%C4a%B8%01%24H%04%5C%80%0B%90s%1F%0220%22%D9%C0%01%F2%CA%D8%96%01%AFwf%BA%3E%C1%CC%8Ef%BD%81)%A9%B2%EA%FF%EB%FF%FAm%F4%D5%E4%AC%3A%3B2%23%20%82%19UJ%C6-%95%00%5C%D2*g%E6n%9C%B5b%1A%8D%E7%13%C8%EE%8A!%D8%AD%00H%5C%3A%7C%5D%B5T%C0q%0B%B3%90x%80%F3_%1B%00%D4%12%BF%B2H%C0%0A%C8%80%C9%B9n%1Au%24%60f%C4%60%A4%18m%0B%C0%81%BF.%26%06%AD%E0%5B%9D9%8D%01%EF%DE%02%60%88%87%09%EA6%ABH%1DH%02%08!%D8%FC%BA%D1%1F%17%133%0C%F1y%D9%8E%04%D8%00%93%80%D7%F7%AAm%09%19%B8%14%14%08i%D8%1A%CC0%09%10f%C6%22%3B%0B%D7%8D%2B%B8%EB%C7*s%EEN5%22T%BF%F6z%BC%95xZ%04%9EL%C2%26%80%01%19q%E1Ne%C6U%16o%EEV%1C%96%89%954%08%C8%88Y%8C%14%A3%D3%A6%B5%C4Z%B0p%B1k%F0%DB%C5N0%A6%26%EE%A4%08%BD%24%07%D2%8D%5C%84%3E%06L%80%13%17%C7.%E6.%BE7N2%90%7B7%20%81%3B%AE%91%01c%13%1FO%8C%C2%8C%A3%2C0xw%BE%E44%97%1C%C4%40%BBf%07%5EVi%23H%C3%3A%CA%AD%3E%5C%D4%BC%3F%BB%82%D8%9B%B4A%26%90%B1%1F%8D%2F%07%7B%EC%17%5D%0E%06%3B%DD%02o%F7J%5E%ED%96%D0z%E7Z%B0Q%07%88%C6%CF%D69j%F2%A6%07%001%04%8B%06%9F%EE%EF%F0q6%E5Y2J%89R%A2%EA%1B%17%2F%AA%C4a%19%B7%25%0C%81rWn%1B%96DN%5C%F8hH%C0%A3h%14%06e%FF%D5%FF%01%A1%04%E2H%F5pm%1A%00%00%00%00IEND%AEB%60%82",
youtube:"data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%10%00%00%00%10%08%06%00%00%00%1F%F3%FFa%00%00%00%09tEXtX-Index%000%B4%C3%9Cb%00%00%01%DEIDAT8%8D%9D%93%BFK%23A%1C%C5%3F%1B%13t%89%26%D9%84CD%F0%C7%0A%8AX%84%10%82p%9C%8DX%09%DA%ED%7F%20%D8X%9B%CA%CE%26%85%BD%85%B5h'%DA%04%12%B0%97%60%AD%85A%9BD%E5%B2%88%AB%20h%7CWL%12%F7%8E%93%93%7B0%EC%CC%EC%CC%E3%F3%E6%3BcI%12%80eYH%EA%7D%BF%AA%08%40%BD%5E%07%A0T*%11%1E%7FI%EA%A8X%2C%0A%90%E7y%F2%7D_%AE%EB%0A%90%EB%BA%EAP%AAV%AB%C9q%1C%85%D53%F0%7D%BF%B7H%92%5C%D7%95%EF%FBr%1CG%95J%E5S%83H%97%C4q%9C%7F%D2V%AB%D5%CF%23%841%FF%16!%9F%CF%0B%D0%1F%5Bdu%AB%F0%BF%8A%02pt%04%C5%22%FClA%22%0E%99o%D0%D7%07%91%084%1B%90L%C1%EC%2C%E4%B2%F0%FD%07%24%93py%09%9E%D7%E1%19%19%91..%3E%B8ff%A4TJ%02%E9%F1Q%CAfM%7FzZ%1A%1B%93%0E%0F%A5%CD%CDP%15%F2y)%163%9B%97%97M%5BY%91%0A%05%A9%5E%97%8E%8F%A5%F9y)%9D%96%F6%F7%A5%B99ia!t%06%85%02%9C%9F%C3%D3%13%E4rpz%0A%E52%8C%8E%C2%ED-%AC%AE%C2%D9%194%9B%B0%B8%08%ED6LMA%BBmn%22%12%D86%C4b08%08%D7%D7f%F1%DD%1D%C4%E3%B0%B1%01A%00%C3%C3%F0%F2%02%EF%EF04%14%3A%C4%AEI4%0A%96e%8CZ-%98%980s%03%03%D0%DF%0F%E94lm%81%EBB%26%03t%DE%02%B6%CDoF%B6%0D%3B%3B%F4%FE%ED%ED%C1%EB%2B%9C%9C%C0%C1%01%AC%AF%9B%B8%3D%82%C9Ixx0%F9%9E%9Fam%CDD%B9%BF7%E5%DC%DD%85%AB%2B%B8%B91%B1%CAeXZ%02%E0%E3%22moC%A3a%F0%83%C0d%B5%2CC%F1%F6%06%89%841%0D%02%18%1F7Q%80_l%3FY%F2%0F%FA%98e%00%00%00%00IEND%AEB%60%82"
}
function get_social_icon(url)
{
var url = url.replace('http://','');
var url_parts = url.split('/');
var domain = url_parts.length > 1 ? url_parts[0] : url;
for( social_icon in social_icons )
{
if( domain.indexOf(social_icon) > -1 ) return social_icons[social_icon];
}
return 'http://'+domain+'/favicon.ico';
}
tnt_twitter = {
short_url_domains:'tinyurl.com link.gs htxt.it digg.com shrt.fr is.gd ur1.ca blip.fm snipurl.com snurl.com snipr.com bit.ly tr.im xrl.us twurl.nl x.se poprl.com url.ie 6url.com yep.it ln-s.net piurl.com yatuc.com g8l.us icanhaz.com urlkiss.com minilien.com tinylink.com urlcut.com doiop.com smurl.com tighturl.com 2tu.us myurl.in memurl.com redirx.com easyurl.net qurlyq.com dwarfurl.com shrinkurl.us starturl.com urlhawk.com canurl.com surl.co.uk lnkurl.com urlbrief.com urlborg.com ub0.cc urlvi.be sn.vc lurl.no hurl.ws twiturl.de spedr.com parv.us decenturl.com shorterlink.com shortlinks.co.uk budurl.com shw.me buk.me zz.gd 0rz.tw lin.cr shink.de s3nt.com fff.to wipi.es ri.ms b23.ru zi.ma srs.li liip.to cli.gs ptiturl.com snadr.it shrinkify.com s7y.us tiny.cc idek.net ff.im onsaas.info tubeurl.com tgr.me ow.ly adjix.com ad.vu',
longurl_api_url: 'http://api.longurl.org/v1/',
bitly_api_url: 'http://api.bit.ly/',
bitly_api_key: '?version=2.0.1&login=troynt&apiKey=R_db302f29abf36ff94cb2cb6de8a3de41',
flickr_api_key: '2a9d986b3c683b9cf4ecb69b0e80f8f8',
flickr_secret: '46b0b3c471dbd5f8',
yui_group_pipe: 'http://pipes.yahoo.com/pipes/pipe.run?_id=PHxWv2ch3hG2BNL2DYSbGg&_render=json&users=',
ajax_queue: [],
ajax_tmp: {},
twitter_url: window.parent.document.location.protocol + '//twitter.com',
help:{
settings:{
'autocomplete':'Autocompletes @usernames when typing status',
'autopagination':'Pull in next page when you reach the bottom of page',
'url_expansion':'Expand URLs in tweets',
'hash_tags':'link hashtags',
'show_replies':'Show nested replies for tweets',
'shrink_urls':'When tweet is over limit, urls are shrunk',
'search':'Adds search box in sidebar',
'video_embed':'Embed Video into Tweets',
'image_embed':'Embed Images into Tweets',
'add_retweet_button':'Add Retweet Button to Tweets',
'notes':'Allows you to keep notes on users',
'local_time':'Provide local time on user profiles',
'map_location':'Map location of user if lat long are present',
'social_links':'Pulls in Social Links from Twellow.com',
'hide_twitter_defs':'Hide Twitter Definitions',
'friend_icons':'show smiley icons on friends ( users you follow and they follow back )',
'groups':'Allows you to group Twitterers together in searchable Groups',
'@user_tab':'Searches for @user allowing you to view their mentions and replies.',
'tweet_char_count':'Shows character count in tweet meta, users get a "twoosh!" if over 139 characters'
}
},
default_settings:{
'general':{
'autopagination':1,
'url_expansion':1,
'hashtags':1,
'show_replies':1,
'video_embed':1,
'image_embed':1,
'add_retweet_button':1,
'hide_twitter_defs':1,
'friend_icons':1,
'tweet_char_count':0
},
'home':{
'autocomplete':1,
'search':1,
'shrink_urls':1
},
'profiles':{
'@user_tab':1,
'local_time':1,
'map_location':1,
'notes':1,
'social_links':1
},
'friends_and_followers':{
'groups':1,
'show_bios':1
}
},
icons:{
'person':"data:image/gif,GIF89a%10%00%10%00%C4%1F%00U%80%A6p%9E%C5%1E1ST%80%A5%A2wJPy%A1(%3Df%B3%95s-GqDh%93%F2%E8%DE%236%5C%EF%E2%D6R%7C%A3g%95%BBMu%9D%C9%9Bu'%3Ce%CE%A5%83%8D%B5%D86S%80.Grhw%7F%C3%94h8V%83%B1vE%89a2%E9%D7%C6%AA%D0%F2~%AC%D5%FF%FF%FF%FF%FF%FF!%F9%04%01%00%00%1F%00%2C%00%00%00%00%10%00%10%00%00%05s%E0'%8E%5E%E9%8D(%EAi%ACv%A6%A4%06e%B4%0B%7F%ABD%EFv%BAf%9B%E0%26%D3S%11%18%9A%60%92%F0R%5D%14%87%60%F4%D2%24Y.%C2%CD%05S%C5%018%98%8Bx%0Bnz%BE%9D%0Ef%8D%E9L8%88%D7%99%93%AEw%1C%81ND%3E%E0%14%E8i%01%1C%06%1D%02%7C~%80%1D%82%84%86%24%0D%7F%1C%91%91%0B%8D*%1E%0F%09%18%14%15%7B%5D%24%26%25)!%00%3B",
'friend_arrows':"data:image/gif,GIF89a%0B%00%0B%00%B3%0E%00c%8FE%FFCCn%9AR%FF%AD%AD%FFRR%FF%8B%8B%90%CBW%97%D3%5B%A6%E7f%FF%9F%9F%FF%95%95%8A%C0U%9D%DB%60%FFll%FF%FF%FF%00%00%00!%F9%04%01%00%00%0E%00%2C%00%00%00%00%0B%00%0B%00%00%049%D0I'%AA%98S%A0%7D*%90%40%C80%C7r%7C%0E%1A%1A%2C%8A%01%87%B1%00A%5D%A7a%18%0C%7C%80I%BBA%E2%E6%F0%15%85%09E%C1%06l4%94%85%02%E1%E7%20X%A7%93%08%00%3B",
'smiley':"data:image/gif,GIF89a%0A%00%0A%00%91%02%00%00%00%00%FF%FF%00%00%00%00%00%00%00!%F9%04%05%00%00%02%00%2C%00%00%00%00%0A%00%0A%00%00%04%1DPH%40%81%BC%20%E8%60%E7%DEVFic%99q%E2%F9%91%E2'%0Ai%89%B9%D7T%5D%11%00!%FE%10Made%20by%20BLACKEYE%00%3BGIF89a%0A%00%0A%00%91%02%00%00%00%00%FF%FF%00%00%00%00%00%00%00!%F9%04%05%00%00%02%00%2C%00%00%00%00%0A%00%0A%00%00%04%1DPH%40%81%BC%20%E8%60%E7%DEVFic%99q%E2%F9%91%E2'%0Ai%89%B9%D7T%5D%11%00!%FE%10Made%20by%20BLACKEYE%00%3B"
},
init:function(){
if(typeof unsafeWindow.jQuery == 'undefined') { window.setTimeout(tnt_twitter.init,100); return; }
$ = unsafeWindow.jQuery;
jQuery = $;
twttr = unsafeWindow.twttr;
var options = eval(GM_getValue('tnt_twitter.settings')) || {};
tnt_twitter.settings = $.extend({},tnt_twitter.default_settings, options );
tnt_twitter.ajax_cache = eval(GM_getValue('tnt_twitter.ajax_cache')) || {};
tnt_twitter.notes_cache = eval(GM_getValue('tnt_twitter.notes_cache')) || {};
tnt_twitter.url_cache = eval(GM_getValue('tnt_twitter.url_cache')) || {};
tnt_twitter.tweet_cache = eval(GM_getValue('tnt_twitter.tweet_cache')) || {};
tnt_twitter.username_cache = eval(GM_getValue('tnt_twitter.username_cache')) || {};
tnt_twitter.friend_cache = eval(GM_getValue('tnt_twitter.friend_cache')) || {};
tnt_twitter.stranger_cache = eval(GM_getValue('tnt_twitter.stranger_cache')) || {}; //strangers are users you checked their friend status and they are not your friend.
tnt_twitter.group_cache = eval(GM_getValue('tnt_twitter.group_cache')) || {};
tnt_twitter.social_link_cache = eval(GM_getValue('tnt_twitter.social_link_cache')) || {};
tnt_twitter.social_graph_cache = eval(GM_getValue('tnt_twitter.social_graph_cache')) || {};
tnt_twitter.custom_searches = eval(GM_getValue('tnt_twitter.custom_searches')) || {};
$session_user_id = $('meta[name=session-user-screen_name]');
if( $session_user_id.length == 1 )
{
tnt_twitter.logged_in = true;
tnt_twitter.user = $session_user_id.attr('content').toLowerCase();
}
/* highlight tweets to you */
var css = ".hentry.to_me { background:#ffe; }";
css += "ol.statuses .actions { top:0; }"
/* useful for really long threads */
css += ".hentry .actions { vertical-align:top; padding-top:0; }";
css += "#auto-complete li { text-align:left; padding-left:2em; }";
/* autocomplete */
css += '#auto-complete li { float:left; width:45%; }';
/* tab stuff */
css += "li { position:relative; }";
css += "li.tnt-active, li.tnt-active a { font-weight:bold !important; background-color:#EDFFE5 !important; color:#333333 !important; }"
css += "li .remove-tab { visibility:hidden; color:#800 !important; position:absolute; top:0; right:0; padding:.5em !important; }";
css += "li:hover .remove-tab { visibility:visible; }";
/* notes */
css += '#tnt-twitter-notes .notes-body { font-size:110%; }'
/* settings */
css += '#tnt-settings-container { position:absolute; top:0; right:0; background:#fff; padding:.25em 1em; text-align:left; }'
css += '#tnt-settings li { list-style:none; line-height:2; }'
css += '#tnt-settings h3 { margin-top:.5em; }'
css += '#tnt-settings label { padding:.25em 1em; }'
css += '#tnt-settings label:hover { background:#ffe; }'
css += '#tnt-settings span { display:inline-block; width:9em; line-height:2em; height:2em; }'
css += "ol.statuses .thumb { overflow:visible; }"
/* social links */
css += '.social-links { font-size:85%; display:inline; } #user_links_div { margin:.25em 1em; }'
css += '.social-link img { margin:0 5px 5px 0; vertical-align:middle; }'
/* friend icons */
css += '.tnt-icon { border:0 !important; margin:0 !important; padding:0 !important; }'
css += ".tnt-friend-icon { position:absolute; bottom:0; right:-2px;width:auto !important; height:auto !important }"
css += ".profile-head .tnt-friend-icon { top:65px; right:5px; }"
/* groups */
css += '.tnt-groups button { padding:0; } .tnt-groups .add-group { display:block; }'
/* nested replies */
css += '.status-body > .status { font-size:90%; margin-top:.5em; }'
css += '.status-body .photo { vertical-align:bottom; }'
css += '.tnt-image { float:right; clear:both; max-height:240px; margin-left:10px; }'
if( tnt_twitter.can('hide_twitter_defs') )
css += '#side .promotion { display:none; }'
$('.hentry,#permalink,.person').addClass('has-twttr-events');//this is so I don't add twttr events to things already on the page.
GM_addStyle(css);
if ($.livequery) {
$('.search-link').livequery('click', function(){
tnt_twitter.do_search($(this).text());
return false;
});
}
window.setInterval(function(){
tnt_twitter.tweet_process($('.hentry'));
tnt_twitter.friend_process($('tr.person'));
$('#saved_searches li').each(function(){
var $t = $(this);
if( $t.find('.remove-tab').length == 0 )
{
$t.append('<a class="remove-saved-search remove-tab">[x]</a>')
$t.find('.remove-tab').click(function(){
if( !twttr.form_authenticity_token ) return false;
var id = $t.attr('id');
id = id.split('_');
if( id[1] )
{
id = id[1];
$.post('/saved_searches/destroy/'+id,{
twttr:true,
authenticity_token:twttr.form_authenticity_token
},function(){
$('#ss_'+id).remove();
});
}
return false;
});
}
});
},2000);
window.setInterval(function(){
if( tnt_twitter.ajax_queue.length > 0 )
{
var threads = 4;
//console.log('before')
//console.log(tnt_twitter.ajax_queue);
while( ajax_obj = tnt_twitter.ajax_queue.shift())
{
//console.log(ajax_obj)
ajax_obj['User-agent'] = 'Mozilla/4.0 (Compatible) @troynt Greasemonkey Script';
ajax_obj['method'] = ajax_obj['method'] || 'GET';
if( tnt_twitter.ajax_tmp[ajax_obj.url] )
{
//console.log('found '+ ajax_obj.url+' in tmp cache')
ajax_obj.callback(tnt_twitter.ajax_tmp[ajax_obj.url])
}
else GM_xmlhttpRequest(ajax_obj);
if( --threads == 0 || tnt_twitter.ajax_queue.length == 0 ) break;
};
//console.log('after')
//console.log(tnt_twitter.ajax_queue);
}
},500);
tnt_twitter.add_settings();
if( $('#pagination').length == 1 && tnt_twitter.can('autopagination') )
{
$(window).scroll(function(){
if( tnt_twitter.is_scroll_bottom() )
{
tnt_twitter.timeline_load_next_page();
}
})
}
if( $('#status').length == 1 )
{
if( tnt_twitter.can('friend_icons') && (!tnt_twitter.friend_cache || is_empty(tnt_twitter.friend_cache)) ) tnt_twitter.friend_refresh_cache()
tnt_twitter.profile_add_tabs();
var friends = new Array();
$('.vcard a.url').each(function(){
friends.push($(this).attr('href'));
});
tnt_twitter.save_usernames(friends);
if( tnt_twitter.can('autocomplete') ) tnt_twitter.status_autocomplete();
tnt_twitter.status_shrinkify();
}
else if( $('#direct_messages #text').length == 1 )
{
if( tnt_twitter.can('autocomplete') ) tnt_twitter.status_autocomplete();
tnt_twitter.status_shrinkify();
}
else if( $('#profile').length == 1 )
{
var user = $.trim($('#profile .about .fn:first').text())
$msg_link = $('#profile_actions a[href^=/direct_messages/create/]');
if( $msg_link.length == 1)
{
tnt_twitter.save('friend_cache',user.toLowerCase(),user,function(){
tnt_twitter.friend_show_icon(user,function(){
var $link = $('#profile .profile-head .thumb a');
$link.css('position','relative');
$link.append('<img title="'+user+' is your friend" class="tnt-friend-icon tnt-icon" src="'+tnt_twitter.icons['smiley']+'" />')
});
});
}
if( tnt_twitter.can('@user_tab') ) tnt_twitter.profile_add_mentions();
if( tnt_twitter.can('groups') ) tnt_twitter.profile_add_groups();
if( tnt_twitter.can('social_links') ) tnt_twitter.profile_add_social_links();
if( tnt_twitter.can('local_time') ) tnt_twitter.profile_local_time();
if( tnt_twitter.can('map_location') )tnt_twitter.profile_map();
if( tnt_twitter.can('notes') ) tnt_twitter.profile_add_notes();
tnt_twitter.save_username( window.location + '' );
}
tnt_twitter.tweet_process($('#permalink'));
},
ajax:function(ajax_obj)
{
if( tnt_twitter.ajax_tmp[ajax_obj.url] )
{
console.log('found '+ ajax_obj.url+' in tmp cache')
ajax_obj.callback(tnt_twitter.ajax_tmp[ajax_obj.url])
}
else
{
ajax_obj['onload'] = function(resp){ tnt_twitter.ajax_tmp[ajax_obj.url] = resp; ajax_obj.callback(resp); }
tnt_twitter.ajax_queue.push(ajax_obj);
}
},
run_livequery:function(){
$.livequery && $.livequery.run();
},
profile_add_groups:function(){
var user = $('meta[name=page-user-screen_name]');
if( user.length != 1 ) return;
user = user.attr('content');
tnt_twitter.group_control(user,function($group_control){
$('.profile-side:first').after($group_control.addClass('profile-side').addClass('section'));
});
},
profile_add_mentions:function(){
var user = $('meta[name=page-user-screen_name]');
if( user.length != 1 ) return;
user = user.attr('content');
tnt_twitter.add_tab(function($tab){
$('#primary_nav li:first').before($tab);
},'@' + user +'|Search for mentions of '+user,function(){
tnt_twitter.do_search('@'+user);
},true);
},
/**
* Attempts to perform a search using the search input box,
* if that doesn't work it redirects to the appropriate search URL
* @param {String} q query
*/
do_search:function( q )
{
if( q.indexOf('tnt-group:') == 0 )
{
tnt_twitter.group_search(q,function(resp){
tnt_twitter.clear_timeline();
$('#more,#pagination').remove();
for( label in tnt_twitter.custom_searches )
{
if( tnt_twitter.custom_searches[label] == q )
{
tnt_twitter.set_heading('<b>'+label+'</b> Group Search');
}
}
$.each(resp.tweets,function(idx,tweet){
tnt_twitter.load_tweet(tweet);
});
$('.saved-search-links .loading').removeClass('loading');
});
return;
}
$search_input = $('#sidebar_search_q');
if( $search_input.length == 1 )
{
$search_input.val(q).parents('form').submit();
window.setTimeout(function(){
$('.saved-search-links .loading').removeClass('loading');
},1000)
}
else
{
window.location = tnt_twitter.twitter_url + '/search?q='+ encodeURI(q);
}
},
clear_timeline:function()
{
$('#timeline').children().remove();
},
set_heading:function(txt)
{
$('#timeline_heading h1').html(txt);
},
friend_show_icon:function(user,callback)
{
if( typeof user != 'string' || !tnt_twitter.can('friend_icons') || typeof callback != "function" ) return false;
user = user.toLowerCase();
if( tnt_twitter.friend_cache && tnt_twitter.friend_cache[user] ) callback()
else if( tnt_twitter.logged_in && tnt_twitter.user != user && !tnt_twitter.stranger_cache[user] && tnt_twitter.can('friend_icons') )
{
tnt_twitter.ajax({
url: tnt_twitter.twitter_url + '/'+user,
callback:function(resp){
if( resp.status != 200 ) return;
resp = resp.responseText;
$resp = $(resp);
$dm_link = $resp.find('.sidebar-actions a[href^=/direct_messages/create/]')
if( $dm_link.length == 0 )
{
tnt_twitter.save('stranger_cache',user,user);
}
else
{
tnt_twitter.save('friend_cache',user,user,function(){
tnt_twitter.friend_show_icon(user,callback);
});
}
}
});
}
},
/**
* Gets friends from direct messages dropdown.
*/
friend_refresh_cache:function()
{
console.log('getting friends list')
$.get('/direct_messages',function(resp){
$resp = $(resp);
$friends = $resp.find('#direct_message_user_id option');
var friends = {}
$friends.each(function(){
var $t = $(this);
var user = $t.text().toLowerCase();
if( $t.val() ) friends[user] = user
});
tnt_twitter.friend_cache = friends;
tnt_twitter.save_usernames(friends);
window.setTimeout(function(){
GM_setValue('tnt_twitter.friend_cache',uneval(tnt_twitter.friend_cache));
},0);
});
},
/**
* Adds settings to top right corner
*/
add_settings:function()
{
var html = '<div id="tnt-settings-container">'
html+= '<a id="tnt-settings-link" onclick="$(\'#tnt-settings\').toggle(); return false;" href="#">@troynt script settings</a> | <a target="_blank" href="http://getsatisfaction.com/troynt/products/troynt_twitter_greasemonkey_script">help</a>'
html+= '<div style="display:none;" id="tnt-settings"></div>'
html+= '</div><!--/#tnt-settings-container-->';
$('body').append(html)
var $settings = $('#tnt-settings');
html = '<small style="margin-top:1em">'+
'<b>Version</b> '+CheckScriptForUpdate.version+' ( <a target="_blank" href="http://sn.im/troys_twitter_script">Homepage</a> )<br />' +
'<b>By</b> <a target="_blank" href="http://twitter.com/troynt">@troynt</a><br />' +
'Hover over setting for brief description.<br />Refresh after you have made your changes. </small>';
$.each(tnt_twitter.default_settings,function(category,settings){
html += '<h3>'+category.replace('_',' ','g')+'</h3><ul>'
$.each(settings,function(setting,v){
html += '<li><label title="'+ tnt_twitter.help.settings[setting] +'"><span>'
html += setting.replace('_',' ','g')
checked = '';
if( tnt_twitter.can(setting) ) checked = 'checked="checked"'
html += '</span> <input name="'+ category +'.'+setting+'" type="checkbox" '+ checked+' /></label></li>'
});
html += '</ul>';
});
html += '<a href="#" onclick="$(this).parent().toggle(); return false;">Close</a> <a style="float:right;" id="tnt-reset-settings" href="#">Reset to Defaults</a>'
$settings.html(html);
$settings.find('input').change(function(){
tnt_twitter.save_setting($(this).attr('name'),$(this).attr('checked'))
});
$('#tnt-reset-settings').click(function(){
if( confirm('Are you sure you would like to reset your settings?') )
{
window.setTimeout(function(){
GM_setValue('tnt_twitter.settings',uneval(tnt_twitter.default_settings));
alert('Settings reset! Please refresh.');
},0);
}
return false;
});
},
add_tab:function(placement_func,label,callback,permanent)
{
label_parts = label.split('|');
label = label_parts[0];
var remove_tab = '<a href="#" class="remove-tab">[x]</a>'
if( permanent )
{
remove_tab = '';
}
$tab = $('<li><a href="#">'+label+'</a>'+ remove_tab +'</li>');
$tab.find('.remove-tab').click(function(){
var label = $(this).prev('a').text();
delete tnt_twitter.custom_searches[label];
if( tnt_twitter.group_cache[label])
delete tnt_twitter.group_cache[label];
window.setTimeout(function(){
GM_setValue('tnt_twitter.custom_searches',uneval(tnt_twitter.custom_searches));
GM_setValue('tnt_twitter.group_cache',uneval(tnt_twitter.group_cache));
},0);
$(this).parent().remove();
return false;
});
if( label_parts[1] )
{
$tab.find('a').attr('title',label_parts[1]);
}
$tab.find('a').click(function(){
$('#side .active,#side .tnt-active').removeClass('active').removeClass('tnt-active');
if( typeof callback == 'function')
callback(this);
return false;
});
placement_func($tab);
},
group_add_tab:function(label,query)
{
tnt_twitter.add_tab(function($tab){
$('#group_searches ul').append($tab)
},label,function(){
tnt_twitter.do_search(query);
})
},
/**
* Checks if script is allowed to perform ability.
* Ability is just a setting, e.g. friend icons
* @param {String} ability
*/
can:function( ability )
{
for( cat in tnt_twitter.settings )
{
if( typeof tnt_twitter.settings[cat][ability] != 'undefined' )
{
return tnt_twitter.settings[cat][ability];
}
}
return true;//in case I add something new and the user doesn't see it, we want it to be active by default.
},
/**
* Saves Setting Preference.
* @param {String} ability
* @param {Object} value
*/
save_setting:function( ability, value )
{
eval('tnt_twitter.settings.'+ability+' = '+value)
window.setTimeout(function(){
GM_setValue('tnt_twitter.settings',uneval(tnt_twitter.settings));
},0);
},
/**
* @author mislav http://twitter.com/mislav
* @url http://userscripts.org/scripts/review/24398
*/
profile_map:function()
{
var address = $('#side .vcard .adr').get(0);
if (address && /[+-]?\d+\.\d+,[+-]?\d+\.\d+/.test(address.textContent)) {
var API_KEY = 'ABQIAAAAfOaovFhDnVE3QsBZj_YthxSnhvsz13Tv4UkZBHR3eJwOymtuUxT045UEYNAo1HL_pePrMexH4SYngg',
coordinates = RegExp['$&']
// create static map that links to Google Maps
var link = '<a target="_blank" class="googlemap" href="http://maps.google.com/maps?q=' + coordinates + '">';
address.innerHTML = link+address.innerHTML.split('(')[0]+'</a><br />'+link+'<img src="http://maps.google.com/staticmap?center=' + coordinates + '&markers=' + coordinates + ',red&zoom=13&size=165x165&key=' + API_KEY + '" alt=""></a>'
}
},
/**
* Adds local time to profile.
*/
profile_local_time:function()
{
tnt_twitter.ajax_queue.push({
method: "GET",
url: 'http://whattimeisitthere.herokugarden.com/time_now/search?q='+ encodeURIComponent($('#profile .adr').text()),
callback: function(resp)
{
if( resp.status != 200 || typeof(resp.responseText) === 'undefined' ) return resp;
resp = eval( '(' + resp.responseText + ')' );
if( resp['error'] ) return resp;
$('#profile .adr').parent().after('<li><span class="label">Local Time</span> <span >'+ resp['local_time'] + '</span></li>')
}
});
},
/**
* Adds notes to sidebar of profile
*/
profile_add_notes:function()
{
var user = $('meta[name=page-user-screen_name]');
if( user.length != 1 ) return;
user = user.attr('content').toLowerCase();
notes_txt = tnt_twitter.notes_cache[user];
if( !notes_txt ) notes_txt = 'Click to Edit';
var notes_html = '<div id="tnt-twitter-notes" class="section profile-side"><h3>Notes</h3><pre class="notes-body">'+notes_txt+'</pre></div>'
var $notes = $(notes_html);
tnt_twitter.notes_body_click($notes.find('.notes-body'));
$('#primary_nav').before($notes);
},
notes_body_click:function($notes)
{
$notes.click(function(){
var html = $(this).html().replace('Click to Edit','').replace('<br>',"\n",'gi');
$(this).replaceWith('<textarea>' + html + '</textarea><a id="tnt-save-notes" href="#">Save</a>');
$('#tnt-save-notes').click(function(){
$notes = $(this).prev();
$notes.replaceWith('<pre class="notes-body">'+$notes.val()+'</pre>');
var user = tnt_twitter.user_from_url(window.location+'');
tnt_twitter.save('notes_cache',user,$notes.val());
tnt_twitter.notes_body_click($(this).parent().find('.notes-body'));
$(this).remove();
return false;
});
});
},
/**
* Adds profile links to Twellow
*/
profile_add_social_links:function()
{
var user = tnt_twitter.user_from_url(window.location+'');
if( !tnt_twitter.social_link_cache[user] && false )
{
GM_xmlhttpRequest({
method: "GET",
url: 'http://www.twellow.com/user/'+ user,
onload: function(resp)
{
if( resp.status != 200 || typeof(resp.responseText) === 'undefined' ) return resp;
resp = resp.responseText;
$resp = $(resp);
var urls = {};
$resp.find('.twellow-tools-td:first a').filter(function(){
return !$(this).find('img').attr('src').match(/fade_/);
}).each(function(){
var u = $(this).attr('href').replace('www.','');
if( !u.match('twitter.com') ) urls[u] = 1;
});
if( !is_empty(urls) )
{
tnt_twitter.save('social_link_cache',user,urls,function(){
tnt_twitter.profile_add_social_links();
});
}
}
});
return;
}
if( !tnt_twitter.social_graph_cache[user] )
{
GM_xmlhttpRequest({
method: "GET",
url: 'http://socialgraph.apis.google.com/lookup?fme=1&edo=0&edi=0&q=' + encodeURIComponent('http://twitter.com/'+user),
headers: {'Accept': 'text/javascript,application/javascript,application/atom+xml,application/xml,text/xml'},
onload: function(resp)
{
if( resp.status != 200 || typeof(resp.responseText) === 'undefined' ) return resp;
eval('var resp = ' + resp.responseText);
tnt_twitter.save('social_graph_cache',user,resp,function(){
tnt_twitter.profile_add_social_links();
});
}
});
return;
}
var social_links = tnt_twitter.social_link_cache[user];
var social_links_html = '';
if( social_links && !is_empty(social_links) > 0 )
{
for( site in social_links )
{
social_links_html += '<a class="social-link twellow-link" href="'+site+'" target="_blank"><img src="'+get_social_icon(site)+'" /></a>'
}
}
if( tnt_twitter.social_graph_cache[user] )
{
var profile_url = '';
if( $('#profile .about a.url').length == 1 ) profile_url = $('#profile .about a.url').attr('href').replace(/\/$/,'');
var nodes = {}
for( node in tnt_twitter.social_graph_cache[user]['nodes'] )
{
for( claimed_nodes in tnt_twitter.social_graph_cache[user]['nodes'][node]['claimed_nodes'] )
{
var url = tnt_twitter.social_graph_cache[user]['nodes'][node]['claimed_nodes'][claimed_nodes]
if( nodes[url] ) nodes[url]++
else nodes[url] = 1;
}
}
for( url in nodes )
{
if( nodes[url] > 2 )
{
url = url.replace(/\/$/,'') //remove trailing slash
url = url.replace('://www.','://');//remove www.
if( url != profile_url && !social_links[url] && url.match(/https?:\/\/\S+/) )
{
social_links_html += '<a class="social-link social-graph-link" target="_blank" href="'+url+'"><img alt="'+url+'" src="'+get_social_icon(url)+'" /></a>';
}
}
}
}
if( social_links_html.length > 0 )
{
$tmp = $(social_links_html).parent();
$tmp.find('a[href^='+tnt_twitter.twitter_url +']').remove();
social_links_html = $tmp.html();
social_links_html = social_links_html.replace('://www.','://','gi');//remove www.
if( social_links_html.length > 0 )
{
$('#profile .about li:last').after('<li><span class="label">Social Links</span> <div id="user_links_div">'+ social_links_html + '</div></li>')
}
}
},
group_control:function(user,position)
{
if( !tnt_twitter.can('groups') ) return;
var group_html = '<div class="tnt-groups"><strong>Groups:</strong> <span class="tnt-group-list"></span><button class="small add-group" style="width:6em" class="small">Add Group</button>'
group_html += '<div class="group-add" style="display:none;"><select class="group-select">'+tnt_twitter.group_get_opts()+'</select><button class="tnt-okay small">OK</button>'
group_html += ' or <a href="#" class="tnt-cancel" href="#">Cancel</a></div></div>'
$group_html = $(group_html);
tnt_twitter.render_group_list(user,$group_html.find('.tnt-group-list'));
$group_html.find('.tnt-cancel').click(function(){ $(this).parent().hide().parent().find('.add-group').show(); return false;})
$group_html.find('.tnt-okay').click(function(){
var group = $(this).parent().find('.group-select').val();
if( !group ) return false;
if( group == 'create' || group == 'Create a Group' )
{
var new_group = prompt('Group Name?');
if( new_group )
{
tnt_twitter.group_create(new_group);
group = new_group
}
}
tnt_twitter.add_user_to_group(user,group);
tnt_twitter.render_group_list(user,$(this).parent().parent().find('.tnt-group-list'))
$(this).parent().hide().parent().find('.add-group').show();
return false;
});
$group_html.find('.add-group').click(function(){
$(this).hide().parent().find('.group-add').show();
return false;
});
position($group_html);
},
/**
* Processes friend on followers pages.
* @param {jQuery} $friends
*/
friend_process:function($friends)
{
$friends = $friends.not('.processed-friend');
$friends.each(function(){
$t = $(this)
$t.addClass('processed-friend')
if (!$t.hasClass('has-twttr-events'))
{
$t.isFollowUser(); //twttr events not added, add them!
$t.addClass('has-twttr-events');
}
$user_link = $t.find('strong .url:first');
if( tnt_twitter.can('show_bios') && $t.find('.tnt-bio').length == 0 )
{
$t.find('.person-actions').before('<small class="tnt-bio">'+$user_link.attr('title').linkify(true)+'</small>')
}
var user = tnt_twitter.user_from_url($user_link.attr('href'))
tnt_twitter.save_username(user);
tnt_twitter.group_control(user,function($group_control){
$t.find('.person-actions:first').append($group_control);
});
})
},
/**
* Adds Tabs to sidebar
*/
profile_add_tabs:function()
{
tnt_twitter.group_refresh_searches();
if( !is_empty(tnt_twitter.custom_searches) )
{
var $group_searches = $('<div id="group_searches" class="collapsible"><h2 class="sidebar-title"><span>Group Searches</span></h2><ul class="sidebar-menu"></ul></div>');
$group_searches.find('.sidebar-title').click(function(){
var $t = $(this);
var $p = $t.parent();
$t.next('ul').slideToggle();
if( $p.hasClass('collapsed') )
$p.removeClass('collapsed');
else
$p.addClass('collapsed');
return false;
})
$('#custom_search').after($group_searches);
$.each(tnt_twitter.custom_searches,function(label,query){ tnt_twitter.group_add_tab(label,query); });//this is just groups now
}
},
profile_add_tab:function(label, callback, first )
{
var id = 'tab-'+ $('#primary_nav li').length;
var html = '<li><a href="#" id="'+ id +'">'+label+'</a><a href="#" class="remove-tab">[x]</a></li>';
if( !first ) $('#primary_nav li:last').after(html);
else $('#tabMenu li:first').before(html);
$('#'+id).click(function(){
$(this).parent().siblings().children('a').css('backgroundColor','transparent')
$(this).css('backgroundColor','#fff');
if( typeof callback == "function" ) callback();
return false;
}).parent().children('.remove-tab').click(function(){
var label = $(this).prev('a').text();
delete tnt_twitter.custom_searches[label];
if( tnt_twitter.group_cache[label])
delete tnt_twitter.group_cache[label];
window.setTimeout(function(){
GM_setValue('tnt_twitter.custom_searches',uneval(tnt_twitter.custom_searches));
GM_setValue('tnt_twitter.group_cache',uneval(tnt_twitter.group_cache));
},0);
$(this).parent().remove();
return false;
})
},
profile_add_custom_search_tab:function(label,query,trigger,temp,first)
{
return;
if( !temp )
{
tnt_twitter.custom_searches[label] = query
window.setTimeout(function(){
GM_setValue('tnt_twitter.custom_searches',uneval(tnt_twitter.custom_searches));
},0);
}
html = '<li><a class="search-link" title="'+query+'" href="">'+label+'</a></li>'
$('#primary_nav').prepend()
tnt_twitter.profile_add_tab(label,function(){
/*
$(window).unbind('scroll');
document.title = 'Twitter / Search for '+ label;
$('.timeline-header,.timeline-subheader').hide();
$('#loader').show();
if( $('body').attr('id') == 'profile' ) $('body').attr('id','');
tnt_twitter.load_search(query);
*/
},first);
},
group_refresh_searches:function()
{
$.each(tnt_twitter.group_cache,function(group,members){
var query = '';
var memberArr = new Array();
$.each(members,function(member,value){
memberArr[memberArr.length] = member;
});
if( memberArr.length > 0 ) query = 'from:'+memberArr.join(' OR from:');
if( query.length >= 140 )
{
query = 'tnt-group:'+ memberArr.join('+');
}
if( query == '' ) return;
tnt_twitter.custom_searches[group] = query;
});
window.setTimeout(function(){
GM_setValue('tnt_twitter.custom_searches',uneval(tnt_twitter.custom_searches));
},0);
},
clear_cache:function()
{
console.log('clearing cache')
window.setTimeout(function(){
GM_setValue('tnt_twitter.tweet_cache','');
GM_setValue('tnt_twitter.url_cache','');
GM_setValue('tnt_twitter.social_link_cache','');
GM_setValue('tnt_twitter.social_graph_cache','');
GM_setValue('tnt_twitter.friend_cache','');
GM_setValue('tnt_twitter.stranger_cache','');
GM_setValue('tnt_twitter.username_cache','');
GM_setValue('tnt_twitter.ajax_cache','');
},0);
},
/**
* Shrinks URLs present in Status
*/
status_shrinkify:function()
{
if( !tnt_twitter.can('shrink_urls') ) return;
$status.keyup(function(e){
$status = $('#status,#direct_messages #text');
var orig_update = $status.val();
if( $status.length != 1 || orig_update.length < 140 ) return;
// from http://userscripts.org/scripts/show/39042
var urlRegExp = new RegExp(/(https?:\/\/\S+)/im);
var urlMatches = orig_update.match(urlRegExp);
if( !urlMatches ) return;
for (var i=0; i < urlMatches.length; i++) {
var url = $.trim(urlMatches[i]);
var domain = url.replace(/https?:\/\//i,'');
var url_parts = domain.split('/');
domain = url_parts.length > 1 ? url_parts[0] : domain;
if( url.length < 20 || tnt_twitter.short_url_domains.indexOf(domain) > -1 || tnt_twitter.url_cache[url] ) continue;
console.log('getting short url for '+url);
window.setTimeout(function(){
GM_xmlhttpRequest({
method:'GET',
url: tnt_twitter.bitly_api_url + 'shorten' + tnt_twitter.bitly_api_key + '&format=json&longUrl=' + encodeURIComponent(url),
onload: function(resp)
{
if( resp.status != 200 ) return false;
eval('var resp = ' + resp.responseText);
if( resp.statusCode == "OK" )
{
if( resp.results[url]['shortUrl'].length < url.length )
$status.val($status.val().replace(url,resp.results[url]['shortUrl'],'gi'));
}
}
});
},0);
}
});
},
/**
* Autocompletes Usernames in Status
*/
status_autocomplete:function()
{
var dm_screen = false;
$status = $('#status,#direct_messages #text');
if( $status.length == 0 )
{
$status = $('#direct_messages #text');
if( $status.length == 1 ) dm_screen = true;
}
if( $status.length != 1 ) return;
var cur_word = '';
var cur_match = null;
$(window).keyup(function(e){
if( !cur_match ) return;
if( (e.keyCode == 9 || e.keyCode == 13 ) && $('#auto-complete:visible').length == 1 )
{
var s = $status.get(0);
s.focus();
var v = $status.val().replace(cur_word,cur_match);
$status.val(v + ' ');
$status_autocomplete.hide();
return true;
}
});
$status.after('<div id="auto-complete"></div>');
$status_autocomplete = $('#auto-complete');
$status.keyup(function(e){
var is_dm = dm_screen;
var val = $status.val()+'';
val = val.replace("\n",'','g');
$status.val(val);
var words = val.split(' ');
cur_word = words[words.length-1]
var matches = cur_word.match(/(@)([^\s]+)/);
if( !matches && !dm_screen )
{
var dir_msg = $status.val().match(/^(d )([^\s]+)$/);
if( dir_msg ) matches = dir_msg;
is_dm = true;
}
if( matches && matches.length >= 3 && !tnt_twitter.username_cache[matches[2]] )
{
var user = matches[2];
var action = matches[1];
possible_matches = tnt_twitter.possible_friend_matches(user,is_dm);
var friend_list = '';
cur_match = null;
for( idx in possible_matches )
{
var friend = possible_matches[idx];
if( cur_match == null )
{
cur_match = action+friend;
if( action != '@') cur_match = friend;
friend_list += '<li><a title="'+friend+'" href="#">'+ friend +'</a> ( press tab to complete )</li>'
}
else friend_list += '<li><a title="'+friend+'" href="#">'+ friend +'</a></li>'
}
if( friend_list != '' )
{
var last_part_match = cur_match.replace(cur_word,'');
var s = $status.get(0);
var orig_length = $status.val().length;
$status_autocomplete.html('<ul>'+friend_list+'</ul');
$status_autocomplete.find('a').click(function(){
tnt_twitter.status_replace(cur_word,action+$(this).attr('title')+' ')
$status.focus();
//s.setSelectionRange($status.val().length, $status.val().length);
$status_autocomplete.hide();
return false;
});
$status_autocomplete.show();
}
} else $status_autocomplete.hide();
});
},
/**
* Replace Word in Status
* @param {String} search
* @param {String} replace
*/
status_replace:function(search, replace)
{
$status = $('#status,#direct_messages #text');
var v = $('#status').val();
var words = v.split(' ');
for( idx in words )
{
var word = words[idx];
if( word == search )
{
words[idx] = replace;
}
}
$status.val(words.join(' '));
},
possible_friend_matches:function( partial_friend_name, is_dm )
{
var possible_matches = {};
var friend_arr = tnt_twitter.username_cache;
if( is_dm ) friend_arr = tnt_twitter.friend_cache;
for( friend in friend_arr )
{
friend = friend.toLowerCase();
if( partial_friend_name.length <= friend.length && friend.indexOf(partial_friend_name) == 0 )
{
possible_matches[friend] = friend;
}
}
return possible_matches;
},
/**
* Returns true if at bottom of page.
*/
is_scroll_bottom:function() {
var documentHeight = $(document).height();
var scrollPosition = $(window).height() + $(window).scrollTop();
return (documentHeight == scrollPosition);
},
timeline_load_next_page:function()
{
if( $('#more,#search_more').length == 1 )
{
$('#more,#search_more').trigger('click');
}
else
{
$next_page_link = $('#pagination a[rel~=next]');
if( $next_page_link.length == 1 )
{
$.get($next_page_link.attr('href'),function(resp){
$resp = $(resp);
var $next_next_page_link = $resp.find('#pagination a[rel~=next]');
if( $next_next_page_link.length == 1 )
$next_page_link.replaceWith($next_next_page_link);
else
$next_page_link.remove();
if( $resp.find('table.doing').length == 1 )
{
$('table.doing').append($resp.find('table.doing tr'));
$('table.doing .vcard').not('.processed-friend').each(function(){
tnt_twitter.friend_process($(this))
});
}
});
}
}
},
tweet_process:function( $tweets )
{
$tweets = $tweets.not('.processed-tweet');
$tweets.each(function(){
var $tweet = $(this);
if( $tweet.parent().is('#timeline') ) $tweet.addClass('root');
//single tweets don't get usernames for some reason
var tweet_id = $tweet.attr('id');
var user = tnt_twitter.user_from_tweet($tweet)
if( tweet_id == 'permalink' )
{
$tweet.addClass('u-'+ user );
}
else if( $tweet.hasClass('root') )
{
if( $tweet.siblings().filter('#'+tweet_id).length > 0 )
{
$tweet.remove();
console.log('removing duplicate '+tweet_id);
}
}
if( tnt_twitter.can('tweet_char_count') )
{
var $content = $tweet.find('.entry-content:first');
if( $content.length == 1 )
{
var length = $tweet.find('.entry-content:first').text().length;
if( length > 139 )
length = 'twoosh!'
$tweet.find('.entry-meta:first').append(' ('+length + ')')
}
}
$published = $tweet.find('.published:first');
if( $published.length == 1 && $published.attr('title').length > 0 )
$published.text(DateHelper.time_ago_in_words_with_parsing($published.attr('title')));
else
$published.css('display','inline')
$tweet.find('.entry-content:first a[rel=nofollow],.msgtxt:first a[rel=nofollow]').each(function(){
$(this).text($(this).attr('href'));
});
tnt_twitter.tweet_add_retweet_button($tweet);
var reply_link = $tweet.find('.entry-meta a[href^='+tnt_twitter.twitter_url +']').not('.entry-date').filter(function(){ return $(this).text().match('^in reply to') });
if( reply_link.length == 1 )
tnt_twitter.tweet_get_reply( $tweet, reply_link.attr('href') );
tnt_twitter.linkify($tweet);
tnt_twitter.friend_show_icon(user,function(){
$tweet.addClass('tnt-friend');
var $author_link = $tweet.find('.author .url');
$author_link.css('position','relative');
$author_link.append('<img title="'+user+' is your friend" class="tnt-friend-icon" src="'+tnt_twitter.icons['smiley']+'" />')
});
if( tnt_twitter.can('url_expansion') ) tnt_twitter.expand_urls($tweet);
if( $tweet.hasClass('u-secrettweet') )
tnt_twitter.tweet_process_secrettweet($tweet);
else if( $tweet.hasClass('u-fxxxmylife ') )
tnt_twitter.tweet_process_fxxxmylife($tweet);
$tweet.addClass('processed-tweet');
});
},
tweet_process_secrettweet:function($tweet)
{
try { var st_id = $tweet.find('.entry-content:first,.msgtxt:first').text().match('^([0-9]+)')[1] }
catch( err ){ return; }
$tweet.find('.entry-content:first a[rel=nofollow]:last,.msgtxt:first a[rel=nofollow]:last').remove();
tnt_twitter.search('@secrettweet '+ st_id +'~',function(result){
$.each(result.tweets,function(tweet_id,tweet){
tnt_twitter.tweet_load_reply(tweet,$tweet)
});
});
},
tweet_process_fxxxmylife:function($tweet)
{
$link = $tweet.find('a.expanded');
if( $link.length == 1 )
{
url = $link.attr('href');
if( url )
{
var matches = url.match('http://www.fmylife.com/.*/([0-9]+)');
$fml_tweet = $tweet;
tnt_twitter.cache_ajax({
method: "GET",
url: 'http://api.betacie.com/view/' + matches[1] + '/nocomment&language=en&key=readonly',
onload: function(resp){
if (resp.status != 200)
return [];
var $resp = $(resp.responseText);
var txt = $resp.find('text').text()
if (txt == '') return;
var id = $resp.find('item').attr('id');
var cat = $resp.find('category').text();
var url = 'http://www.fmylife.com/'+cat+'/'+id;
txt = txt.replace('FML', '<a target="_blank" href="' + url + '">FML</a>');
$('a[href='+url+']').parent().html(txt);
}
});
}
}
else if( $tweet.find('a[rel=nofollow]').length == 1 )
{
window.setTimeout(function(){
tnt_twitter.tweet_process_fxxxmylife($tweet);
},1000);
return;
}
},
tweet_add_retweet_button:function($tweet)
{
if( !tnt_twitter.can('add_retweet_button') ) return;
$reply_btn = $tweet.find('.actions:first .reply:first');
if( $reply_btn.length != 1 ) return;
$retweet_btn = $reply_btn.clone();
$retweet_btn.attr('title','retweet this').removeClass('reply').text('RT')
.css({
background:'#C3C3C3',
color:'#fff',
padding:'2px',
display:'inline'
});
var user = tnt_twitter.user_from_tweet($tweet);
var link = $retweet_btn.attr('href');
link = link.split('&')
var content = $tweet.find('.entry-content:first,.msgtxt:first').text();
link[0] = '/home?status='+encodeURIComponent('RT @'+user+' '+ content.replace("\n",'','g') )
link = link.join('&');
$retweet_btn.attr('href',link);
$reply_btn.after($retweet_btn);
var $s = $('#status');
if( $s.length == 1 && $s.is(':visible') )
$retweet_btn.click(function(){
var $s = $('#status');
$s.val('');
$(this).siblings('.reply:first').trigger('click');
$s.val('RT ' + $s.val() + content);
$s.blur().focus();
return false;
});
},
linkify:function( $tweet )
{
var $content = $tweet.find('.entry-content:first,.msgtxt:first');
if( $content.length == 1 )
{
var was = $content.html();
var linkified = was.linkify();
if( was != linkified )
$content.html(linkified)
}
tnt_twitter.run_livequery();
},
linkify_plain:function(text)
{
if( !text ) return text;
// linkify URLs
text = text.replace(/\b((?:https?|ftp|telnet|ldap):\/\/[^\s'"<>()]*|[-\w]+@(?:[-\w]+\.)+[\w]{2,6})\b|([\w\-])+(\.([\w\-])+)*@((([a-zA-Z0-9])+(([\-])+([a-zA-Z0-9])+)*\.)+([a-zA-Z])+(([\-])+([a-zA-Z0-9])+)*)/gi,'<a target="_blank" rel="nofollow tnt-plain-text-linkified" href="$1">$1</a>');
// linkify twitter users
text = text.replace(/(^|\s)@(\w+)/gi,'$1@<a href="'+tnt_twitter.twitter_url +'/$2">$2</a>')
return text;
},
expand_urls:function( $tweet )
{
$tweet.find('a[rel~=nofollow]').not('.expanded').each(function(){
var $t = $(this);
console.log($t)
var url = $t.attr('href').replace('http://','');
var url_parts = url.split('/');
var domain = url_parts.length > 1 ? url_parts[0] : url;
if( tnt_twitter.url_cache[url] )
{
var long_url = tnt_twitter.url_cache[url].long_url;
var title = tnt_twitter.url_cache[url].title;
$t.html(title);
if( !long_url.match(/https?/) ) long_url = 'http://'+long_url;
$t.attr('href',long_url);
$t.attr('title',long_url);
$t.addClass('expanded');
}
url = $t.attr('href').replace('http://','');
url_parts = url.split('/');
domain = url_parts.length > 1 ? url_parts[0] : url;
var images_okay = tnt_twitter.can('image_embed')
var videos_okay = tnt_twitter.can('video_embed')
if( tnt_twitter.short_url_domains.indexOf(domain) > -1 && !( domain == 'ping.fm' && url_parts[1] == 'p' ) )
{
/**
* Adding Detection for TinyURL and Bitly so if LongURL services
* go down, I still have decent coverage.
*/
if( domain == 'tinyurl.com')
{
tnt_twitter.ajax({
url: 'http://tinyurl.com/preview.php?num='+url_parts[1],
callback: function(resp) {
if( resp.status != 200 || typeof(resp.responseText) === 'undefined' ) return resp;
$resp = $(resp.responseText);
var $redirect_link = $resp.find('#redirecturl');
if( $redirect_link.length == 1 )
{
var long_url = $redirect_link.attr('href');
tnt_twitter.save('url_cache',url,{long_url:long_url,title:long_url},function(){ tnt_twitter.expand_urls($tweet); })
}
}
})
}
else if( domain == 'bit.ly' )
{
tnt_twitter.ajax({
url: tnt_twitter.bitly_api_url + 'expand' + tnt_twitter.bitly_api_key + '&format=json&shortUrl=' + encodeURIComponent(url),
callback: function(resp) {
if( resp.status != 200 || typeof(resp.responseText) === 'undefined' ) return resp;
eval('var resp = ' + resp.responseText);
if( resp.statusCode == 'ERROR' ) return
var long_url = null;
for( result in resp.results ) long_url = resp.results[result].longUrl;
tnt_twitter.save('url_cache',url,{long_url:long_url,title:long_url},function(){ tnt_twitter.expand_urls($tweet); })
}
});
}
else
{
tnt_twitter.ajax({
url: 'http://api.longurl.org/v1/expand?format=json&url=' + encodeURIComponent(url),
callback: function(resp) {
if( resp.status != 200 || typeof(resp.responseText) === 'undefined' ) return resp;
var link = eval('(' + resp.responseText + ')');
if (typeof(link.messages) !== 'undefined') { return resp; }
tnt_twitter.save('url_cache',url,link,function(){
tnt_twitter.expand_urls($tweet);
});
}
});
}
return;
}
else if( images_okay && domain.indexOf('twitpic.com') > -1 )
{
$t.addClass('expanded');
$t.html('<img class="tnt-image" src="http://twitpic.com/show/thumb/'+ url_parts[1] + '" />');
}
else if( videos_okay && url.indexOf('youtube.com/watch?v=') > -1 )
{
var video_id = url.match('=([a-zA-Z_0-9\-]+)')[1];
var title = $t.attr('title')
if( title ) $t.text(title);
var embed_html = '<object width="425" height="373"><param name="movie" value="http://www.youtube.com/v/' +
video_id + '&rel=0&border=0"></param><param name="wmode"' +
'value="transparent"></param><embed src="http://www.youtube.com/v/' + video_id + '&rel=0&border=0" type="application/x-shockwave-flash" wmode="transparent" width="425" height="373"></embed></object>'
$t.replaceWith(embed_html);
}
else if( images_okay && url.match('movapic.com/pic/([^\"]+)') )
{
$t.addClass('expanded');
$t.html('<img class="tnt-image" src="http://image.movapic.com/pic/m_' + url_parts[2] + '.jpeg" />');
}
else if( videos_okay && url.match('beta.twiddeo.com/([a-zA-Z0-9]+)') )
{
var twiddeo_id = url.match('beta.twiddeo.com/([a-zA-Z0-9]+)')
if( twiddeo_id ) twiddeo_id = twiddeo_id[1]
var embed_html = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" id="twiddeoPlayer" style="margin: 0pt; padding: 0pt;" width="420" height="325"><param name="allowscriptaccess" value="always" /><param name="wmode" value="transparent" /><param name="movie" value="http://beta.twiddeo.com/embed/_gm/vid=' + twiddeo_id + '" /><param name="quality" value="high" /><param name="bgcolor" value="#81b5c3" /><embed src="http://beta.twiddeo.com/embed/_gm/vid=' + twiddeo_id + '" quality="high" bgcolor="#81b5c3" wmode="transparent" allowscriptaccess="always" swliveconnect="true" name="twiddeoPlayer" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" align="middle" width="420" height="325" allowfullscreen="true"></embed></object>'
$t.replaceWith(embed_html);
}
else if( videos_okay && url.match(/vimeo\.com\/(\d+)/) )
{
var clip_id = url.match(/vimeo\.com\/(\d+)/)[1];
var embed_html = '<object width="400" height="225"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id='+clip_id+'&amp;server=vimeo..com&amp;show_title=1&show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id='+clip_id+'&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="allywas" width="400" height="255"></embed></object>'
$t.replaceWith(embed_html);
}
else if( images_okay && url.match('yfrog\.com/([0-9a-zA-Z]+)') )
{
var pic = url.match('yfrog\.com/([0-9a-zA-Z]+)');
$t.addClass('expanded');
if (pic[1])
$t.html('<img class="tnt-image" alt="' + url + '" src="http://yfrog.com/'+pic[1]+'.th.jpg" />')
}
else if( images_okay && url.match('bcphotoshare\.com/photos/[0-9]+/([0-9]+)') )
{
var pic = url.match('bcphotoshare\.com/photos/[0-9]+/([0-9]+)');
$t.addClass('expanded');
if( pic[1] )
$t.html('<img class="tnt-image" alt="'+url+'" src="http://images.bcphotoshare.com/storages/' + pic[1] +'/thumbnail.jpg" />');
}
else if( images_okay && url.match('\.(jpg|jpeg|gif|png)$') )
{
$t.addClass('expanded');
$t.html('<img class="tnt-image" alt="'+url+'" src="http://'+url+'" />')
}
else if( images_okay && url.match(/flickr\.com\/photos\/[^\/]+\/(\d+)/) )
{
pid = url.match(/flickr\.com\/photos\/[^\/]+\/(\d+)/);
if( pid.length == 2 )
{
tnt_twitter.ajax({
url: $t.attr('href'),
callback:function(resp) {
if( resp.status != 200 ) return;
resp = resp.responseText;
var photo_div = resp.between('<div id="photoImgDiv'+pid[1]+'" ','</div>');
var src = photo_div.between('<img src="','"');
var alt = photo_div.between('alt="','"');
if( src.length > 0 && src.match('\.(jpg|jpeg|gif|png)') )
{
$t.html('<img class="tnt-image" alt="'+url+'" src="'+src+'" />');
if( alt.length > 0 ) $t.attr('title',alt);
}
}
});
}
}
else if( images_okay && domain == 'hellotxt.com' && url_parts[1] == 'i' )
{
$t.html('<img class="tnt-image" src="http://hellotxt.com/image/'+url_parts[2]+'.m.jpg" />')
}
else if( images_okay && domain == 'ping.fm' && url_parts[1] == 'p' )
{
tnt_twitter.ajax({
url: $t.attr('href'),
callback: function(resp){
if (resp.status != 200)
return;
resp = resp.responseText;
var photo_div = resp.between('id="imgwrap"', '</div>');
var src = photo_div.between('<img src="', '"');
if (src.length > 0 && src.match('\.(jpg|jpeg|gif|png)')) {
$t.addClass('expanded');
$t.html('<img class="tnt-image" src="' + src + '" />');
}
}
});
}
$t.addClass('expanded');
});
},
user_from_tweet:function($tweet)
{
var $user_link = $tweet.find('.status-body:first a.screen-name:first');
if( $user_link.length != 1)
$user_link = $tweet.find('.author:first a:first');
if( $user_link.length != 1 )
$user_link = $tweet.find('.entry-date:first');
var user = tnt_twitter.user_from_url($user_link.attr('href'))
return user;
},
user_from_url:function( url ){
if( !url ) return false;
var user = url.match('https?://twitter.com/([a-zA-Z0-9_]+)');
if( user ) user = user[1];
return user;
},
status_id_from_url:function( url ){ return url.match('status(es)?/([0-9]+)')[2] },
tweet_get:function(permalink,callback)
{
var status_id = tnt_twitter.status_id_from_url(permalink);
if (tnt_twitter.tweet_cache[status_id]) {
if (typeof callback == "function")
callback(tnt_twitter.tweet_cache[status_id]);
}
else {
tnt_twitter.ajax({
url: permalink,
callback: function(resp){
if( resp.status != 200 ) return;
resp = resp.responseText;
var $resp = $(resp);
var $tweet = $resp.find('#permalink');
var $thumb = $resp.find('.thumb');
var $img = $thumb.find('img:first');
var tweet = {
id: status_id,
user: {
screen_name: tnt_twitter.user_from_url($thumb.find('a').attr('href')),
profile_image_url: $img.attr('src').replace(/_([a-z]+).(jpg|jpeg|gif|png)$/i, '_normal.$2')
},
text: $tweet.find('.entry-content:first,.msgtxt:first').html(),
created_at: $tweet.find('.entry-date span').attr('title')
}
var $in_reply_to_link = $tweet.find('.entry-meta a[href^=http://twitter.com],.entry-meta a[href^=https://twitter.com]').not('.entry-date').filter(function(){
return $(this).text().match('^in reply to')
});
if ($in_reply_to_link.length == 1) {
tweet['in_reply_to_status_id'] = tnt_twitter.status_id_from_url($in_reply_to_link.attr('href'))
tweet['in_reply_to_screen_name'] = tnt_twitter.user_from_url($in_reply_to_link.attr('href'));
}
tnt_twitter.save('tweet_cache', tweet.id, tweet);
if (typeof callback == "function")
callback(tweet);
}
});
}
},
/**
* Add replies to tweet
* @param {jQuery} $tweet tweet that has replies
* @param {Object} reply_link the link to the reply
*/
tweet_get_reply:function( $tweet, reply_link )
{
if( !tnt_twitter.can('show_replies') ) return;
tnt_twitter.tweet_get(reply_link,function(reply){
tnt_twitter.tweet_load_reply(reply,$tweet);
});
},
/**
* Append Reply to Tweet
* @param {tweet} reply object containing reply data
* @param {jQuery} $tweet jQuery Tweet Parent
*/
tweet_load_reply:function(reply,$tweet)
{
$root = $tweet.parents('.root');
if( $root.is('#status_'+ reply.id ) ||
$root.find('#status_'+ reply.id ).length >= 1
)
{
return; //no duplicates.
}
if( !$root.hasClass('has-show-all-button') && $root.find('.status').length > 5 )
{
$fifth_reply = $root.find('.status:first .status:first .status:first .status:first .status:first');
$fifth_reply.before('<a style="display:block;" onclick="javascript:$(this).next().show().prev().remove();return false;" href="#">Show All Replies</a>').hide()
$root.addClass('has-show-all-button');
}
var user = reply.user.screen_name;//alias
var img = '';
if( reply.user.profile_image_url )
img = '<a href="/'+ user +'"><img class="photo fn" width="24" src="'+(reply.user.profile_image_url + '').replace(/_([a-z]+).(jpg|jpeg|gif|png)$/i,'_mini.$2')+'" /></a>'
var klass = 'status u-'+user;
if( reply.in_reply_to_status_id ) klass += ' status-reply';
var reply_html = '<div id="status_'+reply.id+'" class="'+ klass +'">'
reply_html += '<span class="entry-content">'+img
reply_html += ' <a href="/'+ user +'">'+ user +'</a>: ' + reply.text
reply_html += '</span><!--/.entry-content-->'
reply_html += '<span class="meta entry-meta" style="display:inline">'
reply_html += '<a rel="bookmark" class="entry-date" href="'+ tnt_twitter.twitter_url +'/'+user+'/status/'+ reply.id +'"> <span title="'+ reply.created_at +'" class="published">#</span></a>';
if( reply.in_reply_to_status_id )
reply_html += ' <a style="display:none" href="'+ tnt_twitter.twitter_url +'/'+ reply.in_reply_to_screen_name +'/status/'+ reply.in_reply_to_status_id +'">in reply to '+ reply.in_reply_to_screen_name +'</a>'
reply_html += '</span><!--/.entry-meta--></div>'
if( $tweet.find('.status-body').length == 1 ) $tweet = $tweet.find('.status-body');
$tweet.append(reply_html);
tnt_twitter.tweet_process($tweet.find('#status_'+reply.id));
},
load_tweet:function(tweet)
{
if( $('#status_'+tweet.id).length == 1 ) return; // no duplicates
var user = tweet.user.screen_name;//alias
var img = '';
if( tweet.user.profile_image_url )
img = '<a href="/'+ user +'"><img src="'+(tweet.user.profile_image_url + '')+'" /></a>'
var klass = 'hentry status u-'+user;
var reply_meta = '';
if( tweet.in_reply_to_status_id )
{
klass += ' reply';
reply_meta += ' <a style="display:none" href="'+ tnt_twitter.twitter_url +'/'+ tweet.in_reply_to_screen_name +'/status/'+ tweet.in_reply_to_status_id +'">in reply to '+ tweet.in_reply_to_screen_name +'</a>'
}
tweet_html = '<li id="status_' + tweet.id +'" class="'+ klass +'">'
tweet_html += '<span class="thumb vcard author">'+ img +'</span>'
tweet_html += '<span class="status-body"><strong><a href="'+ tnt_twitter.twitter_url +'/'+user+'">'+ user +'</a> </strong>'
tweet_html += '<span class="entry-content">'+ tweet.text +'</span><!--/.entry-content-->'
tweet_html += '<span class="meta entry-meta">'
tweet_html += '<a rel="bookmark" class="entry-date" href="'+tnt_twitter.twitter_url+'/'+user+'/status/'+ tweet.id +'"> <span title="'+ tweet.created_at +'" class="published">#</span></a>';
tweet_html += reply_meta + '</span><!--/.entry-meta--></span><!--/.status-body-->'
tweet_html += '<span class="actions"><div>'
tweet_html += '<a title="reply to '+user +'" href="/home?status=@'+ user +'%20&amp;in_reply_to_status_id='+ tweet.id +'&amp;in_reply_to='+user+'" class="reply">&nbsp;</a>'
tweet_html += '</div></span><!--/.actions-->'
tweet_html += '</li>'
$('#timeline').append(tweet_html);
tnt_twitter.tweet_process($('#status_'+tweet.id));
},
tweet_save_args:function(status_id,user,img,text,created_at,in_reply_to_status_id,in_reply_to_user){
var tweet = {
id: status_id,
user: {
screen_name: user,
profile_image_url: img
},
text: text,
created_at: created_at
}
if( in_reply_to_status_id )
{
tweet['in_reply_to_status_id'] = in_reply_to_status_id
tweet['in_reply_to_screen_name'] = in_reply_to_screen_name;
}
tnt_twitter.save('tweet_cache',tweet.id,tweet);
},
save:function(store,key,value,callback){
tnt_twitter[store][key] = value;
window.setTimeout(function(){
GM_setValue('tnt_twitter.'+store,uneval(tnt_twitter[store]));
if( typeof callback == "function" ) callback();
},100);
},
save_tweets:function(tweets){
tnt_twitter.tweet_cache = $.merge(tnt_twitter.tweet_cache,tweets);
window.setTimeout(function(){ GM_setValue('tnt_twitter.tweet_cache',uneval(tnt_twitter.tweet_cache)); },0);
},
save_username:function(friend){
if( friend.match('twitter.com') )
friend = tnt_twitter.user_from_url(friend);
tnt_twitter.username_cache[friend] = friend
window.setTimeout(function(){
GM_setValue('tnt_twitter.username_cache',uneval(tnt_twitter.username_cache));
},0);
},
add_user_to_group:function(user,group){
if( !group || !user ) return false;
user = user.toLowerCase();
tnt_twitter.group_cache[group][user] = user
window.setTimeout(function(){
GM_setValue('tnt_twitter.group_cache',uneval(tnt_twitter.group_cache));
},0);
},
remove_user_from_group:function(user,group){
if( !group || !user || !tnt_twitter.group_cache[group] ) return false;
user = user.toLowerCase();
delete tnt_twitter.group_cache[group][user]
window.setTimeout(function(){
GM_setValue('tnt_twitter.group_cache',uneval(tnt_twitter.group_cache));
},0);
},
group_create:function(group){
if( group && !tnt_twitter.group_cache[group] ) tnt_twitter.group_cache[group] = {}
window.setTimeout(function(){
GM_setValue('tnt_twitter.group_cache',uneval(tnt_twitter.group_cache));
},0);
$group_selects = $('.group-select');
if( $group_selects.length > 0 )
{
$group_selects.html(tnt_twitter.group_get_opts());
}
},
group_get_opts:function(){
var options = '<option value="create">Create a Group</option>';
$.each(tnt_twitter.group_cache,function(name,members){
options += '<option value="'+ name +'">'+name+'</option>'
});
return options;
},
group_get_list:function(user){
var groups = Array();
$.each(tnt_twitter.group_cache,function(name,members){
if( tnt_twitter.group_cache[name][user] ) groups.push(name);
});
return groups;
},
render_group_list:function(user,$target)
{
if( !user ) return;
user = user.toLowerCase();
var groups = tnt_twitter.group_get_list(user);
if( groups.length > 0 )
{
var prefix = '<span class="tnt-group"><a user="'+user+'" title="remove user this group" href="#">[x]</a> ';
var suffix = '</span>'
$target.html(prefix + groups.join(suffix+', '+ prefix) + suffix)
$target.find('.tnt-group a').click(function(){
var user = $(this).attr('user');
tnt_twitter.remove_user_from_group(user,$(this).parent().text().replace('[x] ',''));
tnt_twitter.render_group_list(user,$target);
return false
});
} else $target.html('');
},
save_usernames:function(friends){
$.each(friends,function(idx,friend){
if( friend.match('twitter.com') )
friend = tnt_twitter.user_from_url(friend);
tnt_twitter.username_cache[friend] = friend;
});
window.setTimeout(function(){
GM_setValue('tnt_twitter.username_cache',uneval(tnt_twitter.username_cache));
},0);
},
load_search:function(query,callback,append)
{
tnt_twitter.search(query,function(result){
tweets = result.tweets;
if( !append )
$('#timeline').children().remove();
$.each(tweets,function(idx,tweet){
tnt_twitter.load_tweet(tweet);
});
$('#loader').hide();
if( result.resp.next_page )
{
var next_page = 'http://search.twitter.com/search'+result.resp.next_page;
$('#pagination .section_links[rel~=prev],#more').attr('href',next_page)
$(window).unbind('scroll').scroll(function(){
if( tnt_twitter.is_scroll_bottom() )
{
next_page = next_page.replace('http://search.twitter.com/search','http://search.twitter.com/search.json');
tnt_twitter.load_search(next_page,function(){},true);
}
$('#pagination').show()
})
}
else
{
$(window).unbind('scroll');
$('#more').hide();
}
if( typeof callback == "function" ) callback();
});
},
group_search:function( query, callback )
{
var search_url = query.replace('tnt-group:',tnt_twitter.yui_group_pipe);
window.setTimeout(function() {
GM_xmlhttpRequest({
method: "GET",
url: search_url,
onload: function(resp) {
if( resp.status != 200 ) return [];
eval('var resp = ' + resp.responseText);
var tweets = {}
$.each(resp.value.items,function(idx,item){
tnt_twitter.tweet_get(item.link,function(tweet){
tweets[tweet.id] = tweet;
try {window.clearTimeout(callback_timer);} catch (e) {}
callback_timer = window.setTimeout(function(){
if( typeof callback == "function" ) callback({resp:resp,tweets:tweets});
},600);
});
});
$('#pagination').hide()
}
});
}, 0);
},
search:function( query, callback )
{
var search_url = query.indexOf( tnt_twitter.twitter_url +'/search?q=') == 0 ? query : 'http://search.twitter.com/search.json?q=' + encodeURIComponent(query)
if( query.indexOf('tnt-group:') > -1 ) tnt_twitter.group_search(query, callback);
window.setTimeout(function() {
GM_xmlhttpRequest({
method: "GET",
url: search_url,
onload: function(resp) {
if( resp.status != 200 ) return [];
eval('var resp = ' + resp.responseText);
var js_tweets = resp.results;
var tweets = {}
var callback_timer;
$.each(js_tweets,function(idx,js_tweet){
if( !js_tweet.to_user_id )//save it isn't in reply to something else. Twitter Search JSON format is missing this attribute.
tnt_twitter.tweet_save_args(js_tweet.id,js_tweet.from_user,js_tweet.profile_image_url,tnt_twitter.linkify_plain(js_tweet.text),js_tweet.created_at);
tnt_twitter.tweet_get(tnt_twitter.twitter_url+'/'+js_tweet.from_user+'/status/'+js_tweet.id,function(tweet){
tweets[tweet.id] = tweet;
if( js_tweet.created_at )
tweet.created_at = js_tweet.created_at
try {window.clearTimeout(callback_timer);} catch (e) {}
callback_timer = window.setTimeout(function(){
if( typeof callback == "function" ) callback({resp:resp,tweets:tweets});
},600);
});
})
}
});
}, 0);
},
cache_ajax:function(options)
{
if( tnt_twitter.ajax_cache[options.url] )
{
options.onload(tnt_twitter.ajax_cache[options.url]);
}
else
{
callback = options.onload;
options.onload = function(resp){
tnt_twitter.save('ajax_cache',options.url,resp,function(){
options.onload = callback;
tnt_twitter.cache_ajax(options);
});
}
window.setTimeout(function(){
tnt_twitter.ajax_queue.push(options);
},0);
}
}
}
/**
* @param {Object} ob checks if object is empty
*/
function is_empty(ob){
for(var i in ob){ return false;}
return true;
}
var DateHelper = {
// Takes the format of "Jan 15, 2007 15:45:00 GMT" and converts it to a relative time
// Ruby strftime: %b %d, %Y %H:%M:%S GMT
time_ago_in_words_with_parsing: function(from) {
var date = new Date;
date.setTime(Date.parse(from));
return this.time_ago_in_words(date);
},
time_ago_in_words: function(from) {
return this.distance_of_time_in_words(new Date, from);
},
distance_of_time_in_words: function(to, from) {
var distance_in_seconds = ((to - from) / 1000);
var distance_in_minutes = Math.floor(distance_in_seconds / 60);
if (distance_in_minutes == 0) { return 'less than a minute ago'; }
if (distance_in_minutes == 1) { return 'a minute ago'; }
if (distance_in_minutes < 45) { return distance_in_minutes + ' minutes ago'; }
if (distance_in_minutes < 90) { return 'about 1 hour ago'; }
if (distance_in_minutes < 1440) { return 'about ' + Math.floor(distance_in_minutes / 60) + ' hours ago'; }
if (distance_in_minutes < 2880) { return '1 day ago'; }
if (distance_in_minutes < 43200) { return Math.floor(distance_in_minutes / 1440) + ' days ago'; }
if (distance_in_minutes < 86400) { return 'about 1 month ago'; }
if (distance_in_minutes < 525960) { return Math.floor(distance_in_minutes / 43200) + ' months ago'; }
if (distance_in_minutes < 1051199) { return 'about 1 year ago'; }
return 'over ' + Math.floor(distance_in_minutes / 525960) + ' years ago';
}
};
/*
pbtweet - pretty good, better tweeting - [ http://web.me.com/t_trace/pbtweet.html ]
pbtweet is published under MIT License.
Copyright © 2009 Taiyo Fujii.
*/
var update_span = 60000;
var update_object = {};
var purge_expression = /public_timeline/;
if (!location.href.match(purge_expression)) setInterval(function() {
insert_update()
},update_span);
function insert_update() {
if (!arguments[0]) { // insert update
var real_timeline = document.getElementById("timeline");
var insert_point = real_timeline.childNodes[0];
var active_timeline_url = document.getElementById('side').getElementsByClassName('active')[0].getElementsByClassName('in-page-link')[0].href;
var top_status_id = active_timeline_url + "?twttr=true";
var insert_point_id = insert_point.id.replace(/status_([0-9]+)/, "$1");
insert_point_id += 0.1;
insert_point_id -= 0.1;
} else { // add next page
var real_timeline = document.getElementById("timeline");
var insert_point = real_timeline;
var insert_point_id = 0.0;
var top_status_id = arguments[0];
var more_buton = null;
if (document.getElementById("more")) {
more_buton = document.getElementById("more");
} else if (document.getElementById("search_more")) {
more_buton = document.getElementById("search_more");
}
var page_num = more_buton.href.match(/page\=([0-9]+)/)[1]; //var page_num = document.getElementById("more").href.match(/page\=([0-9]+)/)[1];
page_num -= 0.0;
var more_url = more_buton.href;
more_buton.href = more_url.replace(/page\=[0-9]+/, ("page=" + (page_num + 1)));
}
var update_req = new XMLHttpRequest();
update_req.onreadystatechange = function() {
if (update_req.readyState == 4 && update_req.status == 200) {
update_object = eval('(' + update_req.responseText + ')');
var insert_HTML = update_object["#timeline"];
var update_wrapper = document.createElement('div');
update_wrapper.style.display = "none";
update_wrapper.id = "pb_updater";
update_wrapper.innerHTML = insert_HTML;
document.getElementById("timeline").parentNode.appendChild(update_wrapper);
var update_node_number = update_wrapper.childNodes[0].childNodes.length;
for (var i = 0; i < update_node_number; i++) {
var updated_entry = update_wrapper.childNodes[0].childNodes[0];
var updated_entry_id = updated_entry.id.replace(/status_([0-9]+)/, "$1");
updated_entry_id += 0.1;
updated_entry_id -= 0.1;
while (updated_entry_id < insert_point_id) {
insert_point = insert_point.nextSibling;
insert_point_id = insert_point.id.replace(/status_([0-9]+)/, "$1");
insert_point_id += 0.1;
insert_point_id -= 0.1; // - debug -- addClass(insert_point, "pb-debug-insert");
} // this try is for myself
//update status text
if (insert_point_id < updated_entry_id) {
document.getElementsByClassName("status-text")[0].textContent = updated_entry.getElementsByClassName("entry-content")[0].textContent;
} //alert(insert_point_id);
if (insert_point_id < updated_entry_id) {
if (insert_point.id != "timeline") {
insert_point.parentNode.insertBefore(updated_entry, insert_point); // latest status class change.
if (insert_point.className.match(/latest\-status/)) {
insert_point.className = insert_point.className.replace(/latest\-status/g, "");
} //only adding page.
} else {
real_timeline.appendChild(updated_entry);
}
} else if (insert_point_id == updated_entry_id) {
updated_entry.parentNode.removeChild(updated_entry);
} else {
update_wrapper.parentNode.removeChild(update_wrapper);
break;
}
}
update_wrapper.parentNode.removeChild(update_wrapper);
}
};
update_req.open('GET', top_status_id, true);
update_req.setRequestHeader("Accept", "application/json, text/javascript, */*");
update_req.setRequestHeader("X-Requested-With", "XMLHttpRequest");
update_req.send(null);
return false;
}
/**
* @author angus
* @url http://userscripts.org/scripts/review/35396
*/
String.prototype.between = function(prefix, suffix) {
s = this;
var i = s.indexOf(prefix);
if (i >= 0) {
s = s.substring(i + prefix.length);
}
else {
return '';
}
if (suffix) {
i = s.indexOf(suffix);
if (i >= 0) {
s = s.substring(0, i);
}
else {
return '';
}
}
return s;
}
String.prototype.linkify = function( is_plain ){
s = this;
if( is_plain )
{
s = s.replace(/(^|\s+)(https*\:\/\/\S+)/g, '$1<a target="_blank" rel="no-follow" href="$2">$2</a>'); //link
s = s.replace(/(^|\s+)(www\.\S+)/g, '$1<a target="_blank" rel="no-follow" href="http://$2">$2</a>'); //link
s = s.replace(/(^|\s+)\@(\w+)/g, '$1@<a class="expanded" href="/$2">$2</a>'); //at
}
if( tnt_twitter.can('hashtags') )
{
s = s.replace(/(^|\s+)\#([\w|-|\.]+)/g, '$1<a class="expanded" title="Search for $2" href="/search?q=%23$2">#$2</a>');//hash
}
return s;
}
tnt_twitter.init();
unsafeWindow.tnt_twitter = tnt_twitter;
if (self.location == top.location && GM_xmlhttpRequest) CheckScriptForUpdate.check();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment