このコードはFacebook チャット 絵文字バーグリース モンキー UserScriptからのものです
ImagesURL = HttpsOn?'https://s-static.ak.fbcdn.net/images/':'http://static.ak.fbcdn.net/images/';
emotsInfo = [':)', ':(', ':p', ':D', ':o', ';)', '8)', '8|', '>:(', ':/', ':\'(', '3:)', 'O:)', ':*', '<3', '^_^', '-_-', 'o.O', '>:O', ':v', ':3'];
for(i=0;i<emotsInfo.length;i+=1) {
var fEmotsDom = document.createElement('img');
fEmotsDom.setAttribute('alt',emotsInfo[i]);
fEmotsDom.setAttribute('style','cursor: pointer; background-position: -'+ 16*i +'px 0px;');
fEmotsDom.setAttribute('src',ImagesURL + 'blank.gif');
fEmotsDom.setAttribute('class','emote_img');
fEmotsListDom.appendChild(fEmotsDom);
}
このコードは、Facebook サーバーから Facebook の感情をもたらします
。私は WPF をコーディングしています。空白から感情を取得する以外のすべてのコード手順を理解しています。gif
C# コード
const string EmotionsResources = "http://static.ak.fbcdn.net/images/";
private Image Emoticons ( string E )
{
return ( new Image ( ) { Source = new BitmapImage ( new Uri ( EmotionsResources + E ) ) } );
}
Facebook チャットの感情のソースを取得しようとすると、[ http://static.ak.fbcdn.net/images/blank.gif ] このコードは、このリンクから感情を取得します。