Showing posts with label internet. Show all posts
Showing posts with label internet. Show all posts

Wednesday, September 9, 2009

Moving to Wordpress

I've decided to move my main blog here, akuyume/inside, to Wordpress.

So check me out now on Wordpress!
akuyume/inside on Wordpress

Monday, September 7, 2009

Facebook Chat's Bold and Underline Text and Prodding Facebook Chat on a mission

I never noticed this before, but by placing asterisks around a word in Facebook Chat will bold the word, and placing underscores around one will underline the word. My first instinct was to figure out how to type italic text. Well a few Google searches showed that other people were looking for it as well; so I decided to go "straight to the horse's mouth," so to speak.

Figured the first place to start the search was in the messages that relay chat and see if the HTML conversion takes place there. Now mind you I've already poked and prodded Facebook Chat's message relay server before. Its a MochiWeb server, which you can see in the HTTP headers for chat packets. For more background specifics on the setup that is Facebook chat, see Facebook's engineering blog.

Server: MochiWeb/1.0 (I'm not even supposed to be here today.)

Anyhow, by reading the HTTP packet flow, I can get the "raw" information that the webpage uses to talk to the server. These I believe are in JSON although don't quote me on that, suffice to say I can at least read enough of the raw information they contain to see the message I just received. And sure enough these contain the text just as they would have been typed, that is, asterisks instead of HTML bold tags and underscores instead of HTML underline tags.

So, then this tells me that the replacement of "Facebook Chat style markup" takes place in the user's web browser. Problem is, there's a bunch of JavaScript files attached to any Facebook page. Fortunately for me though with Firefox with the FireBug extension the process of analyzing a web page's code is fairly streamlined.

Going straight to the code generated for a chat window, I noticed that the "pic_padding" class is on each message's node (which happen to be paragraph elements). So I searched for this class in the JavaScript given that is was the best lead I had. Fortunately this lead turned out results.

if(pendingMsgID||errorMarkup){
var pendingElementID=pendingMsgID?' id="pending_'+this.id+'_'+pendingMsgID+'"':'';markup+=''+
299(errorMarkup?errorMarkup:'')+'
';}

And just a couple lines below that, ta-da!

_processStyledText:function(textProcessor,str){return textProcessor(str).replace(/\b_([^_\*]+)_\b/g,'<u>$1</u>').replace(/(\s|^)\*([^_\*]+)\*(?=$|\s)/g,'$1<b>$2</b>');}

Yep, regular expressions. Just what I was expecting. No sign of a regex that replaces something with <i>..</i>. That's right, there is no way to type in italics.

So Facebook, why no italics?

Monday, August 31, 2009

Danbooru OS and an anime Danbooru

Just stumbled upon an interesting read on where RDBMS and file systems merge in theory by fuzzysoul. Also happened on an anime Danbooru board, moe.imouto (NSFW, may contain hentai); high-res = love.

Another thing which caught my eye today, 4walled (also NSFW, images are from 4chan); just keep scrolling and keep finding awesome wallpapers...

Saturday, August 30, 2008

Review: Internet Explorer 8 Beta 2

After a few minutes using IE8b2, I've got a few notes about it to share. Mostly positive changes, but this is a beta release, thus the feature set isn't set in stone quite yet. Nevertheless, I must add, I'm still posting this note from Firefox.

What's new?


  • Domain name (and TLD) highlighting - The address bar now by default dims the "excess" text such as the directories and subdomains, showing the domain name of the website you are visiting with clear emphasis. How does this help? Preventing phishing; spoofs become more obvious.

  • Tabs colored by where they came from - Tabs are grouped by the referrer tab, and colored accordingly. Example: You visit Google News and open a link to the NY Times there in a new tab, both tabs will be shaded the same color.

  • Bookmark and history search in the address bar - For those of you who have used Firefox 3, this feature will feel very similar to the AwesomeBar. If you have no idea what I'm talking about, the title of this item says it all, the web browser searches your history and bookmarks as you type in the address bar, making it easier find places you have visited without having to remember the full address.

  • InPrivate - This feature, under the Safety menu to the top right, allows users to open a new window and allows the user to surf and leave a minimal footprint on the computer they are using. No cookies, no temporary files, no history. It also attempts to block third-party websites from tracking you across the web (think advertising groups). I particularly see this being useful on public computers.
  • Web slices - This feature leaves me scratching my head. I feel if it takes me more than a minute to figure out how to use something, it isn't very intuitive. It looks promising, although I'm not totally sure what it's supposed to do. I'm routing for a RSS/Atom previewer, but for now I'll be keeping my fingers crossed as at the moment the only way I see to modify it is to using a Microsoft list of feeds.
  • Quick Tabs - Another positive here, the quick tab button, to the left of the tab bar, gives a quick graphical view of each tab open.


If you wish to read more on the subject, I suggest visiting Wikipedia's article.

Monday, June 2, 2008

Saturday, March 8, 2008

Update: Internet Explorer redirects to Firefox?

I've yet to figure out why my Internet Explorer crashes on half the web pages I visit, and I know now its definitely a specific type of code causing it fail as the problem persists if I go to the same website multiple times. I've done some digging and found a similar error that was caused by KB918899; which applies to IE6 with SP1, but this isn't helping me (I'm on Windows XP Media Center ver. 2002 with SP2). SFC didn't help. And reinstalling with ie.inf didn't help. I've even gone as far as doing a repair installation of Windows, which didn't help. Anyone have suggestions?

Saturday, February 23, 2008

Internet Explorer redirects to Firefox?

Normally, I wouldn't complain about having a screwed installation of Internet Explorer. For the longest every I've used iexplore's address bar, it launched the link in Firefox instead. This was starting to get annoying as I like to check my web designs in both Firefox and Internet Explorer. Anyway after searching for answers over a few days I came across a blog on MSDN with a solution to this problem. Apparently, however, this wasn't all that was wrong with my Internet Explorer install as now it freezes when rendering web pages more advanced than a little text. I'll update when I figure this one out.

hit counter