Sunday, October 23, 2011

TwittSeven Plus


// ==UserScript==
// @name           TwittSeven Plus
// @namespace      http://userscripts.org/scripts/show/61163
// @description    Auto-refresh Twitter timeline, override Twitter's stupid keyboard shortcuts and many more enhancements.
// @version        4.0.8
// @author         sfufoet(http://blog.loland.net/)
// @require        http://userscript-updater-generator.appspot.com/?id=61163
// @include        http://twitter.com/*
// @include        https://twitter.com/*
// ==/UserScript==

 //检查新版本的函数
 /***********************************************
         Userscript Updater Generator
                         by ΙδεΠÐ
 http://userscript-updater-generator.appspot.com
 ***********************************************/
 var updater_61163 = {
     id:        "61163",
     name:      "TwittSeven Plus",
     uso_ver:   369772,
     version:   "4.0.7",
     interval:  12 * 3600 * 1000,
     lang:      "en",
     str:       {
         WithVer: {
             en: function(n, v) {return n+" "+v+" has been released.";},
             zh: function(n, v) {return n+"\u811A\u672C\u66F4\u65B0\u81F3"+v+"\u7248";}
         },
         NoVer: {
             en: function(n) {return "An update of "+n+" is available.";},
             zh: function(n) {return n+"\u811A\u672C\u6709\u66F4\u65B0\u7248\u672C";}
         },
         NoUpdate: {
             en: function(n) {return "No update of "+n+" found.";},
             zh: function(n) {return n+"\u811A\u672C\u6709\u66F4\u65B0\u7248\u672C";}
         },
         MenuItem: {
             en: function(n) {return "Check Update For "+n;},
             zh: function(n) {return "\u7ACB\u5373\u66F4\u65B0"+n+"\u811A\u672C";}
         }
     },
     compare:   function(ver1, ver2) {
         var arr1 = ver1.replace(/[^\d\.]/g, "").split("."); 
         var arr2 = ver2.replace(/[^\d\.]/g, "").split(".");
         do {
            var num1 = Number(arr1.shift());
            var num2 = Number(arr2.shift());
            if (num1 == num2)    continue;
            return num1 > num2;
         } while (arr1.length > 0 && arr2.length > 0);
         return arr1.length > 0;
     },
     check:     function(bAlert) {
         if (bAlert === undefined)    bAlert = true;
         GM_xmlhttpRequest({
             method: "GET",
             url:    "http://userscripts.org/scripts/source/61163.meta.js",
             onload: function(xhr) {
                 var meta = xhr.responseText;
                 var _uso_ver = meta.match(/\/\/\s*@uso:version\s*(\d+)/);
                 if (_uso_ver == null)   return;
                 else    _uso_ver = Number(_uso_ver[1]);
                 GM_setValue("lastCheck_61163", Date.now().toString());
                 var root = updater_61163;
                 if (_uso_ver > root.uso_ver) {
                     var _version = meta.match(/\/\/\s*@version\s*(\S+)/);
                     if (_version != null && root.version != "null" && root.compare(_version = _version[1], root.version)) {
                         var reason = meta.match(/\/\*\s*@reason([\s\S]*)@end\s*\*\//);
                         reason = (reason == null ? "" : "\n" + reason[1]);
                         alert(root.str.WithVer[root.lang](root.name, _version) + reason);
                     }
                     else    alert(root.str.NoVer[root.lang](root.name));
                     top.location.href = "http://userscripts.org/scripts/source/61163.user.js";
                 } else if (bAlert)    alert(root.str.NoUpdate[root.lang](root.name));
             }
         });
     },
     start:     function() {
         if (navigator.appName == "Netscape")    this.lang = navigator.language; 
         else    this.lang = navigator.browserLanguage;
         if (this.lang.indexOf("zh") > -1)       this.lang = "zh";
         else    this.lang = "en";
         if (GM_registerMenuCommand)    GM_registerMenuCommand(this.str.MenuItem[this.lang](this.name), this.check);
         if (Date.now() - Number(GM_getValue("lastCheck_61163", 0)) > this.interval)    this.check(false);
     }
 };
 
 //检查更新
  if (self.location == top.location && GM_xmlhttpRequest && GM_getValue && GM_setValue)
   updater_61163.start();
     
function main() {

 // @copyright      2009, 2010 James Campos
 // @license        cc-by-3.0; http://creativecommons.org/licenses/by/3.0/
 // http://userscripts.org/topics/41177
 if (typeof GM_deleteValue == 'undefined') {
  GM_addStyle = function(css) {
   var style = document.createElement('style');
   style.textContent = css;
   document.getElementsByTagName('head')[0].appendChild(style);
  }

  GM_deleteValue = function(name) {
   localStorage.removeItem(name);
  }

  GM_getValue = function(name, defaultValue) {
   var value = localStorage.getItem(name);
   if (!value)
    return defaultValue;
   var type = value[0];
   value = value.substring(1);
   switch (type) {
    case 'b':
     return value == 'true';
    case 'n':
     return Number(value);
    default:
     return value;
   }
  }

  GM_log = function(message) {
   console.log(message);
  }

   GM_registerMenuCommand = function(name, funk) {
  //todo
  }

  GM_setValue = function(name, value) {
   value = (typeof value)[0] + value;
   localStorage.setItem(name, value);
  }
 }

 var hideRT = localStorage.getItem('hideRT') || 'false';
 var hideMute = localStorage.getItem('hideMute') || 'false';
 var hideTranslate = localStorage.getItem('hideTranslate') || 'false';
 var enableShortcuts = localStorage.getItem('enableShortcuts') || 'true';
 var enableAutoRefresh = localStorage.getItem('enableAutoRefresh') || 'true';
 var enableAutoScroll = localStorage.getItem('enableAutoScroll') || 'true';
 var checkMaxTimes = localStorage.getItem('checkMaxTimes') || 15;  // 最后访问点最多检测页数 (pages)
 var langTo = localStorage.getItem('langTo') || 'en';
 var remindTheTweet = localStorage.getItem('remindTheTweet') || 0;
 var hideAvatarRemoval = localStorage.getItem('hideAvatarRemoval') || 'false';
 var filteList = localStorage.getItem('filteList') || '';
 
 GM_addStyle((<r><![CDATA[
 .unread {
     background-color: #ff9;
 }
 .currenttweet {
     background-color:#E3F2F8;
 }
 #ts_ltv {
     text-align: center;
     background-color: #eee;
  height:25px;
 }
 .tweet-actions .ts_ret, .tweet-actions .ts_edt, .tweet-actions .ts_mute, .tweet-actions .ts_translate{
  margin-left:4px;
 }
 .tweet-actions .ts_ret span i {
     background-image: url("data:image/gif,GIF89a%10%10%B3%FF%FF%FF%F8%F8%F8%F1%F1%F1%EA%EA%EA%E4%E4%E4%D6%D6%D6%CF%CF%CF%C1%C1%C1%BB%BB%BB%FF%FF%FF%A1%A1%A1%A1%A1%A1%A1%A1%A1%A1%A1%A1%A1%A1%A1%A1%A1%A1!%F9%04%01%09%2C%10%10%04R0%C9I%2B-8g%9B%0A%F8%20%60%20%96%17~%06A%5E'%8A%BC%2C%60%82%C6H%81%C7%01%06%3C%A9a9%1D%AF%D7%09%1As%C3%80%EF%18D%04%04P%D2k%8A%C8!%A0%D8%95%04w%85%0E%BE%DA%84%E1%D3%15%7C%C1%941%80%E7%3D%87G%D4x%98c%89%3B");
  background-repeat: no-repeat;
  width:15px;
  height:15px;
 }
 .tweet-actions .ts_ret:hover span i {
     background-image: url("data:image/gif,GIF89a%10%10%B3%FF%FF%FF%EF%EF%EF%E0%E0%E0%CF%CF%CF%BF%BF%BF%A0%A0%A0%90%90%90ppp%60%60%60%FF%FF%FF%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20!%F9%04%01%09%2C%10%10%04R0%C9I%2B-8g%9B%0A%F8%20%60%20%96%17~%06A%5E'%8A%BC%2C%60%82%C6H%81%C7%01%06%3C%A9a9%1D%AF%D7%09%1As%C3%80%EF%18D%04%04P%D2k%8A%C8!%A0%D8%95%04w%85%0E%BE%DA%84%E1%D3%15%7C%C1%941%80%E7%3D%87G%D4x%98c%89%3B");
 }
 .tweet-actions .ts_edt span i {
  width:15px;
  height:15px;
     background-image: url("data:image/png,%89PNG%0D%0A%1A%0A%0DIHDR%0F%0F%08%06%3B%D6%95J%09pHYs%0B%13%0B%13%01%9A%9C%18%04gAMA%B1%8E%7C%FBQ%93%20cHRMz%25%80%83%F9%FF%80%E9u0%EA%60%3A%98%17o%92_%C5F%01LIDATx%DA%8C%93!o%021%18%86%9F6hN%90%EE%12%C4%0C%0Au%FF%81%20%17%CC%14%09j%1E%5D%B9!1%F0'HP%9BXpm%F8%2FL1%02%09%0Er%40%3BAz%B9%EE%20%DB%EB%BE%A6O%DF%EF%FD%DA%0A%EF%3DeYk%E3%85X%CF%DDn%F7%23%14%B5%5B%60%96e(%A5*%A4%B5%F6%1D%10%A1%96e0%CB%B2b%E3%F9%7C%E6t%3A%91%E79y%9E%03%D0n%B7%01%DE%80%17%E0A%96A%A5%D4%22%C0%DE%7BB%24!%AEf%B3%D9%8C%F1x%FC%0A%3C%02O%C2%18%13eTJ%7D7%9B%CD4I%92%08%9CL%26t%3A%1D%96%CB%25Z%EB%910%C6D%ED%02%24I%82%F7%1E!%04B%88%08%DC%EF%F7%ECv%3BV%AB%D5u%60J%A9%22Wh%F7%1EX%96%2Cgt%CE%FD%09%06W%AD%F5H%FE%1E%90%94%B2%92%F1%16%08%7C%15%B0s%0E%E7%1C%D3%E9%94~%BFO%9A%A6wA%60!o%5DM%D0v%BB%A5%D1h%14%E0%600%20%80%C0%A6%E2%7C%B9%5C%98%CF%E7%AC%D7%EB%E0%C8%F1x%24%80%D1%F3%0C%CEa%EA%C6%18%86%C3aqP%AB%D5%DAT%DEv%BD%5E%2F%20%AD%F5%CD_q8%1C%A2%BA%06%F4%AC%B5%9F%FCO%BDr%F139K%D8%B8%AD%B5ScIEND%AEB%60%82");
  background-repeat: no-repeat;
 }
 .tweet-actions .ts_edt:hover span i {
     background-image: url("data:image/png,%89PNG%0D%0A%1A%0A%0DIHDR%0F%0F%08%06%3B%D6%95J%09pHYs%0B%13%0B%13%01%9A%9C%18%04gAMA%B1%8E%7C%FBQ%93%20cHRMz%25%80%83%F9%FF%80%E9u0%EA%60%3A%98%17o%92_%C5F%01jIDATx%DA%8C%D3%B1%8E%DA0%1C%C7%F1o%9C%3CC%0F)%D2%11%89%19%BF%23K%86%EA%96n%19O%22%0C%EC%AC%D7%1B%F1%C2%C4%C2%03xk%87%EA%16%06%1E%85%01%24%86VY%C0%02%24%14%3B7%9C%1C%25%85S%FB%DB%FE%96%3F%FA%FB%2F%DBAUU4%A3%94j%2F%B4%F3m%3A%9D%FE%F4Et%0F%A6i%8A%94%F2F*%A5~%81%AFE%13%A6iZo%BC%5C.%9CN'%8C1%1C%0E%07%06%83%01%C0w%E0%19%F8%22%9APJ%F9%E6%B1%B5%16k-%CE9%A2%E8%E3%80%8B%C5%82%2C%CB%5E%80G%E0k0%9B%CDZ3%C6q%FC%BB%DF%EF%3Ft%BB%5D%C20%24%08%02F%A3%11%C3%E1%10%80%F5z%8D%D6%FA5%F236%F2%90%24%09%CE%B9%BB%B0(%0A%E28%26%CB%B2%97%08%40J%891%06%E7%1C%CE9%AC%B5%9F%C2f%C4%DF3VUE%18%86%08!%C8%F3%FC%06%16E%C1~%BFGk%FDz%83%7D%C7%7FA%60%D7%C2eY%22%84%60%3C%1E%93%E79%BD%5E%EFS%08%BC%D5%B8%2C%CB%FAj%7C%B6%DB-%9DN%A7%86%93%C9%04%0F%81%3F7%C7%BE%5E%AF%2C%97Kv%BB%9D%EF%C8%F1x%C4%C3%D6%F3%F4%D8%18Sw%5E%ADV%CC%E7s6%9B%0D%1E%B6p%92%245%D2Z%DF%FD%15%E7%F3%B9UG%C0%93R%EA%17%FF%97%A7f%F1%3E%D5%98%D9%A8%A2%96%B7uIEND%AEB%60%82");
 }
 .tweet-actions .ts_mute  span i {
  background-image:url("data:image/png,%89PNG%0D%0A%1A%0A%0DIHDR%10%10%08%06%1F%F3%FFa%09pHYs%0B%13%0B%13%01%9A%9C%18%0AMiCCPPhotoshop%20ICC%20profilex%DA%9DSwX%93%F7%16%3E%DF%F7e%0FVB%D8%F0%B1%97l%81%22%23%AC%08%C8%10Y%A2%10%92a%84%10%12%40%C5%85%88%0AV%14%15%11%9CHU%C4%82%D5%0AH%9D%88%E2%A0(%B8gA%8A%88Z%8BU%5C8%EE%1F%DC%A7%B5%7Dz%EF%ED%ED%FB%D7%FB%BC%E7%9C%E7%FC%CEy%CF%0F%80%11%12%26%91%E6%A2j9R%85%3C%3A%D8%1F%8FOH%C4%C9%BD%80%02%15H%E0%04%20%10%E6%CB%C2g%05%C5%F0%03yx~t%B0%3F%FC%01%AFo%02p%D5.%24%12%C7%E1%FF%83%BAP%26W%20%91%E0%22%12%E7%0B%01%90R%C8.T%C8%14%C8%18%B0S%B3d%0A%94ly%7CB%22%AA%0D%EC%F4I%3E%05%D8%A9%93%DC%17%D8%A2%1C%A9%08%8D%01%99(G%24%02%40%BB%60U%81R%2C%02%C0%C2%A0%AC%40%22.%04%C0%AE%01%80Y%B62G%02%80%BD%05v%8EX%90%0F%40%60%80%99B%2C%CC%208%02C%1E%13%CD%03%20L%03%A00%D2%BF%E0%A9_p%85%B8H%01%C0%CB%95%CD%97K%D23%14%B8%95%D0%1Aw%F2%F0%E0%E2!%E2%C2l%B1Ba%17)%10f%09%E4%22%9C%97%9B%23%13H%E7%03L%CE%0C%1A%F9%D1%C1%FE8%3F%90%E7%E6%E4%E1%E6f%E7l%EF%F4%C5%A2%FEk%F0o%22%3E!%F1%DF%FE%BC%8C%02%04%10N%CF%EF%DA_%E5%E5%D6%03p%C7%01%B0u%BFk%A9%5B%DAVh%DF%F9%5D3%DB%09%A0Z%0A%D0z%F9%8By8%FC%40%1E%9E%A1P%C8%3C%1D%1C%0A%0B%0B%ED%25b%A1%BD0%E3%8B%3E%FF3%E1o%E0%8B~%F6%FC%40%1E%FE%DBz%F0q%9A%40%99%AD%C0%A3%83%FDqanv%AER%8E%E7%CB%04B1n%F7%E7%23%FE%C7%85%7F%FD%8E)%D1%E24%B1%5C%2C%15%8A%F1X%89%B8P%22M%C7y%B9R%91D!%C9%95%E2%12%E9%7F2%F1%1F%96%FD%09%93w%0D%AC%86O%C0N%B6%07%B5%CBl%C0~%EE%01%02%8B%0EX%D2v%40~%F3-%8C%1A%0B%91%10g42y%F7%93%BF%F9%8F%40%2B%01%CD%97%A4%E3%BC%E8%18%5C%A8%94%17L%C6%08D%A0%81*%B0A%07%0C%C1%14%AC%C0%0E%9C%C1%1D%BC%C0%17%02a%06D%40%0C%24%C0%3C%10B%06%E4%80%1C%0A%A1%18%96A%19T%C0%3A%D8%04%B5%B0%03%1A%A0%11%9A%E1%10%B4%C118%0D%E7%E0%12%5C%81%EBp%17%06%60%18%9E%C2%18%BC%86%09%04A%C8%08%13a!%3A%88%11b%8E%D8%22%CE%08%17%99%8E%04%22aH4%92%80%A4%20%E9%88%14Q%22%C5%C8r%A4%02%A9Bj%91%5DH%23%F2-r%149%8D%5C%40%FA%90%DB%C8%202%8A%FC%8A%BCG1%94%81%B2Q%03%D4%02u%40%B9%A8%1F%1A%8A%C6%A0s%D1t4%0F%5D%80%96%A2k%D1%1A%B4%1E%3D%80%B6%A2%A7%D1K%E8ut%7D%8A%8Ec%80%D11%0Ef%8C%D9a%5C%8C%87E%60%89X%1A%26%C7%16c%E5X5V%8F5c%1DX7v%15%1B%C0%9Ea%EF%08%24%02%8B%80%13%EC%08%5E%84%10%C2l%82%90%90GXLXC%A8%25%EC%23%B4%12%BA%08W%09%83%841%C2'%22%93%A8O%B4%25z%12%F9%C4xb%3A%B1%90XF%AC%26%EE!%1E!%9E%25%5E'%0E%13_%93H%24%0E%C9%92%E4N%0A!%25%902I%0BIkH%DBH-%A4S%A4%3E%D2%10i%9CL%26%EB%90m%C9%DE%E4%08%B2%80%AC%20%97%91%B7%90%0F%90O%92%FB%C9%C3%E4%B7%14%3A%C5%88%E2L%09%A2%24R%A4%94%12J5e%3F%E5%04%A5%9F2B%99%A0%AAQ%CD%A9%9E%D4%08%AA%88%3A%9FZIm%A0vP%2FS%87%A9%134u%9A%25%CD%9B%16C%CB%A4-%A3%D5%D0%9Aigi%F7h%2F%E9t%BA%09%DD%83%1EE%97%D0%97%D2k%E8%07%E9%E7%E9%83%F4w%0C%0D%86%0D%83%C7Hb(%19k%19%7B%19%A7%18%B7%19%2F%99L%A6%05%D3%97%99%C8T0%D72%1B%99g%98%0F%98oUX*%F6*%7C%15%91%CA%12%95%3A%95V%95~%95%E7%AATUsU%3F%D5y%AA%0BT%ABU%0F%AB%5EV%7D%A6FU%B3P%E3%A9%09%D4%16%AB%D5%A9%1DU%BB%A96%AE%CERwR%8FP%CFQ_%A3%BE_%FD%82%FAc%0D%B2%86%85F%A0%86H%A3Tc%B7%C6%19%8D!%16%C62e%F1XB%D6rV%03%EB%2Ck%98Mb%5B%B2%F9%ECLv%05%FB%1Bv%2F%7BLSCs%AAf%ACf%91f%9D%E6q%CD%01%0E%C6%B1%E0%F09%D9%9CJ%CE!%CE%0D%CE%7B-%03-%3F-%B1%D6j%ADf%AD~%AD7%DAz%DA%BE%DAb%EDr%ED%16%ED%EB%DA%EFup%9D%40%9D%2C%9D%F5%3Am%3A%F7u%09%BA6%BAQ%BA%85%BA%DBu%CF%EA%3E%D3c%EBy%E9%09%F5%CA%F5%0E%E9%D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F1%A6%FC%AD%CE%DB%7D%EF%B8%EF%BA%DF%C7%BD%1F%99(%FC%40%FEP%F3%D1%FAc%C7%A7%D0O%F7%3E%E7%7C%FE%FC%2F%F7%84%F3%FB%25%D2%9F3%04gAMA%B1%8E%7C%FBQ%93%20cHRMz%25%80%83%F9%FF%80%E9u0%EA%60%3A%98%17o%92_%C5F%7BIDATx%DA%D4%93A%0E%84%20%10%04k6%FE%A8%1F%B8%F0%40%DE4%1Ed%CDH%20j%D0%C3%F6%85%9ECW%A0%01swf%F4aR%D3%80%05%A0%94%02%80%A4%DD%07%25%E0%0B%E4%EAwI%DA%80GP%95%850aM%BD%23%18%60%92%EC%E7%9B%10%83%F9%FD%12%F3%C9%7C%04%0C%0A%CC!%9C%EE%EC%20%D5rc%89%3E*%B1%95%F7%0Ak%40C%C0%D5%B7%ED%8F%DC%82%FD%FFgZ%07%0E%7C%23%7F%AC%E2%84%3FIEND%AEB%60%82");
  background-repeat: no-repeat;
  width:15px;
  height:15px;
 }
 .tweet-actions .ts_mute:hover  span i {
  background-image:url("data:image/png,%89PNG%0D%0A%1A%0A%0DIHDR%10%10%08%06%1F%F3%FFa%09pHYs%0B%13%0B%13%01%9A%9C%18%0AMiCCPPhotoshop%20ICC%20profilex%DA%9DSwX%93%F7%16%3E%DF%F7e%0FVB%D8%F0%B1%97l%81%22%23%AC%08%C8%10Y%A2%10%92a%84%10%12%40%C5%85%88%0AV%14%15%11%9CHU%C4%82%D5%0AH%9D%88%E2%A0(%B8gA%8A%88Z%8BU%5C8%EE%1F%DC%A7%B5%7Dz%EF%ED%ED%FB%D7%FB%BC%E7%9C%E7%FC%CEy%CF%0F%80%11%12%26%91%E6%A2j9R%85%3C%3A%D8%1F%8FOH%C4%C9%BD%80%02%15H%E0%04%20%10%E6%CB%C2g%05%C5%F0%03yx~t%B0%3F%FC%01%AFo%02p%D5.%24%12%C7%E1%FF%83%BAP%26W%20%91%E0%22%12%E7%0B%01%90R%C8.T%C8%14%C8%18%B0S%B3d%0A%94ly%7CB%22%AA%0D%EC%F4I%3E%05%D8%A9%93%DC%17%D8%A2%1C%A9%08%8D%01%99(G%24%02%40%BB%60U%81R%2C%02%C0%C2%A0%AC%40%22.%04%C0%AE%01%80Y%B62G%02%80%BD%05v%8EX%90%0F%40%60%80%99B%2C%CC%208%02C%1E%13%CD%03%20L%03%A00%D2%BF%E0%A9_p%85%B8H%01%C0%CB%95%CD%97K%D23%14%B8%95%D0%1Aw%F2%F0%E0%E2!%E2%C2l%B1Ba%17)%10f%09%E4%22%9C%97%9B%23%13H%E7%03L%CE%0C%1A%F9%D1%C1%FE8%3F%90%E7%E6%E4%E1%E6f%E7l%EF%F4%C5%A2%FEk%F0o%22%3E!%F1%DF%FE%BC%8C%02%04%10N%CF%EF%DA_%E5%E5%D6%03p%C7%01%B0u%BFk%A9%5B%DAVh%DF%F9%5D3%DB%09%A0Z%0A%D0z%F9%8By8%FC%40%1E%9E%A1P%C8%3C%1D%1C%0A%0B%0B%ED%25b%A1%BD0%E3%8B%3E%FF3%E1o%E0%8B~%F6%FC%40%1E%FE%DBz%F0q%9A%40%99%AD%C0%A3%83%FDqanv%AER%8E%E7%CB%04B1n%F7%E7%23%FE%C7%85%7F%FD%8E)%D1%E24%B1%5C%2C%15%8A%F1X%89%B8P%22M%C7y%B9R%91D!%C9%95%E2%12%E9%7F2%F1%1F%96%FD%09%93w%0D%AC%86O%C0N%B6%07%B5%CBl%C0~%EE%01%02%8B%0EX%D2v%40~%F3-%8C%1A%0B%91%10g42y%F7%93%BF%F9%8F%40%2B%01%CD%97%A4%E3%BC%E8%18%5C%A8%94%17L%C6%08D%A0%81*%B0A%07%0C%C1%14%AC%C0%0E%9C%C1%1D%BC%C0%17%02a%06D%40%0C%24%C0%3C%10B%06%E4%80%1C%0A%A1%18%96A%19T%C0%3A%D8%04%B5%B0%03%1A%A0%11%9A%E1%10%B4%C118%0D%E7%E0%12%5C%81%EBp%17%06%60%18%9E%C2%18%BC%86%09%04A%C8%08%13a!%3A%88%11b%8E%D8%22%CE%08%17%99%8E%04%22aH4%92%80%A4%20%E9%88%14Q%22%C5%C8r%A4%02%A9Bj%91%5DH%23%F2-r%149%8D%5C%40%FA%90%DB%C8%202%8A%FC%8A%BCG1%94%81%B2Q%03%D4%02u%40%B9%A8%1F%1A%8A%C6%A0s%D1t4%0F%5D%80%96%A2k%D1%1A%B4%1E%3D%80%B6%A2%A7%D1K%E8ut%7D%8A%8Ec%80%D11%0Ef%8C%D9a%5C%8C%87E%60%89X%1A%26%C7%16c%E5X5V%8F5c%1DX7v%15%1B%C0%9Ea%EF%08%24%02%8B%80%13%EC%08%5E%84%10%C2l%82%90%90GXLXC%A8%25%EC%23%B4%12%BA%08W%09%83%841%C2'%22%93%A8O%B4%25z%12%F9%C4xb%3A%B1%90XF%AC%26%EE!%1E!%9E%25%5E'%0E%13_%93H%24%0E%C9%92%E4N%0A!%25%902I%0BIkH%DBH-%A4S%A4%3E%D2%10i%9CL%26%EB%90m%C9%DE%E4%08%B2%80%AC%20%97%91%B7%90%0F%90O%92%FB%C9%C3%E4%B7%14%3A%C5%88%E2L%09%A2%24R%A4%94%12J5e%3F%E5%04%A5%9F2B%99%A0%AAQ%CD%A9%9E%D4%08%AA%88%3A%9FZIm%A0vP%2FS%87%A9%134u%9A%25%CD%9B%16C%CB%A4-%A3%D5%D0%9Aigi%F7h%2F%E9t%BA%09%DD%83%1EE%97%D0%97%D2k%E8%07%E9%E7%E9%83%F4w%0C%0D%86%0D%83%C7Hb(%19k%19%7B%19%A7%18%B7%19%2F%99L%A6%05%D3%97%99%C8T0%D72%1B%99g%98%0F%98oUX*%F6*%7C%15%91%CA%12%95%3A%95V%95~%95%E7%AATUsU%3F%D5y%AA%0BT%ABU%0F%AB%5EV%7D%A6FU%B3P%E3%A9%09%D4%16%AB%D5%A9%1DU%BB%A96%AE%CERwR%8FP%CFQ_%A3%BE_%FD%82%FAc%0D%B2%86%85F%A0%86H%A3Tc%B7%C6%19%8D!%16%C62e%F1XB%D6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DA%FD%EA%07%FA%0F%EA%7F%B4%FE%B1e%C0m%E0%F8%60%C0%60%CF%C3Y%0F%EF%0E%09%87%9E%FE%94%FF%D3%87%E1%D2G%CCG%D5%23F%23%8D%8F%9D%1F%1F%1B%0D%1A%BD%F2d%CE%93%E1%A7%B2%A7%13%CF%CA~V%FFy%EBs%AB%E7%DF%FD%E2%FBK%CFX%FC%D8%F0%0B%F9%8B%CF%BF%AEy%A9%F3r%EF%AB%A9%AF%3A%C7%23%C7%1F%BC%CEy%3D%F1%A6%FC%AD%CE%DB%7D%EF%B8%EF%BA%DF%C7%BD%1F%99(%FC%40%FEP%F3%D1%FAc%C7%A7%D0O%F7%3E%E7%7C%FE%FC%2F%F7%84%F3%FB%25%D2%9F3%04gAMA%B1%8E%7C%FBQ%93%20cHRMz%25%80%83%F9%FF%80%E9u0%EA%60%3A%98%17o%92_%C5F%99IDATx%DA%D4%931%0E%C30%08E%9F%A3f%C8%D0s2%F5%02Y%E2%9E%A1%13%17%CD%EA%0C%05%89FX%A9%E4.e%B1%C1%F0%04%DFvi%AD1b%13%836%0C%B8eA%11%01%40U%11%91%0A%3C%80%17Pc%9E%AA%BE%01%22%92%09Q%ACx3%DF%D7%0FH%E9%89h%5D%A4%E0%D8%C1%E4%C9%DEv%1C%E1k%0DT%B5W%FC%0C%AD%BB%7F-b0%9F7%15%F1%EA%1A%ABi%B0%01w%5B%DB%19%92%01%16K%5CCl%0E%FB%D5%CE%97%1E%60O%8AH%60%FBO%5Eb%F9%FF%CFt%0C%3C%20-%AD%DB%06ZmIEND%AEB%60%82");
  background-repeat: no-repeat;
 }
 /*--icon via http://translate.google.com/--*/
 .tweet-actions .ts_translate  span i {
  background-image:url("data:image/png,%89PNG%0D%0A%1A%0A%0DIHDR%10%10%08%03(-%0FS%09pHYs%0B%13%0B%13%01%9A%9C%18%04gAMA%B1%8E%7C%FBQ%93%20cHRMz%25%80%83%F9%FF%80%E9u0%EA%60%3A%98%17o%92_%C5F%03PLTE%BB%BB%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F8%DA%2B%F9G%BB%A4%F8%9D%EA%5E%F69u%12%F6%40%02t%97t7c%18F%D8.)%05%3C_%8F%BF%C7L%13%F8%16(vg%DCBm%07%F6a3%07%22%C2%A2%B9%B7%ED%99%D3%03f%D5%E3%88%F2M%1C%2F%FF%03%5B%90Bm%F4%05%F9vIEND%AEB%60%82");
  background-repeat: no-repeat;
  width:15px;
  height:15px;
 }
 .tweet-actions .ts_translate:hover  span i {
  background-image:url("data:image/png,%89PNG%0D%0A%1A%0A%0DIHDR%10%10%08%03(-%0FS%09pHYs%0B%13%0B%13%01%9A%9C%18%04gAMA%B1%8E%7C%FBQ%93%20cHRMz%25%80%83%F9%FF%80%E9u0%EA%60%3A%98%17o%92_%C5F%03PLTEyyy%DD%DD%DDkkk%A3%A3%A3%8A%8A%8A%C3%C3%C3%A6%A6%A6%7F%7F%7Fwww%DA%DA%DA%7D%7D%7D%5C%5C%5C%EF%EF%EF%D3%D3%D3%7F%7F%7F%8D%8D%8D%AE%AE%AE%E1%E1%E1uuu%AF%AF%AF%94%94%94UUU%BC%BC%BC%E6%E6%E6%9E%9E%9E%F4%F4%F4%B9%B9%B9%B0%B0%B0VVV~~~%E4%E4%E4%80%80%80%8B%8B%8B%98%98%98%AC%AC%AC%91%91%91%D6%D6%D6ccceeeaaa%C6%C6%C6%E7%E7%E7%A8%A8%A8%86%86%86yyy%F8%F8%F8qqqppp%D7%D7%D7%87%87%87%B5%B5%B5jjj%99%99%99%7B%7B%7B%C2%C2%C2bbbfff%96%96%96~~~%9D%9D%9D%AF%AF%AF%EA%EA%EA%82%82%82%A3%A3%A3%7C%7C%7C%88%88%88%BD%BD%BD%8E%8E%8E%D2%D2%D2jjj%CE%CE%CE%A8%A8%A8%A2%A2%A2%92%92%92%5C%5C%5C%C7%C7%C7%8A%8A%8A%E1%E1%E1xxx%A1%A1%A1zzzuuu%82%82%82%B9%B9%B9rrr%8E%8E%8Eiii%88%88%88%9C%9C%9C%CB%CB%CB%D7%D7%D7%D7%D7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%E1%93%8BF%DF%EF'%A2%1D%5COL%E0%FB%8B%A8%94%1F%01%D8%EE%CC%B8%C9%B2%BA%14E%80%9D%C9%07kUU%5D%83pd%C6%1A%02a%18%02%C8%7C%DE%E8%D9%FF%B9%7C%A3%17%EC%DD%3E%B3%D7%EF%C2%EBY%FA%3F%5D%DFLIEND%AEB%60%82");
  background-repeat: no-repeat;
 }
 #ts_filter h2 > span{
  float:left;
  width: 50%;
  vertical-align:middle;
 }
 #ts_filter_list ul{
  margin:0;
  overflow:auto;
  padding:0;
 }
 #ts_filter_list ul li{
  float:left;
  width: 50%;
  vertical-align:middle;
  display:block;
  line-height:22px;
  color:#5A7B80;
 }
 #ts_filter .glass{
  display:block;
  position:absolute;
  cursor:pointer;
  display:block;
  right:32px;
  padding:6px 0px;
 }
 #ts_filter .glass i{
  background-image:url(http://s.twimg.com/a/1291318259/phoenix/img/sprite-icons.png);
  width:14px;
  height:14px;
  background-position:-64px -16px;
  margin-top:0;
  margin-right:1px;
  margin-bottom:0;
  display:block;
 }
 #ts_add_filter{
  border:1px solid #CCCCCC;
  -moz-border-radius:4px;
  -webkit-border-radius:4px;
  font:12px Arial,sans-serif;
  padding:6px 6px 4px 6px;
  background:#FFFFFF;
 }
 a.ts_remove{
  float:right;
  margin-right:15px;
  text-decoration:none;
  font-size: 1.5em;
  color:#999 !important;;
 }
 a.ts_remove:hover{
  color:#333 !important;;
  text-decoration:none;
 }
 .highlight1{
  background-color: #F2DD79;
 }
 .highlight2{
  background-color: #F5E489;
 }
 .highlight3{
  background-color: #FEF8B6;
 }
 .highlight4{
  background-color: transparent;
 }
 #ts_setting_dialog {
     z-index: 1600;
     position: absolute;
     border: 5px solid #1D2224;
     background-color: #FFF;
     text-align:left;
     padding:15px;
     line-height: 20px;
 }
 ul.ts_tab_menu {
  margin: 0;
  padding: 0;
  float: left;
  list-style: none;
  height: 24px; /*--Set height of ts_tab_menu--*/
  border-bottom: 1px solid #999;
  border-left: 1px solid #999;
  border-right: 1px solid #fff;
  width: 100%;
 }
 ul.ts_tab_menu li {
  float: left;
  margin: 0;
  padding: 0;
  height: 23px; /*--Subtract 1px from the height of the unordered list--*/
  line-height: 23px; /*--Vertically aligns the text within the tab--*/
  border: 1px solid #999;
  border-left: none;
  margin-bottom: -1px; /*--Pull the list item down 1px--*/
  overflow: hidden;
  position: relative;
  background: #e0e0e0;
 }
 ul.ts_tab_menu li a {
  text-decoration: none;
  color: #000;
  display: block;
  font-size: 1.2em;
  padding: 0 20px;
  border: 1px solid #fff; /*--Gives the bevel look with a 1px white border inside the list item--*/
  outline: none;
 }
 ul.ts_tab_menu li a:hover {
  background: #ccc;
 }
 html ul.ts_tab_menu li.active, html ul.ts_tab_menu li.active a:hover  { /*--Makes sure that the active tab does not listen to the hover properties--*/
  background: #fff;
  border-bottom: 1px solid #fff; /*--Makes the active tab look like it's connected with its content--*/
 }
 .tab_container {
  border: 1px solid #999;
  border-top: none;
  width: 100%;
  background: #fff;
  margin-bottom:10px;
 }
 .tab_container input, .tab_container select{
  border: 1px solid #999;
 }
 .tab_content {
  padding: 30px 10px 10px 20px;
 }
 .tab_button{
  text-align: right;
 }
 .bio {
  font-style:normal !important;
 }
 .user-description {
  font-style:normal !important;
 }
 .tweet-text-large {
  font-size: 16px !important;
  line-height:20px !important;
 }
 ]]></r>).toString());

 var interid, inReplyTimeId, stateTimeId, curScr;
 var delid = 0, lastid = 0, unread = 0;
 var runfirst = true, lastview, runtimes = 1;
 var lastInReplyId = 0;
 var rpc_data = {};
 var edt = '<a class="ts_edt" title="Edit" href="javascript:void 0;"><span><i></i><b>Edit</b></span></a>';
 var mut = '<a class="ts_mute" title="Mute" href="javascript:void 0;"><span><i></i><b>Mute</b></span></a>';
 var ret = '<a class="ts_ret" title="Retweet" href="javascript:void 0;"><span><i></i><b>RT</b></span></a>';
 var tsl = '<a class="ts_translate" title="Translate" href="javascript:void 0;"><span><i></i><b>Translate</b></span></a>';

 ts_init();

 function ts_init()
 {
  $ = jQuery;
  //超载时自动重定向
  if (document.title.search(/Over capacity/i) != -1){
   if(location.href.search(/http:/i) != -1)
    location.href = location.href.replace(/http\:/, 'https:');
   if(location.href.search(/https:/i) != -1)
    location.href = location.href.replace(/https\:/, 'http:');
  }
     //来自 http://stackoverflow.com/questions/499126/jquery-set-cursor-position-in-text-area
  //控制光标位置
  $.fn.selectRange = function(start, end) {
          return this.each(function() {
                  if(this.setSelectionRange) {
                          this.focus();
                          this.setSelectionRange(start, end);
                  } else if(this.createTextRange) {
                          var range = this.createTextRange();
                          range.collapse(true);
                          range.moveEnd('character', end);
                          range.moveStart('character', start);
                          range.select();
                  }
          });
  };
     //来自 http://stackoverflow.com/questions/2897155/get-caret-position-within-an-text-input-field
  //获取光标位置
  $.fn.getCursorPosition = function() {
         var pos = 0;
         var input = $(this).get(0);
         // IE Support
         if (document.selection) {
             input.focus();
             var sel = document.selection.createRange();
             var selLen = document.selection.createRange().text.length;
             sel.moveStart('character', -input.value.length);
             pos = sel.text.length - selLen;
         }
         // Firefox support
         else if (input.selectionStart || input.selectionStart == '0')
             pos = input.selectionStart;

         return pos;
     }

  //文本框自动改变大小 
  //http://james.padolsey.com/javascript/jquery-plugin-autoresize/
  $.fn.autoResize = function(options) {
         // Just some abstracted details,
         // to make plugin users happy:
         var settings = $.extend({
             onResize : function(){},
             animate : true,
             animateDuration : 150,
             animateCallback : function(){},
             extraSpace : 20,
             limit: 1000
         }, options);
         
         // Only textarea's auto-resize:
         this.filter('textarea').each(function(){
             
                 // Get rid of scrollbars and disable WebKit resizing:
             var textarea = $(this),
             
                 // Cache original height, for use later:
                 origHeight = textarea.height(),
                 
                 // Need clone of textarea, hidden off screen:
                 clone = function(){
                     
                     // Properties which may effect space taken up by chracters:
                     var props = ['height','width','lineHeight','textDecoration','letterSpacing'],
                         propOb = {};
                         
                     // Create object of styles to apply:
                     $.each(props, function(i, prop){
                         propOb[prop] = textarea.css(prop);
                     });
                     if ($('#ts_autoresize').length != 1)
                      $('<textarea id="ts_autoresize"></textarea>').css({resize:'none','overflow-y':'hidden'}).css({
                          position: 'absolute',
                          top: 0,
                          left: -9999
                      }).css(propOb).attr('tabIndex','-1').insertBefore(textarea);
                 },
                 lastScrollTop = null,
                 updateSize = function(e) {
      clone();
                     // Prepare the clone:
                     $('#ts_autoresize').height(0).val($(this).val()).scrollTop(10000);
      
                     // Find the height of text:
                     var scrollTop = Math.max($('#ts_autoresize').scrollTop(), origHeight) + settings.extraSpace,
                         toChange = $(this);
       
                     // Don't do anything if scrollTip hasen't changed:
                     if (lastScrollTop === scrollTop) { return; }
                     lastScrollTop = scrollTop;
      
                     // Check for limit:
                     if ( scrollTop >= settings.limit ) {
                         $(this).css('overflow-y','');
                         return;
                     }
                     // Fire off callback:
                     settings.onResize.call(this);
      
                     // Either animate or directly apply height:
                     settings.animate && textarea.css('display') === 'block' ?
                         toChange.stop().animate({height:scrollTop}, settings.animateDuration, settings.animateCallback)
                         : toChange.height(scrollTop);
                 };
             
             // Bind namespaced handlers to appropriate events:
             textarea
                 .unbind('.dynSiz')
                 .bind('keyup.dynSiz', updateSize)
                 .bind('keydown.dynSiz', updateSize)
                 .bind('change.dynSiz', updateSize)
              .bind('focus.dynSiz', updateSize);
             
         });
         
         // Chain:
         return this;
     };

     lastview = getCookie('ts_last') || 0;
     createUI() && bindEvents();// && successHandler();
  if(hideAvatarRemoval === 'true'){
   $('.tweet-image').hide();
      $('.tweet-content').css('margin-left', '0px');
     }
     if(enableShortcuts === 'true'){
      (function () {
             twttr.provide("twttr.shortcuts");
             twttr.shortcuts.currentKey = null;
             var A = [];
             var B = {
                 71: "g",
                 85: "u",
                 82: "r",
                 80: "p",
                 72: "h",
                 70: "f",
                 88: "x",
                 77: "m"
             };
             $(document).keydown(function (C) {
                 if (twttr.shortcuts.verify(C) && $(C.target).is(":not(input)")) {
                     C.preventDefault()
                 } else {
                     twttr.shortcuts.currentKey = null
                 }
             });
             twttr.magic("twttr.shortcuts.combo", function (D, C) {
                 A.push({
                     keys: D,
                     fn: C
                 })
             });
             twttr.magic("twttr.shortcuts.verify", function (F) {
                 var G = F.keyCode;
                 var C = false;
                 for (var D = 0; D < A.length; D++) {
                     var E = A[D];
                     if (B[G] === E.keys[0]) {
                         C = true;
                         twttr.shortcuts.currentKey = B[G];
                         break
                     } else {
                         if (B[G] === E.keys[1] && twttr.shortcuts.currentKey === E.keys[0]) {
                             C = true;
                             twttr.shortcuts.currentKey = null;
                             E.fn();
                             break
                         }
                     }
                 }
                 return C
             })
         }());
      addShortcuts();
      twttr.shortcuts.combo(["g", "u"], function () {
             scribble("open-goto-user-dialog", {
                 input: "keyboard"
             });
             twttr.widget.Autocomplete.getAutocompletedUsers();
             twttr.dialogs.goToUser().open()
         });
         twttr.shortcuts.combo(["g", "r"], function () {
          $('.currenttweet').removeClass("currenttweet");
             scribble("switch-stream", {
                 input: "keyboard",
                 toStream: "mentions"
             });
             twttr.router.routeTo(twttr.router.mentionsPath())
         });
         twttr.shortcuts.combo(["g", "p"], function () {
             scribble("switch-page", {
                 input: "keyboard",
                 toPage: "profile"
             });
             twttr.router.routeTo(twttr.router.profilePath({
                 screen_name: twttr.currentUser.screenName
             }))
         });
         twttr.shortcuts.combo(["g", "m"], function () {
          $('.currenttweet').removeClass("currenttweet");
             scribble("switch-page", {
                 input: "keyboard",
                 toPage: "messages"
             });
             twttr.router.routeTo(twttr.router.messagesPath())
         });
         twttr.shortcuts.combo(["g", "h"], function () {
             scribble("switch-stream", {
                 input: "keyboard",
                 toStream: "home"
             });
             twttr.router.routeTo(twttr.router.homePath())
         });
         twttr.shortcuts.combo(["g", "f"], function () {
          $('.currenttweet').removeClass("currenttweet");
             scribble("switch-stream", {
                 input: "keyboard",
                 toStream: "favorites"
             });
             twttr.router.routeTo(twttr.router.favoritesPath())
         });
     }
 }

 function createUI()
 {
     // 配置对话框
     $('<div id="ts_setting_dialog"> <ul  class="ts_tab_menu">' +
   ' <li><a href="#Features">Features</a></li>' +
   ' <li><a href="#UI">UI</a></li>' +
   ' <li><a href="#Alert">Alert</a></li>' +
   '</ul>' +
   '<div class="tab_container">' +
    '<div id="Features" class="tab_content">' +
    '<label><input type="checkbox" name="enableShortcuts" id="enableShortcuts" /> Override Twitter\'s Shortcuts (Press F5 to reload)</label><br />' +
    '<label><input type="checkbox" name="enableAutoRefresh" id="enableAutoRefresh" /> Auto refresh (Press F5 to reload)</label><br />' +
    '<label><input type="checkbox" name="enableAutoScroll" id="enableAutoScroll" /> After refreshing, auto scroll down</label><br />' +
    '  Stop check last visit, if pages &gt;<input type="text" name="checkMaxTimes" id="checkMaxTimes" size="6" /><br />' +
    '  Translate a tweet to <select id="langTo">' +
     '<option value="af">Afrikaans</option>' +
     '<option value="sq">Albanian</option>' +
     '<option value="ar">Arabic</option>' +
     '<option value="hy">Armenian</option>' +
     '<option value="az">Azerbaijani</option>' +
     '<option value="eu">Basque</option>' +
     '<option value="be">Belarusian</option>' +
     '<option value="bg">Bulgarian</option>' +
     '<option value="ca">Catalan</option>' +
     '<option value="zh-CN">Chinese (Simplified)</option>' +
     '<option value="zh-TW">Chinese (Traditional)</option>' +
     '<option value="hr">Croatian</option>' +
     '<option value="cs">Czech</option>' +
     '<option value="da">Danish</option>' +
     '<option value="nl">Dutch</option>' +
     '<option value="en">English</option>' +
     '<option value="et">Estonian</option>' +
     '<option value="tl">Filipino</option>' +
     '<option value="fi">Finnish</option>' +
     '<option value="fr">French</option>' +
     '<option value="gl">Galician</option>' +
     '<option value="ka">Georgian</option>' +
     '<option value="de">German</option>' +
     '<option value="el">Greek</option>' +
     '<option value="ht">Haitian Creole</option>' +
     '<option value="iw">Hebrew</option>' +
     '<option value="hi">Hindi</option>' +
     '<option value="hu">Hungarian</option>' +
     '<option value="is">Icelandic</option>' +
     '<option value="id">Indonesian</option>' +
     '<option value="ga">Irish</option>' +
     '<option value="it">Italian</option>' +
     '<option value="ja">Japanese</option>' +
     '<option value="ko">Korean</option>' +
     '<option value="la">Latin</option>' +
     '<option value="lv">Latvian</option>' +
     '<option value="lt">Lithuanian</option>' +
     '<option value="mk">Macedonian</option>' +
     '<option value="ms">Malay</option>' +
     '<option value="mt">Maltese</option>' +
     '<option value="no">Norwegian</option>' +
     '<option value="fa">Persian</option>' +
     '<option value="pl">Polish</option>' +
     '<option value="pt">Portuguese</option>' +
     '<option value="ro">Romanian</option>' +
     '<option value="ru">Russian</option>' +
     '<option value="sr">Serbian</option>' +
     '<option value="sk">Slovak</option>' +
     '<option value="sl">Slovenian</option>' +
     '<option value="es">Spanish</option>' +
     '<option value="sw">Swahili</option>' +
     '<option value="sv">Swedish</option>' +
     '<option value="th">Thai</option>' +
     '<option value="tr">Turkish</option>' +
     '<option value="uk">Ukrainian</option>' +
     '<option value="ur">Urdu</option>' +
     '<option value="vi">Vietnamese</option>' +
     '<option value="cy">Welsh</option>' +
     '<option value="yi">Yiddish</option>' +
     '</select>' +
    '</div>' +
    '<div id="UI" class="tab_content">' +
    '<label><input type="checkbox" name="hideRT" id="hideRT" /> Hide Twittsevn&acute;s &quot;Retweet&quot; button (Press F5 to reload)</label><br />' +
    '<label><input type="checkbox" name="hideMute" id="hideMute" /> Hide &quot;Mute&quot; (Press F5 to reload)</label><br />' +
    '<label><input type="checkbox" name="hideTranslate" id="hideTranslate" /> Hide &quot;Translate&quot; (Press F5 to reload)</label><br />' +
    '<label><input type="checkbox" name="hideAvatarRemoval" id="hideAvatarRemoval" /> Hide Avatars</label><br />' +
    '</div>' +
    '<div id="Alert" class="tab_content">' +
    'Remind me, if I will be reach my <input type="text" name="remindTheTweet" id="remindTheTweet" size="6" /> tweets' +
    '</div>' +
   '</div><div class="tab_button"><input type="button" name="ts_Save" id="ts_Save" value="Save" class="button selected"/>&nbsp;&nbsp;&nbsp;<input type="button" name="ts_Cancel" id="ts_Cancel" value="Cancel" class="button"/></div></div>').appendTo('body').hide();
  //插入配置按钮
     $('.user-dropdown li:first').before('<li><a href="javascript:void 0;" id="ts_setting">TwittSeven plus</a></li>');

     $('#ts_setting').click(function(e){
      if($('#ts_setting_dialog').is(":hidden")){
    var offset = $(this).offset();
    $('#ts_setting_dialog').css({'left':offset.left - 230, 'top':offset.top + 35}).fadeIn();
    if(hideRT === 'true') document.getElementById('hideRT').checked = true;
    if(hideMute === 'true') document.getElementById('hideMute').checked = true;
    if(hideTranslate === 'true') document.getElementById('hideTranslate').checked = true;
    if(hideAvatarRemoval === 'true') document.getElementById('hideAvatarRemoval').checked = true;
    if(enableShortcuts === 'true') document.getElementById('enableShortcuts').checked = true;
    if(enableAutoRefresh === 'true') document.getElementById('enableAutoRefresh').checked = true;
    if(enableAutoScroll === 'true') document.getElementById('enableAutoScroll').checked = true;
    $('#checkMaxTimes').val(checkMaxTimes);
    $('#langTo option[value|=' + langTo + ']').attr('selected', 'selected');
    $('#remindTheTweet').val(remindTheTweet);
    $(".tab_content").hide();
    $("ul.ts_tab_menu li:first").addClass("active").show();
    $(".tab_content:first").show();
   }else{
    $("ul.ts_tab_menu li").removeClass("active");
    $('#ts_setting_dialog').fadeOut();
   }
  });
  $("ul.ts_tab_menu li").click(function() {
   $("ul.ts_tab_menu li").removeClass("active");
   $(this).addClass("active");
   $(".tab_content").hide();
   var activeTab = $(this).find("a").attr("href");
   $(activeTab).fadeIn();
   return false;
  });

  $('#ts_Save').click(function(){
   $('#ts_setting_dialog').hide();
   updateSetting();
  });
  $('#ts_Cancel').click(function(){
   $('#ts_setting_dialog').hide();
  });
  //隐藏新推提示。
  if(enableAutoRefresh === 'true')
   GM_addStyle('#new-tweets-bar{display:none !important;}');
  
     return true;
 }
 function updateSetting(){
  $("ul.ts_tab_menu li").removeClass("active");
  if(document.getElementById('hideRT').checked) hideRT = 'true'; else hideRT = 'false';
  if(document.getElementById('hideMute').checked) hideMute = 'true'; else hideMute = 'false';
  if(document.getElementById('hideAvatarRemoval').checked){
   hideAvatarRemoval = 'true';
      $('.tweet-image').hide();
      $('.tweet-content').css('margin-left', '0px');
  }else{
   hideAvatarRemoval = 'false';
   $('.tweet-image').show();
      $('.tweet-content').css('margin-left', '58px');
  }
  if(document.getElementById('hideTranslate').checked) hideTranslate = 'true'; else hideTranslate = 'false';
  if(document.getElementById('enableShortcuts').checked) enableShortcuts = 'true'; else enableShortcuts = 'false';
  if(document.getElementById('enableAutoRefresh').checked) enableAutoRefresh = 'true'; else enableAutoRefresh = 'false';
  if(document.getElementById('enableAutoScroll').checked) enableAutoScroll = 'true'; else enableAutoScroll = 'false';
  checkMaxTimes = $('#checkMaxTimes').val();
  langTo = $('#langTo option:selected').val();
  remindTheTweet = $('#remindTheTweet').val();
  localStorage.setItem('hideRT', hideRT);
  localStorage.setItem('hideMute', hideMute);
  localStorage.setItem('hideTranslate', hideTranslate);
  localStorage.setItem('hideAvatarRemoval', hideAvatarRemoval);
  localStorage.setItem('enableShortcuts', enableShortcuts);
  localStorage.setItem('enableAutoRefresh', enableAutoRefresh);
  localStorage.setItem('enableAutoScroll', enableAutoScroll);
  localStorage.setItem('checkMaxTimes', checkMaxTimes);
  localStorage.setItem('langTo', langTo);
  localStorage.setItem('remindTheTweet', remindTheTweet);
 }
 function bindEvents()
 {
  $(document).bind('DOMNodeInserted', function(event) {
   //自动点击 XX new tweets 按钮
   if(event.target.id.indexOf("new-tweets-bar") !== -1){
    if(enableAutoRefresh === 'true'){
     $('#new-tweets-bar').trigger('click');
     if($('.stream-tab-home').hasClass("active")){
      lastid = getLastId();
      //写入 Cookie
      setCookie('ts_last', getLastId(), 60 * 60 * 24 * 15);
     }
     checkUnread();
//     successHandler();
    }
   }
   if(event.target.className.indexOf("stream-item") !== -1){
    //successHandler();
    //如果 Timeline tab 激活,记录一下 lastid
    if($('.stream-tab-home').hasClass("active")){
     lastid = getLastId();
     //写入 Cookie
     setCookie('ts_last', getLastId(), 60 * 60 * 24 * 15);
    }
    //把最后一个 tweet 加上 .LastTweet 属性,刷新时间线后,读取从开头到 .LastTweet 的 tweet,加上高亮属性,并移动浏览器的滚动条
    if($('.LastTweet').html() == null){
     $('.stream-item:first').addClass("LastTweet");
    }else{
     var scrollTo = 0, currentTop = $(window).scrollTop();
     $('.stream-item').each(function(){
      if($(this).hasClass("LastTweet"))
       return false
      else{
       //添加自定义按钮
         if(hideRT === 'false')
       $(this).find('.tweet-actions').append(ret);
      if(hideMute === 'false')
          $(this).find('.tweet-actions').append(mut);
         $(this).find('.tweet-actions:has(.delete-action)').append(edt);
         if(hideTranslate === 'false')
          $('.tweet-actions:not(:has(.ts_translate))').append(tsl);

      var ts_current_tweet=$(this);
      // 检查一下 mute 列表
      $('#ts_mute a').each(function(){
       if($(this).html()==ts_current_tweet.find('.tweet-screen-name').html()){
        ts_current_tweet.remove();
        return false
       }
      });
      // 检查过滤 filter 列表
      $('#ts_filter_list ul li input:checked').each(function(){
       if(ts_current_tweet.find('.tweet-text').html().indexOf($(this).parent().find('span').html()) !== -1){
        ts_current_tweet.remove();
        return false
       }
      });
      //如果不是自己发的推,就标记为未读
      if($('#screen-name').html().replace(/\s+/g,'') !== ts_current_tweet.find('.tweet-screen-name').html().replace(/\s+/g,''))
       $(this).addClass('unread');
       if(ts_current_tweet.html().indexOf("by " + $('#screen-name').html().replace(/\s+/g,'')) !== -1)
         $(this).removeClass('unread');
      if(enableAutoScroll === 'true' && $('.twitter-anywhere-tweet-box-editor:focus').attr("class") == undefined)
       scrollTo = scrollTo + $(this).outerHeight();
      }
     });
     $(window).scrollTop(currentTop + scrollTo);
     $('.LastTweet').removeClass("LastTweet");
     $('.stream-item:first').addClass("LastTweet");
     checkUnread();
     //successHandler();
    }
    
   }
   //在输入框下面插入 mute list
   if(event.target.className.indexOf("definition") !== -1){
    $('.text-area').after('<div id="ts_mute">Muted List: </div>');
    $('#ts_mute').hide();
   }
   //插入过滤功能
   if(event.target.className.indexOf("trend-location") !== -1){
    if($('#ts_filter').html() == null){
     $('.trends-inner').parent().before('<div class="component" ><div id="ts_filter"><h2><span style="font-size:16px;font-weight:300;">Filter: </span> <form id="ts_filter_form" action="javascript:void 0;"><span><span class="glass" id="ts_filter_button"><i></i></span><input type="text" id="ts_add_filter" size="25"/></span></form></h2>' +
      '<div id="ts_filter_list"><ul>' + filteList + '</ul></div>'+
      '</div><hr class="component-spacer">' +
     '</div>');
     if(filteList == '')
      $('#ts_filter_list').hide();
    }
   }
  }).bind('DOMNodeRemoved', function(event) {
   if(event.target.className.indexOf("stream-item") !== -1) 
   {
    if($('#screen-name').html().replace(/\s+/g,'') == $('.stream-item:first').find('.tweet-screen-name').html().replace(/\s+/g,'')){
     setTimeout(function(){
      //如果 Timeline tab 激活,记录一下 lastid
      if($('.stream-tab-home').hasClass("active")){
       lastid = getLastId();
       //写入 Cookie
       setCookie('ts_last', getLastId(), 60 * 60 * 24 * 15);
      }
     }, 100);
    }
    else{
     //如果 Timeline tab 激活,记录一下 lastid
     if($('.stream-tab-home').hasClass("active")){
      lastid = getLastId();
      //写入 Cookie
      setCookie('ts_last', getLastId(), 60 * 60 * 24 * 15);
     }
    }
    //把最后一个 tweet 加上 .LastTweet 属性,刷新时间线后,读取从开头到 .LastTweet 的 tweet,加上高亮属性,并移动浏览器的滚动条
    if($('.LastTweet').html() == null){
     $('.stream-item:first').addClass("LastTweet");
    }
   }
   //翻页或者tweet载入完毕会触发这个事件
   if(event.target.className.indexOf("stream-loading") !== -1){
    //添加自定义按钮
    if($('.olddestTweet').html() == null){
        if(hideRT === 'false')
      $('.stream-item .tweet-actions').each(function(){$(this).append(ret)});
     if(hideMute === 'false')
      $('.stream-item .tweet-actions').each(function(){$(this).append(mut)});
     $('.stream-item .tweet-actions:has(.delete-action)').each(function(){$(this).append(edt)});
        if(hideTranslate === 'false')
         $('.stream-item .tweet-actions').each(function(){$(this).append(tsl)});
       }else{
     $('.olddestTweet').nextAll().each(function(){
      //添加按钮
         if(hideRT === 'false')
       $(this).find('.tweet-actions').append(ret);
      if(hideMute === 'false')
          $(this).find('.tweet-actions').append(mut);
         $(this).find('.tweet-actions:has(.delete-action)').append(edt);
         if(hideTranslate === 'false')
          $('.tweet-actions:not(:has(.ts_translate))').append(tsl);
     });
     $('.olddestTweet').removeClass('olddestTweet');
     $('.stream-item:last').addClass('olddestTweet');
    }
    $('.stream-item:last').addClass('olddestTweet');
//    successHandler();
    // 检查一下 mute 列表
    $('#ts_mute a').each(function(){
     if($(this).html()==ts_current_tweet.find('.tweet-screen-name').html()){
      ts_current_tweet.remove();
      return false
     }
    });
    // 检查过滤 filter 列表
    $('#ts_filter_list ul li input:checked').each(function(){
     var ts_current_filter = $(this);
     $('.stream-item').each(function(){
      if($(this).find('.tweet-text').html().indexOf(ts_current_filter.parent().find('span').html()) !== -1){
       $(this).remove();
      }
     });
    });
    if(runfirst == false || lastview == 0 || !$('.stream-tab-home').hasClass("active")) return;
    runtimes++;
    gotoLastView();
   }
  }).bind('DOMNodeInserted', function(event) {
   if(event.target.className.indexOf("twttr-dialog-container") !== -1) 
   {
    setTimeout(function(){
      $('.twttr-dialog-container .twitter-anywhere-tweet-box-editor').bind('keydown keypress',function(e){
       if(e.which == 27)
       {
           e.preventDefault();
           if(!twttr.widget.Autocomplete._isCompletionsOpen){
            if(delid > 0)
                   resetDelid();
                   $('.twttr-dialog-container').html("");
        }
          }
         });
      $('.twttr-dialog-close').bind('click',function(e){
       if(delid > 0)
                 resetDelid();
                 $('.twttr-dialog-container').html("");
         });
    }, 0);
   }
  });

  //如果提交成功,则删除掉原来的推。
   $('#message-drawer').bind('DOMNodeInserted', function(event) {
    if(delid > 0)
             {
              $('.DeleteThisTweet .delete-action').trigger('click');
              $('.twttr-prompt-ok').trigger('click');
              resetDelid();
             }
   });
  //当鼠标悬浮在未读的推上
  $('.unread').live('mouseover', function(){$(this).removeClass('unread');unread--;checkUnread();});
  //当点击或者悬浮在一个推上的时候,把 currenttweet 赋值给它,这样就能从被点击的推,用 JK 快捷键来进行跳跃性移动。
  $('.stream-item').live('click mouseover', function(){
   $('.currenttweet').removeClass("currenttweet");
   $(this).addClass("currenttweet");
   //判断有没有按钮,没有就插入自定义按钮
      if(hideRT === 'false')
    $(this).find('.tweet-actions:not(:has(.ts_ret))').append(ret);
   if(hideMute === 'false')
       $(this).find('.tweet-actions:not(:has(.ts_mute))').append(mut);
      $('.tweet-actions:not(:has(.ts_edt)):has(.delete-action)').append(edt);
      if(hideTranslate === 'false')
       $(this).find('.tweet-actions:not(:has(.ts_translate))').append(tsl);
      // 转换 t.co 链接为正常链接
      $(this).find('.tweet-text a').each(function() {
        if ($(this).attr("title") !== "")
      $(this).attr({href: $(this).attr("title").replace(/\/$/g,'')});
    });
  });

     //这里还未处理。$(window).ajaxSuccess(successHandler).ajaxComplete(successHandler);
     var uriRegex = /(http|https|ftp|mailto|tel)\:\/\/(?!(bit\.ly))[\d\w-]+(\.[\d\w-]+)*(?:(?:\/[^\s/]*))*/g
  $('.twitter-anywhere-tweet-box-editor').live('focus',function(e){
   //自动调整输入框
   if( $(this).data("focused") == undefined){
    $('.twitter-anywhere-tweet-box-editor').keydown(function (e) {
        if (e.ctrlKey && e.keyCode == 13) {
         $(this).blur();
         $(this).parent().parent().parent().find('.tweet-button').trigger('click');
        }
    });
    $('.twitter-anywhere-tweet-box-editor').keyup(function (e) {
     if($(this).parent().parent().parent().find('.tweet-counter').attr('value') <= 20 && $(this).val().match(uriRegex)){
      var currentTweetBox = $(this);
      $.grep($(this).val().match(uriRegex), function(n,i){
       if(n.length > 25){
        var currentCursorPosition = currentTweetBox.getCursorPosition();
        currentTweetBox.attr('disabled', 'disabled');
        currentTweetBox.parent().parent().parent().find('.tweet-spinner').show();
        //currentTweetBox.parent().parent().parent().find('.tweetbox-counter-tipsy').css('opacity','1').html('Shortening URI');
        isGdShortenURL(n, function(shortenUrl) {
         currentTweetBox.attr('disabled', '');
         currentTweetBox.blur();
         var afterCursorPosition = currentCursorPosition - n.length + shortenUrl.length;
         currentTweetBox.val(currentTweetBox.val().replace(n, shortenUrl));
         currentTweetBox.parent().parent().parent().find('.tweet-counter').val(140 - currentTweetBox.val().length);
         currentTweetBox.parent().parent().parent().find('.tweet-spinner').hide();
         var I = 140 - currentTweetBox.val().length;
         var H = currentTweetBox.parent().parent().parent().find('.tweet-counter');
         if (I > 120 && I < 130) {
             H.addClass("warn").removeClass("superwarn")
         } else {
             if (I >= 130) {
                 H.addClass("superwarn").removeClass("warn")
             } else {
                 H.removeClass("superwarn").removeClass("warn")
             }
         }
         currentTweetBox.selectRange(afterCursorPosition, afterCursorPosition);
                    });
                    //currentTweetBox.parent().parent().parent().find('.tweetbox-counter-tipsy').css('opacity','0').html('Links will appear shortened');
       }
      });
     }
    });
       $(this).autoResize({
        // On resize:
        onResize : function() {
            $(this).css({opacity:0.8});
        },
        // After resize:
        animateCallback : function() {
            $(this).css({opacity:1});
        },
        // Quite slow animation:
        animateDuration : 500,
        // More extra space:
        extraSpace : 18
    });
    $(this).data("focused", "focused");
   }
   if($('.tweet-count').html() !== null){
    //发推数到达特定数字的提醒。
    if(--remindTheTweet == $('.tweet-count').html().replace(/,/,'')){
     remindTheTweet++;
     twttr.showMessage("This will be your " + remindTheTweet +" tweets!");
    }else{remindTheTweet++;}
   }
  });

     $('.ts_ret').live('mouseup', function(e){
      var ts_tweet_text = $(this).parents().parents().parents().find('.tweet-text').html();
      var ts_tweet_screen_name = $(this).parents().parents().parents().find('.tweet-screen-name').html();
       ts_tweet_text = ts_tweet_text.replace(/@<a[^\>]*>([^<]*)<\/a>/gi, '@$1');
       ts_tweet_text = ts_tweet_text.replace(/<hr>/gi, '\n\n' + 'RT @' + ts_tweet_screen_name + ' ');
          ts_tweet_text = ts_tweet_text.replace(/<img[^>]*>/gi, '');
          ts_tweet_text = ts_tweet_text.replace(/<a[^\>]*>(#[^<]*)<\/a>/gi, '$1');
          ts_tweet_text = ts_tweet_text.replace(/<a[^\>]*href=\"([^\s]*)\"[^\>]*>[^<]*<\/a>/gi, '$1');
          ts_tweet_text = ts_tweet_text.replace(/<[^>]*>/gi, '');
   var ts_content = "RT @" + ts_tweet_screen_name + " " +ts_tweet_text
         new twttr.widget.TweetDialog({
             draggable:true,template:{
              title:"ReTweeting"
             }, defaultContent:ts_content, origin:"TS-Retweet-button"
         }).open().focus();
   scribble("ReTweeting-dialog",{input:"keyboard"});
   $('.twttr-dialog-container .twitter-anywhere-tweet-box-editor').selectRange(0, 0);
     });
     
     $('.ts_edt').live('mouseup', function(e){
      resetDelid();
      var ts_tweet_text = $(this).parent().parent().parent().find('.tweet-text').html();
      var ts_tweet_screen_name = $(this).parent().parent().parent().find('.tweet-screen-name').html();
       ts_tweet_text = ts_tweet_text.replace(/@<a[^\>]*>([^<]*)<\/a>/gi, '@$1');
          ts_tweet_text = ts_tweet_text.replace(/<img[^>]*>/gi, '');
          ts_tweet_text = ts_tweet_text.replace(/<a[^\>]*>(#[^<]*)<\/a>/gi, '$1');
          ts_tweet_text = ts_tweet_text.replace(/<a[^\>]*href=\"([^\s]*)\"[^\>]*>[^<]*<\/a>/gi, '$1');
          ts_tweet_text = ts_tweet_text.replace(/<[^>]*>/gi, '');
   var ts_content = ts_tweet_text
         new twttr.widget.TweetDialog({
             draggable:true,template:{
              title:"Edit your tweet"
             }, defaultContent:ts_content, origin:"TS-Edit-button"
         }).open().focus();
   scribble("Edit-Tweet-dialog",{input:"keyboard"});
   delid = $(this).parents().parents().parents().find('.stream-item-content').attr('data-item-id');
   $(this).parent().parent().parent().addClass("DeleteThisTweet");
     });
     $('.ts_translate').live('mouseup', function(e){
      if($('.currenttweet #translated').length == 0){
       $('.stream-item:hover').addClass("translated");
       var ts_tweet_text = $('.stream-item:hover .tweet-text').html();
    $.getJSON("http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&langpair=|" + langTo + "&q=" + escape(ts_tweet_text) + "&callback=?", function(data) {
     $('.translated .tweet-text').html($('.translated .tweet-text').html() + '<div id="translated" style="margin:0"><HR style="margin:5px 0 5px 0">' + data.responseData.translatedText + '</div>');
     $('.translated').removeClass("translated");
     $('.currenttweet .ts_translate b').html("Remove");
     $('.currenttweet .ts_translate').attr('title','Remove Translation');
    });
   }else{
    $('.currenttweet #translated').remove();
    $('.currenttweet .ts_translate b').html("Translate");
    $('.currenttweet .ts_translate').attr('title','Translate')
   }
     });
     $('.ts_mute').live('mouseup', Mute);
     $('#ts_filter_button').live('mouseup', addFilter);
     $('#ts_filter_form').live('submit', addFilter);
     $('#ts_filter_list ul label').live('mouseup', function(){
       if($(this).find('input').attr('checked'))
     $(this).html('<input class="ts_filter_item" type="checkbox"> <span>' + $(this).find('span').html() + '</span>').removeAttr('id');
    else
     $(this).html('<input checked class="ts_filter_item" type="checkbox"> <span>' + $(this).find('span').html() + '</span>').removeAttr('id');
       //记录过滤列表到 localStorage 里面
       filteList = $('#ts_filter_list ul').html();
       localStorage.setItem('filteList', $('#ts_filter_list ul').html());
     });
     $('.ts_remove').live('mouseup', function(){
      $(this).parent().remove();
   if($('#ts_filter_list ul li').length == 0)
    $('#ts_filter_list').hide();
   //记录过滤列表到 localStorage 里面
      filteList = $('#ts_filter_list ul').html();
      localStorage.setItem('filteList', $('#ts_filter_list ul').html());
     });
     $('.unretweet-action').live('mouseup', function(e){
      if($('.stream-item:first').attr('data-item-id') == $(this).parent().attr('data-tweet-id')){
       lastid = $('.stream-item:eq(1)').attr('data-item-id');
       localStorage.setItem('ts_last', $('.stream-item:eq(1)').attr('data-item-id'));
      }
     });
     $('#ts_mute a').live('click',function(){
   $(this).remove();
   if($('#ts_mute a').length == 0)
    $('#ts_mute').hide();
  });
     return true;
 }

 function isGdShortenURL(url, callback) {
   url = "http://is.gd/api.php?longurl=" + url;
         $.getJSON("http://query.yahooapis.com/v1/public/yql?" + "q=select%20*%20from%20html%20where%20url%3D%22" + encodeURIComponent(url) + "%22&format=xml'&callback=?", function (data) {
             if (data.results[0]) {
                 var shortenUrl = $(data.results[0]).eq(1).html();
                 callback(shortenUrl);
             }
         });
 }
 
 function successHandler(e, XHR, settings){
     if(hideRT === 'false')
   $('.tweet-actions:not(:has(.ts_ret)):not(:has(.delete-action))').append(ret);
  if(hideMute === 'false')
      $('.tweet-actions:not(:has(.ts_mute)):not(:has(.delete-action))').append(mut);
     $('.tweet-actions:not(:has(.ts_edt)):has(.delete-action)').append(edt);
     if(hideTranslate === 'false')
      $('.tweet-actions:not(:has(.ts_translate))').append(tsl);
     if(hideAvatarRemoval === 'true'){
   $('.tweet-image').hide();
      $('.tweet-content').css('margin-left', '0px');
     }
     return true;
 }

 function gotoLastView(){
     var cat = '#ts_ltv', gostatus = $('.stream-tweet[data-tweet-id|=' + lastview + ']');
     runfirst = gostatus.length == 0 && runtimes < checkMaxTimes;

     if(runfirst)
         window.scrollTo(0, $(document).height());
     else
     {
         gostatus.length > 0 
             ? gostatus.prev("div").before('<div id="ts_ltv"><span class="meta">~~~~~~~ Last visit ~~~~~~~</span></div>') 
             : cat = '#footer';
         window.scrollTo(0, $(cat).offset().top - window.innerHeight + 60);
     }
 }

 function getLastId()
 {
     return $('.stream-item:first').attr('data-item-id');
 }

 function getTime(time)
 {
     var m = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
     var d = new Date(time.replace(' +', 'GMT+'));
     return d.getHours() + ':' + d.getMinutes() + ' ' + m[d.getMonth()] + ' ' + d.getDate() + ', ' + d.getFullYear();
 }

 function checkUnread()
 {
     unread = $('.unread').length;
     document.title = (unread > 0 ? '(' + unread + ') ' : '') + document.title.replace(/\(\d+\)\s/g, '');
 }

 function resetDelid()
 {
     delid = 0;
 }

 function textHandler(text)
 {
     var reg_url = /((?:http|https|ftp|telnet|file)\:\/\/[^\s]+)/ig;
     var reg_rpl = /@([a-z0-9_]+)/ig;
     var reg_tag = /#([^\s]+)/ig;
     text = text.replace(reg_url, '<a href="$1" target="_blank">$1</a>');
     text = text.replace(reg_rpl, '@<a href="/$1">$1</a>');
     text = text.replace(reg_tag, '<a href="/search?q=%23$1">#$1</a>');
     return text;
 }


 // Data
 function setData(key, value)
 {
     rpc_data[keyHandler(key)] = value;
 }

 // Cookie
 function setCookie(sName, sValue, iTime){
     var date = new Date();
     date.setTime(date.getTime()+iTime*1000);
     document.cookie = escape(sName) + "=" + escape(sValue) + "; expires=" + date.toGMTString();
 }

 function getCookie(sName){
     var aCookie = document.cookie.split("; ");
     for (var i=0; i <aCookie.length; i++){
         var aCrumb = aCookie[i].split("=");
         if (escape(sName) == aCrumb[0])
             return unescape(aCrumb[1]);
     }
     return null;
 }

 function getData(key, value)
 {
     return rpc_data[keyHandler(key)] || value;
 }

 function keyHandler(key)
 {
     return key.replace('http://', '').replace(/\.|\-|\//g, '_');
 }

 // urlencode
 function urlencode(str)
 {
     // ! @   #   $   %   ^ &   *()_ +   - =   /   ?   ,   <.> ;   :   '"[{]}`~\|
     // ! %40 %23 %24 %25 ^ %26 *()_ %2B - %3D %2F %3F %2C <.> %3B %3A '"[{]}`~\|
     str = str.replace(/\%/ig, '%25');
     
     str = str.replace(/\#/g, '%23');
     str = str.replace(/\$/g, '%24');
     str = str.replace(/\&/g, '%26');
     str = str.replace(/\+/g, '%2B');
     str = str.replace(/\,/g, '%2C');
     str = str.replace(/\//g, '%2F');
     str = str.replace(/\:/g, '%3A');
     str = str.replace(/\;/g, '%3B');
     str = str.replace(/\=/g, '%3D');
     str = str.replace(/\?/g, '%3F');
     str = str.replace(/\@/g, '%40');
     return str;
 }

 function addFilter(){
  var fltKeyword = $('#ts_add_filter').val().replace(/\s+$/g, '');
  if(fltKeyword.length > 0){
   var isDuplicate = false;
   if($('#ts_filter_list ul li').length == 0)
    $('#ts_filter_list').show();
   $('#ts_filter_list ul li span').each(function(){
    //alert($(this).html());
    //alert(fltKeyword);
    if($(this).html() === fltKeyword){
     //highlight animation http://www.neodream.info/blog/tag/jquery/
     if($('#effectSpan').html() == null){
      var effectSpan = $('<span id="effectSpan" style="position:relative;background-color:#ff9;z-index:10;font-weight:bold;"></span>').text(fltKeyword).css({ left: -$(this).width(), top: 0 });
                  $(this).parent().append(effectSpan);
                  effectSpan.delay(500).fadeOut(2000, function() {
                      $(this).remove();
                  });
                 }
     $('#ts_add_filter').val("");
     isDuplicate = true;
     return false
    }
   });
   if(isDuplicate) return;
   //记录过滤列表到 Cookie 里面
   filteList = $('#ts_filter_list ul').html();
   $('#ts_filter_list ul').append('<li><label><input type="checkbox" checked class="ts_filter_item" id="ts_input"/> <span>' + fltKeyword + '</span></label><a class="ts_remove" href="#" title="Remove it">×</a></li>');
   $('#ts_input').attr('checked', 'checked').removeAttr('id');
      localStorage.setItem('filteList', $('#ts_filter_list ul').html());
      
   //删除时间线上的东西
   $('.stream-item').each(function(){
    var scrollTo = 0, currentTop = $(window).scrollTop();
    var ts_current_tweet=$(this);
    if(ts_current_tweet.find('.tweet-text').html().indexOf($('#ts_add_filter').val()) !== -1){
     if(ts_current_tweet.index() < $('.stream-item').index($('div.currenttweet')))
      scrollTo = scrollTo + ts_current_tweet.outerHeight();
     ts_current_tweet.remove();
    }
    $(window).scrollTop(currentTop - scrollTo);
   });
   $('#ts_add_filter').val("");
  }
 }
 function Mute(){
  if($('.currenttweet .tweet-screen-name').html() == null)
   return
  var isMuted = false;
  $('#ts_mute').show();
  if($('#ts_mute a').length == 0)
   $('#ts_mute').append('<a href="javascript:void 0;" title="Unmute">' + $('.currenttweet .tweet-screen-name').html() + '</a> ');
  else
  {
   $('#ts_mute a').each(function(){
    if($(this).html()==$('.currenttweet .tweet-screen-name').html())
     isMuted = true;
   });
   if(!isMuted){
    $('#ts_mute').append('<a href="javascript:void 0;" title="Unmute">' + $('.currenttweet .tweet-screen-name').html() + '</a> ');
   }
  }
  $('.stream-item').each(function(){
    var scrollTo = 0, currentTop = $(window).scrollTop();
    var ts_current_tweet=$(this);
    $('#ts_mute a').each(function(){
     if($(this).html()==ts_current_tweet.find('.tweet-screen-name').html()){
      if(ts_current_tweet.index() < $('.stream-item').index($('div.currenttweet')))
       scrollTo = scrollTo + ts_current_tweet.outerHeight();
      ts_current_tweet.remove();
     }
    });
    $(window).scrollTop(currentTop - scrollTo);
   });
 }
 // 快捷键
 function addShortcuts(){
   
  /**
   * http://www.openjs.com/scripts/events/keyboard_shortcuts/
   * Version : 2.01.B
   * By Binny V A
   * License : BSD
   */
  shortcut = {
   'all_shortcuts':{},//All the shortcuts are stored in this array
   'add': function(shortcut_combination,callback,opt) {
    //Provide a set of default options
    var default_options = {
     'type':'keydown',
     'propagate':false,
     'disable_in_input':true,
     'target':document,
     'keycode':false
    }
    if(!opt) opt = default_options;
    else {
     for(var dfo in default_options) {
      if(typeof opt[dfo] == 'undefined') opt[dfo] = default_options[dfo];
     }
    }

    var ele = opt.target;
    if(typeof opt.target == 'string') ele = document.getElementById(opt.target);
    var ths = this;
    shortcut_combination = shortcut_combination.toLowerCase();

    //The function to be called at keypress
    var func = function(e) {
     e = e || window.event;
     
     if(opt['disable_in_input']) { //Don't enable shortcut keys in Input, Textarea fields
      var element;
      if(e.target) element=e.target;
      else if(e.srcElement) element=e.srcElement;
      if(element.nodeType==3) element=element.parentNode;
      if(element.tagName == 'INPUT' || element.tagName == 'TEXTAREA' || element.tagName == 'SELECT') return;
     }
   
     //Find Which key is pressed
     if (e.keyCode) code = e.keyCode;
     else if (e.which) code = e.which;
     var character = String.fromCharCode(code).toLowerCase();
     
     if(code == 188) character=","; //If the user presses , when the type is onkeydown
     if(code == 190) character="."; //If the user presses , when the type is onkeydown

     var keys = shortcut_combination.split("+");
     //Key Pressed - counts the number of valid keypresses - if it is same as the number of keys, the shortcut function is invoked
     var kp = 0;
     
     //Work around for stupid Shift key bug created by using lowercase - as a result the shift+num combination was broken
     var shift_nums = {
      "`":"~",
      "1":"!",
      "2":"@",
      "3":"#",
      "4":"$",
      "5":"%",
      "6":"^",
      "7":"&",
      "8":"*",
      "9":"(",
      "0":")",
      "-":"_",
      "=":"+",
      ";":":",
      "'":"\"",
      ",":"<",
      ".":">",
      "/":"?",
      "\\":"|"
     }
     //Special Keys - and their codes
     var special_keys = {
      'esc':27,
      'escape':27,
      'tab':9,
      'space':32,
      'return':13,
      'enter':13,
      'backspace':8,
   
      'scrolllock':145,
      'scroll_lock':145,
      'scroll':145,
      'capslock':20,
      'caps_lock':20,
      'caps':20,
      'numlock':144,
      'num_lock':144,
      'num':144,
      
      'pause':19,
      'break':19,
      
      'insert':45,
      'home':36,
      'delete':46,
      'end':35,
      
      'pageup':33,
      'page_up':33,
      'pu':33,
   
      'pagedown':34,
      'page_down':34,
      'pd':34,
   
      'left':37,
      'up':38,
      'right':39,
      'down':40,
   
      'f1':112,
      'f2':113,
      'f3':114,
      'f4':115,
      'f5':116,
      'f6':117,
      'f7':118,
      'f8':119,
      'f9':120,
      'f10':121,
      'f11':122,
      'f12':123
     }
   
     var modifiers = { 
      shift: { wanted:false, pressed:false},
      ctrl : { wanted:false, pressed:false},
      alt  : { wanted:false, pressed:false},
      meta : { wanted:false, pressed:false} //Meta is Mac specific
     };
                          
     if(e.ctrlKey) modifiers.ctrl.pressed = true;
     if(e.shiftKey) modifiers.shift.pressed = true;
     if(e.altKey) modifiers.alt.pressed = true;
     if(e.metaKey)   modifiers.meta.pressed = true;
                          
     for(var i=0; k=keys[i],i<keys.length; i++) {
      //Modifiers
      if(k == 'ctrl' || k == 'control') {
       kp++;
       modifiers.ctrl.wanted = true;

      } else if(k == 'shift') {
       kp++;
       modifiers.shift.wanted = true;

      } else if(k == 'alt') {
       kp++;
       modifiers.alt.wanted = true;
      } else if(k == 'meta') {
       kp++;
       modifiers.meta.wanted = true;
      } else if(k.length > 1) { //If it is a special key
       if(special_keys[k] == code) kp++;
       
      } else if(opt['keycode']) {
       if(opt['keycode'] == code) kp++;

      } else { //The special keys did not match
       if(character == k) kp++;
       else {
        if(shift_nums[character] && e.shiftKey) { //Stupid Shift key bug created by using lowercase
         character = shift_nums[character]; 
         if(character == k) kp++;
        }
       }
      }
     }
     
     if(kp == keys.length && 
        modifiers.ctrl.pressed == modifiers.ctrl.wanted &&
        modifiers.shift.pressed == modifiers.shift.wanted &&
        modifiers.alt.pressed == modifiers.alt.wanted &&
        modifiers.meta.pressed == modifiers.meta.wanted) {
      callback(e);
   
      if(!opt['propagate']) { //Stop the event
       //e.cancelBubble is supported by IE - this will kill the bubbling process.
       e.cancelBubble = true;
       e.returnValue = false;
   
       //e.stopPropagation works in Firefox.
       if (e.stopPropagation) {
        e.stopPropagation();
        e.preventDefault();
       }
       return false;
      }
     }
    }
    this.all_shortcuts[shortcut_combination] = {
     'callback':func, 
     'target':ele, 
     'event': opt['type']
    };
    //Attach the function with the event
    if(ele.addEventListener) ele.addEventListener(opt['type'], func, false);
    else if(ele.attachEvent) ele.attachEvent('on' +opt['type'], func);
    else ele['on' +opt['type']] = func;
   },

   //Remove the shortcut - just specify the shortcut and I will remove the binding
   'remove':function(shortcut_combination) {
    shortcut_combination = shortcut_combination.toLowerCase();
    var binding = this.all_shortcuts[shortcut_combination];
    delete(this.all_shortcuts[shortcut_combination])
    if(!binding) return;
    var type = binding['event'];
    var ele = binding['target'];
    var callback = binding['callback'];

    if(ele.detachEvent) ele.detachEvent('on' +type, callback);
    else if(ele.removeEventListener) ele.removeEventListener(type, callback, false);
    else ele['on' +type] = false;
   }
  }
  //回复
  shortcut.add("R",function() {
   $(".currenttweet .reply-action").trigger('click');
  });
  //RT
  shortcut.add("Shift+R",function() {
   $(".currenttweet .ts_ret").trigger('mousedown').trigger('mouseup');
  });
  //收藏,加星
  shortcut.add("S",function() {
   if($('.currenttweet .unfavorite-action').length > 0){
    $('.currenttweet .unfavorite-action').trigger('click');
    return
   }
   if($('.currenttweet .favorite-action').length > 0){
    $('.currenttweet .favorite-action').trigger('click');
   }

  });
  //选中下一个推
  shortcut.add("J",function() {
   if($('.currenttweet').html() == null){
    $('.stream-item:first').addClass("currenttweet");
    return
   }
   if (!$('.currenttweet').is(":last-child")) {
    var cheight=$('.currenttweet').outerHeight();
    $('.currenttweet').removeClass("currenttweet").next("div").trigger("mouseover").addClass("currenttweet");
    $(window).scrollTop($(window).scrollTop() + cheight);
    if($('.currenttweet').hasClass("unread"))
    {
     $('.currenttweet').removeClass('unread');
     unread--;
     checkUnread();
    }
   }
  });
  //选中上一个推
  shortcut.add("K",function() {
   if($('.currenttweet').html() == null){
    $('.stream-item:first').addClass("currenttweet");
    return
   }
   if (!$('.currenttweet').is(":first-child")) {
    var cheight=$('.currenttweet').outerHeight();
    $('.currenttweet').removeClass("currenttweet").prev("div").trigger("mouseover").addClass("currenttweet");
    $(window).scrollTop($(window).scrollTop() - cheight);
    if($('.currenttweet').hasClass("unread"))
    {
     $('.currenttweet').removeClass('unread');
     unread--;
     checkUnread();
    }
   }

  });
  //DM 当前,比 twitter 自己定义的方便多了,还插入了用户名和头像。
  shortcut.add("D",function() {
   if($('.currenttweet').html() == null)
    return
   else{
    var ts_tweet_screen_name = $('.currenttweet .tweet-screen-name').html();
    var ts_tweet_avatar = $('.currenttweet .user-profile-link').attr('src');
    twttr.dialogs.directMessage({
              origin: "message-dialog-hotkey"
          }).open().focus();
          scribble("dialog-direct-message", {
              input: "keyboard"
          });
          $('.twttr-directmessage-input').val(ts_tweet_screen_name);
          $('.avatar').attr('src',ts_tweet_avatar);
         }
  });
  //打开当前推里面的链接
  shortcut.add("L",function() {
   $('.currenttweet .tweet-text .twitter-timeline-link').each(function(){
    var reg=/^\//;
    if(!reg.test($(this).attr('href'))) 
     window.open($(this).attr('href'));
   });
  });
  //标记为已读
  shortcut.add("Shift+A",function() {
      unread = 0;
      $('.unread').removeClass('unread');
      document.title = document.title.replace(/\(\d+\)\s/g, '');
      checkUnread();
  });

  //F 官方 RT 或者 undo
  shortcut.add("F",function() {
   if($('.currenttweet .unretweet-action').length > 0){
    $('.currenttweet .unretweet-action').trigger('click');
    return
   }
   if($('.currenttweet .retweet-action').length > 0){
    $('.currenttweet .retweet-action').trigger('click');
    $('.twttr-prompt-ok').trigger('click');
   }
  });
  //T 翻译或者取消翻译
  shortcut.add("t",function() {
   $('.currenttweet .ts_translate').trigger('mousedown').trigger('mouseup');
  });
  //快捷键 12345 对应 home,reply,DM,Fav,RT。模仿 GR 的快捷键。
  shortcut.add("1",function() {
   $('.stream-tab-home a').trigger('click');
  });
  shortcut.add("2",function() {
   $('.stream-tab-mentions a').trigger('click');
  });
  shortcut.add("3",function() {
   $('.stream-tab-retweets a').trigger('click');
  });
  shortcut.add("4",function() {
   $('.stream-tab-searches').trigger('click');
  });
  shortcut.add("5",function() {
   $('.stream-tab-lists a').trigger('click');
  });

  //C 一键清理当前推以下的 tweets
  shortcut.add("C",function() {
   $('.olddestTweet').removeClass('olddestTweet');
   $('.stream-item').not($('.unread')).each(function(){
    if($(this).index() > $('.stream-item').index($('div.currenttweet'))+10)
     $(this).remove();
   });
   $('.stream-item:last').addClass('olddestTweet');
  });
  
  // Shift + C 一键清理当前推以上的 tweets
  shortcut.add("Shift+C",function() {
   var scrollTo = 0, currentTop = $(window).scrollTop();
   $('.stream-item').not($('.unread')).each(function(){
    if ($(this).index() == $('.stream-item').index($('div.currenttweet')) || $('.stream-item').index($('div.currenttweet')) < 10)
     return false
    if($(this).index() > 10 && $(this).index() < $('.stream-item').index($('div.currenttweet'))){
     scrollTo = scrollTo + $(this).outerHeight();
     $(this).remove();
    }
   });
   $(window).scrollTop(currentTop - scrollTo);
  });
  
  //M Mute 某人
  shortcut.add("M",function(e) {
   setTimeout($('.twttr-dialog-container').html(""), 100);
   Mute();
  });
  //N 点击 New Tweet 按钮
  shortcut.add("N",function() {
   $('#new-tweet').trigger('mouseup');
  });
  //恢复回车功能
  shortcut.add("enter",function() {
   if ($('.tweet-button:focus').attr("class") == undefined)
      $('.currenttweet').trigger('click');
  });
  //恢复 ESC 功能
  shortcut.add("esc",function() {
   $('.twttr-dialog-container').html("");
  });
  //恢复 . 功能
  shortcut.add(".",function() {
   $('.stream-tabs .active').trigger('click');
  });
  //恢复 F5 功能
  shortcut.add("F5",function() {
   location.reload();
  });
  $(document).bind("keypress", function (A) {
            if (A.charCode == 63) {
             $('.twttr-dialog-container').html(
     "  <div style=\"width: 550px; height: auto; left: 225px; top: 135px;\" class=\"twttr-dialog\">" +
     "    <div class=\"twttr-dialog-header\">" +
     "      <h3>Keyboard shortcuts</h3> <div class=\"twttr-dialog-close\"><b>×</b></div>" +
     "    </div>" +
     "    <div class=\"twttr-dialog-inside\">" +
     "      <div class=\"twttr-dialog-body clearfix\">" +
     "        <div class=\"twttr-dialog-content\">" +
     "          <div class=\"t-section t-tpl-33-67\" id=\"keyboard-shortcut-menu\">  <div class=\"t-unit t-first\">    <dl>      <dt>Actions</dt>      <dd><strong>s(star) :</strong> <em>favorite or undo</em></dd>      <dd><strong>r :</strong> <em>reply</em></dd>      <dd><strong>f(forward) :</strong> <em>retweet or undo</em></dd>      <dd><strong>Shift - r(RT) :</strong> <em>RT</em></dd>      <dd><strong>Shift - a :</strong> <em>Mark all sa read</em></dd>      <dd><strong>d :</strong> <em>direct message</em></dd>      <dd><strong>n :</strong> <em>new Tweet</em></dd>            <dd><strong>l :</strong> <em>open all links in the current tweet</em></dd>      <dd><strong>t :</strong> <em>translate or undo.</em></dd>      <dd><strong>c :</strong> <em>downward clean up</em></dd>      <dd><strong>shift - c :</strong> <em>upward clean up</em></dd>      <dd><strong>m :</strong> <em>mute</em></dd>      <dd><strong>ctrl - enter :</strong> <em>submit</em></dd>      <dd><strong>enter :</strong> <em>toggle details pane</em></dd>    </dl>  </div>  <div class=\"t-unit\">    <div class=\"t-section t-tpl-50-50\">      <div class=\"t-unit t-first\">        <dl>          <dt>Navigation</dt>          <dd><strong>? :</strong> <em>this menu</em></dd>          <dd><strong>j :</strong> <em>next Tweet</em></dd>          <dd><strong>k :</strong> <em>previous Tweet</em></dd>          <dd><strong>space :</strong> <em>page down</em></dd>          <dd><strong>/ :</strong> <em>search</em></dd>          <dd><strong>. :</strong> <em>refresh Tweets and back to top</em></dd>        </dl>      </div>      <div class=\"t-unit\">        <dl>          <dt>Timelines</dt>          <dd><strong>g h :</strong> <em><u>h</u>ome</em></dd>          <dd><strong>g r :</strong> <em><u>r</u>eplies / mentions</em></dd>          <dd><strong>g p :</strong> <em><u>p</u>rofile</em></dd>          <dd><strong>g f :</strong> <em><u>f</u>avorites</em></dd>          <dd><strong>g m :</strong> <em><u>m</u>essages</em></dd>          <dd><strong>g u :</strong> <em>go to <u>u</u>ser</em></dd>        </dl>      </div>    </div>  </div></div>" +
     "        </div>" +
     "      </div>" +
     "      <div style=\"display: none;\" class=\"twttr-dialog-footer clearfix\">" +
     "      </div>" +
     "    </div>" +
     "  </div>"
    ).show();
            }
        });
 }
}

var $, jQuery;
loading();

function loading()
{
    unsafeWindow.jQuery ? init() : setTimeout(loading, 100);

}

function init()
{
 $ = jQuery = unsafeWindow.jQuery;
 var enableShortcuts = localStorage.getItem('enableShortcuts') || 'true';
 $(document).ready(function() {
  var script = document.createElement('script');
  script.appendChild(document.createTextNode('(' + main +')();'));
  (document.body || document.head || document.documentElement).appendChild(script);
 // http://stackoverflow.com/questions/2303147/injecting-js-functions-into-the-page-from-a-greasemonkey-script-on-chrome
 });
 var twttr = unsafeWindow.twttr;
 if(enableShortcuts === 'true'){
  $(window).load(function() {
   var intervalId = setInterval(function() {
    var currentPage = twttr.app.currentPage();
    if (currentPage) {
     clearInterval(intervalId);
     twttr.app.currentPage().onkeydown = function(){};
     twttr.app.currentPage().onkeyup = function(){};
     twttr.app.currentPage().onkeypress = function(){};
     twttr.constants.keyCodes.escape = 124;
     twttr.constants.keyCodes.esc = 124;
     twttr.constants.charCodes.questionMark = 124;
     $('<div class="twttr-dialog-container"></div>').appendTo('body').hide();
    }
   }, 10);
  });
 }
}

// https://github.com/JeffreyWay/jQuery-Cross-Domain-Requests/blob/master/cross-domain-requests.js
// http://net.tutsplus.com/tutorials/javascript-ajax/quick-tip-cross-domain-ajax-request-with-yql-and-jquery/
// Accepts a url and a callback function to run.
function requestCrossDomain( site, callback ) {
 
 // If no url was passed, exit.
 if ( !site ) {
  alert('No site was passed.');
  return false;
 }
 
 // Take the provided url, and add it to a YQL query. Make sure you encode it!
 var yql = 'http://query.yahooapis.com/v1/public/yql?q=' + encodeURIComponent('select * from html where url="' + site + '"') + '&format=xml&callback=?';
 
 // Request that YSQL string, and run a callback function.
 // Pass a defined function to prevent cache-busting.
 $.getJSON( yql, cbFunc );
 
 function cbFunc(data) {
 // If we have something to work with...
 if ( data.results[0] ) {
  // Strip out all script tags, for security reasons.
  // BE VERY CAREFUL. This helps, but we should do more. 
  data = data.results[0].replace(/<script[^>]*>[\s\S]*?<\/script>/gi, '');
  
  // If the user passed a callback, and it
  // is a function, call it, and send through the data var.
  if ( typeof callback === 'function') {
   callback(data);
  }
 }
 // Else, Maybe we requested a site that doesn't exist, and nothing returned.
 else throw new Error('Nothing returned from getJSON.');
 }
}
/* 在展开面板预览 twitter 不支持的网站失效
(function(){

if(!unsafeWindow.twttr || !unsafeWindow.twttr.mediaType){
    setTimeout(arguments.callee, 100);
    return;
}

var $ = unsafeWindow.$;
var twttr = unsafeWindow.twttr;
var videoEmbedSize;

if ($(window).width()<=1024)
 videoEmbedSize = 'width="360" height="300" style="margin-left: -15px;"';
else
 videoEmbedSize = 'width="480" height="400" style="margin-left: -15px;"';
  
// name           NicoVideo preview for Twitter
// namespace      http://endflow.net/
// description    Allows you to preview NicoVideo link in Twitter sidebar.
// author         Yuki KODAMA (Twitter: kuy, Skype: netkuy)
// history        [2010-10-24] 0.1.0 first release
//                [2010-11-11] 0.1.1 improved to support short URLs

twttr.mediaType('twttr.media.types.NicoVideo', {
    title: 'ニコニコ動画',
    icon: 'video',
    favicon: 'http://res.nimg.jp/img/favicon.ico',
    domain: 'http://www.nicovideo.jp/',
    matchers: {
        tiny: /^http:\/\/nico\.ms\/(.*)/g,
        standard: /^http:\/\/[^\/]*nicovideo\.jp\/watch\/(.*)/g
    },
    process: function(proc){
        if (this.url.match(this.constructor.matchers.tiny) || this.url.match(this.constructor.matchers.standard)){
            this.data.id = RegExp.$1;
            proc();
        }
    },
    render: function(target){
        var html = '<iframe width="312" height="176" src="http://ext.nicovideo.jp/thumb/{id}" scrolling="no" style="border:solid 1px #CCC;" frameborder="0"></iframe>';
        $(target).append(twttr.supplant(html, this.data));
    }
});
//支持 img.ly 的预览
twttr.mediaType('twttr.media.types.imgly', {
    title: 'img.ly',
    icon: 'photo',
    favicon: 'http://img.ly/img/favicon.ico',
    domain: 'http://img.ly/',
    matchers: {
        standard: /^http:\/\/[^\/]*img\.ly\/(.*)/g
    },
    process: function(proc){
        if (this.url.match(this.constructor.matchers.tiny) || this.url.match(this.constructor.matchers.standard)){
            this.data.id = RegExp.$1;
            proc();
        }
    },
    render: function(target){
        var html = '<img src="http://img.ly/show/large/{id}"/>';
        $(target).append(twttr.supplant(html, this.data));
    }
});
//支持 twipple.jp 的预览
twttr.mediaType('twttr.media.types.twipplejp', {
    title: 'twipple.jp',
    icon: 'photo',
    favicon: 'http://twipple.jp/favicon.ico',
    domain: 'http://p.twipple.jp/',
    matchers: {
        standard: /^http:\/\/[^\/]*p\.twipple\.jp\/(.*)/g
    },
    process: function(proc){
        if (this.url.match(this.constructor.matchers.tiny) || this.url.match(this.constructor.matchers.standard)){
            this.data.id = RegExp.$1;
            var i = this.data.id.split('');
            var j = '';
            $.each(i, function(index, value) { 
    j = j + '/' + value; 
   });

            this.data.id = j
            proc();
        }
    },
    render: function(target){
        var html = '<img src="http://p.twipple.jp/data/{id}_m.jpg"/>';
        $(target).append(twttr.supplant(html, this.data));
    }
});
//支持 imgur.com 的预览
twttr.mediaType('twttr.media.types.imgur', {
    title: 'imgur.com',
    icon: 'photo',
    favicon: 'http://imgur.com/favicon.ico',
    domain: 'http://imgur.com',
    matchers: {
        standard: /^http:\/\/[^\/]*imgur\.com\/(.*).jpg/g
    },
    process: function(proc){
        if (this.url.match(this.constructor.matchers.tiny) || this.url.match(this.constructor.matchers.standard)){
            this.data.id = RegExp.$1;
            proc();
        }
    },
    render: function(target){
        var html = '<img src="http://i.imgur.com/{id}.jpg"/>';
        $(target).append(twttr.supplant(html, this.data));
    }
});
//支持 imageshack.us 的预览
twttr.mediaType('twttr.media.types.imageshackus', {
    title: 'imageshack.us',
    icon: 'photo',
    favicon: 'http://imageshack.us/favicon.ico',
    domain: 'http://imageshack.us/',
    matchers: {
        standard: /^http:\/\/(.*)\.imageshack\.us\/\w\/(.*).jpg\//g
    },
    process: function(proc){
        if (this.url.match(this.constructor.matchers.tiny) || this.url.match(this.constructor.matchers.standard)){
            this.data.id = RegExp.$1;
            proc();
        }
    },
    render: function(target){
     id = this.data.id;
     $(target).append(twttr.supplant('<div id="ts_preview"><img src="http://s.twimg.com/a/1289607957/phoenix/img/loader.gif"/> Crawling imageshack.us\'s picture </div>', this.data));
     requestCrossDomain(this.url, function(results) {
   var html = '<img src="http://' + id +'.imageshack.us' + $('#main_image_frame #main_image',results).attr('src') + '"/>';
   $('#ts_preview').html(html);
  });
    }
});
//支持 imageshack.us 的预览
twttr.mediaType('twttr.media.types.imageshackus2', {
    title: 'imageshack.us',
    icon: 'photo',
    favicon: 'http://imageshack.us/favicon.ico',
    domain: 'http://imageshack.us/',
    matchers: {
        standard: /(^http:\/\/(.*)\.imageshack\.us\/img(.*).jpg)/g
    },
    process: function(proc){
        if (this.url.match(this.constructor.matchers.tiny) || this.url.match(this.constructor.matchers.standard)){
            this.data.id = RegExp.$1;
            proc();
        }
    },
    render: function(target){
        var html = '<img src="{id}"/>';
        $(target).append(twttr.supplant(html, this.data));
    }
});
//支持 sinaimg 的预览 
twttr.mediaType('twttr.media.types.sinaimg', {
    title: 'sinaimg.cn',
    icon: 'photo',
    favicon: 'http://www.sina.com.cn/favicon.ico',
    domain: 'http://www.sina.com.cn/',
    matchers: {
        standard: /(^http:\/\/(.*)\.sinaimg\.cn\/orignal\/(.*))/g
    },
    process: function(proc){
        if (this.url.match(this.constructor.matchers.tiny) || this.url.match(this.constructor.matchers.standard)){
            this.data.id = RegExp.$1;
            proc();
        }
    },
    render: function(target){
        var html = '<img src="{id}"/>';
        $(target).append(twttr.supplant(html, this.data));
    }
});
//支持 picplz.com 的预览
twttr.mediaType('twttr.media.types.picplz', {
    title: 'picplz.com',
    icon: 'photo',
    favicon: 'http://picplz.com/favicon.ico',
    domain: 'http://picplz.com/',
    matchers: {
        standard: /^http:\/\/(.*)picplz\.com\/(.*)\//g
    },
    process: function(proc){
        if (this.url.match(this.constructor.matchers.tiny) || this.url.match(this.constructor.matchers.standard)){
            this.data.id = RegExp.$1;
            proc();
        }
    },
    render: function(target){
     $(target).append(twttr.supplant('<div id="ts_preview"><img src="http://s.twimg.com/a/1289607957/phoenix/img/loader.gif"/> Crawling imageshack.us\'s picture </div>', this.data));
     requestCrossDomain(this.url, function(results) {
   var html = '<img src="' + $('#mainImage',results).attr('src') + '"/>';
   $('#ts_preview').html(html);
  });
    }
});
//支持任意图片的预览,如果是缩短链接,后面会多一个 /
twttr.mediaType('twttr.media.types.JpgPngGifBmp', {
    title: 'TwittSeven Plus',
    icon: 'photo',
    favicon: 'http://a3.twimg.com/profile_images/206774439/twittseven_reasonably_small.png',
    domain: 'http://twitter.com/twittseven',
    matchers: {
     tiny: /(^https?\:\/\/.*(?!((i\.)?imgur\.com)).*((\.jpg\/)$|(\.jpeg\/)$|(\.jpe\/)$|(\.jfif\/)$|(\.png\/)$|(\.gif\/)$|(\.bmp\/)$|(\.dib\/)$|(\.tif\/)$))/ig,
        standard: /(^https?\:\/\/.*(?!((i\.)?imgur\.com)).*((\.jpg)$|(\.jpeg)$|(\.jpe)$|(\.jfif)$|(\.png)$|(\.gif)$|(\.bmp)$|(\.dib)$|(\.tif)$))/ig
    },
    process: function(proc){
        if (this.url.match(this.constructor.matchers.tiny) || this.url.match(this.constructor.matchers.standard)){
            this.data.id = RegExp.$1;
            proc();
        }
    },
    render: function(target){
        var html = '<a href="' + this.url.replace(/\/$/,'') + '"><img src="' + this.url.replace(/\/$/,'') + '"/></a>';
        $(target).append(twttr.supplant(html, this.data));
    }
});
//支持优酷(youku.com) 的预览
twttr.mediaType('twttr.media.types.youkucom', {
    title: 'youku.com',
    icon: 'video',
    favicon: 'http://v.youku.com/favicon.ico',
    domain: 'http://v.youku.com/',
    matchers: {
     tiny: /^http:\/\/[^\/]*player\.youku\.com\/player.php\/sid\/(.*)\/v\.swf/g,
        standard: /^http:\/\/[^\/]*v\.youku\.com\/v_show\/id_(.*).html/g
    },
    process: function(proc){
        if (this.url.match(this.constructor.matchers.tiny) || this.url.match(this.constructor.matchers.standard)){
            this.data.id = RegExp.$1;
            proc();
        }
    },
    render: function(target){
        var html = '<embed src="http://player.youku.com/player.php/sid/{id}/v.swf" quality="high" ' + videoEmbedSize + ' wmode="transparent" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash"></embed>';
        $(target).append(twttr.supplant(html, this.data));
    }
});
//支持土豆(tudou.com) 的预览
twttr.mediaType('twttr.media.types.tudoucom', {
    title: 'tudou.com',
    icon: 'video',
    favicon: 'http://www.tudou.com/favicon.ico',
    domain: 'http://www.tudou.com/',
    matchers: {
     tiny: /^http:\/\/www\.tudou\.com\/v\/(.*)\/v\.swf/g,
        standard: /^http:\/\/[^\/]*www\.tudou\.com\/programs\/view\/(.*)\//g
    },
    process: function(proc){
        if (this.url.match(this.constructor.matchers.tiny) || this.url.match(this.constructor.matchers.standard)){
            this.data.id = RegExp.$1;
            proc();
        }
    },
    render: function(target){
        var html = '<embed src="http://www.tudou.com/v/{id}/v.swf" quality="high" ' + videoEmbedSize + ' wmode="transparent" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" wmode="opaque"></embed>';
        $(target).append(twttr.supplant(html, this.data));
    }
});

//支持 56(56.com) 的预览
twttr.mediaType('twttr.media.types.56com', {
    title: '56.com',
    icon: 'video',
    favicon: 'http://www.56.com/favicon.ico',
    domain: 'http://www.56.com/',
    matchers: {
     tiny: /^http:\/\/[^\/]*player\.56\.com\/v_(.*)\.swf/g,
        standard: /^http:\/\/[^\/]*www\.56\.com\/.*\/v_(.*)\.html/g
    },
    process: function(proc){
        if (this.url.match(this.constructor.matchers.tiny) || this.url.match(this.constructor.matchers.standard)){
            this.data.id = RegExp.$1;
            proc();
        }
    },
    render: function(target){
        var html = '<embed src="http://player.56.com/v_{id}.swf" quality="high" ' + videoEmbedSize + ' wmode="transparent" type="application/x-shockwave-flash" allowNetworking="all" allowScriptAccess="always"></embed>';
        $(target).append(twttr.supplant(html, this.data));
    }
});
//支持 六间房(6.cn) 的预览
twttr.mediaType('twttr.media.types.6cn', {
    title: '6.cn',
    icon: 'video',
    favicon: 'http://6.cn/favicon.ico',
    domain: 'http://6.cn/',
    matchers: {
        standard: /^http:\/\/[^\/]*6\.cn\/watch\/(.*)\.html/g
    },
    process: function(proc){
        if (this.url.match(this.constructor.matchers.tiny) || this.url.match(this.constructor.matchers.standard)){
            this.data.id = RegExp.$1;
            proc();
        }
    },
    render: function(target){
     $(target).append(twttr.supplant('<div id="ts_preview"><img src="http://s.twimg.com/a/1289607957/phoenix/img/loader.gif"/> Crawling 6.cn\'s video </div>', this.data));
  requestCrossDomain(this.url, function(results) {
   var html = results.match(/http:\/\/6\.cn\/p\/[a-zA-Z0-9]+\.swf/gi)[0];
   $('#ts_preview').html('<embed src="' + html +'" quality="high" ' + videoEmbedSize + ' wmode="transparent" type="application/x-shockwave-flash" allowNetworking="all" allowScriptAccess="always"></embed>');
  });
    }
});
twttr.mediaType('twttr.media.types.6cn2', {
    title: '6.cn',
    icon: 'video',
    favicon: 'http://6.cn/favicon.ico',
    domain: 'http://6.cn/',
    matchers: {
     tiny: /^http:\/\/6\.cn\/player\.swf\?vid=(.*)/g,
        standard: /^http:\/\/[^\/]*6\.cn\/p\/(.*)\.swf/g
    },
    process: function(proc){
        if (this.url.match(this.constructor.matchers.tiny) || this.url.match(this.constructor.matchers.standard)){
            this.data.id = RegExp.$1;
            proc();
        }
    },
    render: function(target){
     var html = '<embed src="http://6.cn/p/{id}.swf" quality="high" ' + videoEmbedSize + ' wmode="transparent" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" wmode="opaque"></embed>';
        $(target).append(twttr.supplant(html, this.data));
    }
});
// ku6 的预览
twttr.mediaType('twttr.media.types.ku6com', {
    title: 'ku6.com',
    icon: 'video',
    favicon: 'http://www.ku6.com/favicon.ico',
    domain: 'http://www.ku6.com/',
    matchers: {
     tiny: /^http:\/\/[^\/]*player\.ku6\.com\/refer\/(.*)\/v.swf/g,
        standard: /^http:\/\/[^\/]*v\.ku6\.com\/show\/(.*).html/g
    },
    process: function(proc){
        if (this.url.match(this.constructor.matchers.tiny) || this.url.match(this.constructor.matchers.standard)){
            this.data.id = RegExp.$1;
            proc();
        }
    },
    render: function(target){
        var html = '<embed src="http://player.ku6.com/refer/{id}/v.swf" quality="high" ' + videoEmbedSize + ' wmode="transparent" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" wmode="opaque"></embed>';
        $(target).append(twttr.supplant(html, this.data));
    }
});
// metacafe 的预览
twttr.mediaType('twttr.media.types.metacafe', {
    title: 'metacafe.com',
    icon: 'video',
    favicon: 'http://www.metacafe.com/favicon.ico',
    domain: 'http://www.metacafe.com/',
    matchers: {
        standard: /^http:\/\/[^\/]*www\.metacafe\.com\/watch\/(.*)/g
    },
    process: function(proc){
        if (this.url.match(this.constructor.matchers.tiny) || this.url.match(this.constructor.matchers.standard)){
            this.data.id = RegExp.$1;
            proc();
        }
    },
    render: function(target){
        var html = '<embed flashVars="playerVars=showStats=yes|autoPlay=no" src="http://www.metacafe.com/fplayer/{id}.swf"' + videoEmbedSize + ' wmode="transparent" allowFullScreen="true" allowScriptAccess="always" type="application/x-shockwave-flash"></embed>';
        $(target).append(twttr.supplant(html, this.data));
    }
});
// Myspace 的预览
twttr.mediaType('twttr.media.types.Myspace', {
    title: 'Myspace.com',
    icon: 'video',
    favicon: 'http://www.Myspace.com/favicon.ico',
    domain: 'http://www.Myspace.com/',
    matchers: {
        standard: /^http:\/\/vids\.myspace\.com\/.*=(\d+)/g
    },
    process: function(proc){
        if (this.url.match(this.constructor.matchers.tiny) || this.url.match(this.constructor.matchers.standard)){
            this.data.id = RegExp.$1;
            proc();
        }
    },
    render: function(target){
        var html = '<embed src="http://lads.myspace.com/videos/c.swf?SkinID=5000&t=1&mute=0&ptype=100&on=2&sr=1&ap=true&primaryColor=&secondaryColor=&m={id}&mt=video&uid=-1&cc=en&hw=1&searchID=0&dc=&mc=400&g=M&ar=0&pg=21003206&skin=http://lads.myspacecdn.com/videos/default.xml&hb=true&adp=1&sfs=1&preTag=sz=1x200;&midTag=sz=1x204;&postTag=sz=1x203;&tickTag=sz=1x202;&illum=true&trackingID=25070362&ssprod=true&ht=true&clickTag=&logerr=false&unp=0&pertid=-5184805004298271768&ili=false&pfc=VideosIndividual&proftype=1&profid=3966278&vabd=60&usefu=true&hostenv=&adXmlUrl=" allowscriptaccess="always" wmode="transparent" allowfullscreen="true" type="application/x-shockwave-flash" ' + videoEmbedSize + '></embed>';
        $(target).append(twttr.supplant(html, this.data));
    }
});
// yahoo 的预览
twttr.mediaType('twttr.media.types.yahoo', {
    title: 'yahoo.com',
    icon: 'video',
    favicon: 'http://www.yahoo.com/favicon.ico',
    domain: 'http://www.yahoo.com/',
    matchers: {
     tiny: /^http:\/\/.*video\.yahoo\.com\/watch\/([0-9]+)?\/([0-9]+)\//g,
        standard: /^http:\/\/.*video\.yahoo\.com\/watch\/([0-9]+)?\/([0-9]+)/g
    },
    process: function(proc){
        if (this.url.match(this.constructor.matchers.tiny) || this.url.match(this.constructor.matchers.standard)){
            this.data.vid = RegExp.$1;
            this.data.id = RegExp.$2;
            proc();
        }
    },
    render: function(target){
        var html = '<embed src="http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.46" type="application/x-shockwave-flash" ' + videoEmbedSize + 'allowFullScreen="true" AllowScriptAccess="always" bgcolor="#000000" flashVars="id={id}&vid={vid}&lang=en-us&intl=us&thumbUrl=&embed=1" ></embed>';
        $(target).append(twttr.supplant(html, this.data));
    }
});
// yahoo 的预览2
twttr.mediaType('twttr.media.types.yahoonetwork', {
    title: 'yahoo.com',
    icon: 'video',
    favicon: 'http://www.yahoo.com/favicon.ico',
    domain: 'http://www.yahoo.com/',
    matchers: {
     tiny: /^http:\/\/.*video\.yahoo\.com\/network\/(.*)\//g,
        standard: /^http:\/\/.*video\.yahoo\.com\/network\/(.*)/g
    },
    process: function(proc){
        if (this.url.match(this.constructor.matchers.tiny) || this.url.match(this.constructor.matchers.standard)){
            this.data.id = RegExp.$1;
            proc();
        }
    },
    render: function(target){
     $(target).append(twttr.supplant('<div id="ts_preview"><img src="http://s.twimg.com/a/1289607957/phoenix/img/loader.gif"/> Crawling yahoo\'s video </div>', this.data));
  requestCrossDomain(this.url, function(results) {
   if (results.match(/http:\/\/.*video\.yahoo\.com\/watch\/([0-9]+)?\/([0-9]+)/gi)[0]){
    var id = RegExp.$2;
    var vid = RegExp.$1;
    $('#ts_preview').html('<embed src="http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.46" type="application/x-shockwave-flash" ' + videoEmbedSize + 'allowFullScreen="true" AllowScriptAccess="always" bgcolor="#000000" flashVars="id=' + id + '&vid={' + vid + '&lang=en-us&intl=us&thumbUrl=&embed=1" ></embed>');
   }
  });
    }
});

//支持 instagr.am 的预览
twttr.mediaType('twttr.media.types.instagram', {
    title: 'instagr.am',
    icon: 'photo',
    favicon: 'http://a0.twimg.com/profile_images/1106630388/22_normal.png',
    domain: 'instagr.am',
    matchers: {
        standard: /^http:\/\/[^\/]*instagr\.am\/(.*)/g
    },
    process: function(proc){
        if (this.url.match(this.constructor.matchers.tiny) || this.url.match(this.constructor.matchers.standard)){
            this.data.id = RegExp.$1;
            proc();
        }
    },
    render: function(target){
        var html = '<div class="instagram" style="padding: 10px; "><iframe src="http://instagr.am/{id}" style="width: 495px; height: 575px; overflow: hidden; margin-left: -40px; margin-top: -40px;"></iframe></div>'
        $(target).append(twttr.supplant(html, this.data));
    }
});


})();
*/

0 comments:

Post a Comment