« Debugging OCTest bundles | Main | Cool climbing website »

June 22, 2005

Fixing the annoying focus stealing habit of Safari RSS feeds

Safari RSS support is way cool. Except for the fact that after a page has loaded, the search field receives focus, causing the space bar to not scroll down a page at a time. I wanted to fix this...but how?

Well, I browsed to an RSS feed and viewed the source in Safari. I noticed this line:

<script language=JavaScript src=“feed:///__rsrc__/Articles.js”>

So, Safari uses some internal file called Articles.js. Now, where is it?

Well, I dropped down to a command prompt in Console, logged in as root (su'd) and typed:

nibroc:/Users/corbin/Desktop root# fs_usage -w -f filesys Safari | grep Articles.js

console

Okay! It is in some framework directory, A/Resources/Articles.js. But which one? Again, a simple command can reveal the secrets:

nibroc:/Users/corbin/Desktop root# otool -L /Applications/Safari.app/Contents/MacOS/Safari

Picture 4

Okay, it probably is SyndicationUI.framework or WebKit.framework. Which one?

nibroc:/Users/corbin/Desktop root# ls /System/Library/PrivateFrameworks/SyndicationUI.framework/Versions/A/Resources/

Picture 6

Gotcha!
vi that file, search for focus, and comment out the offending line:

Picture 7

And we are done! No more focus stealing...

Posted by corbin at June 22, 2005 09:54 AM

Comments

Just out of idle curiousity, wouldn't this have been easier?

$ locate Articles.js
/System/Library/PrivateFrameworks/SyndicationUI.framework/Versions/A/Resources/Articles.js

It wouldn't tell you which one was correct if there were two, but why assume there are two? :)

Posted by: Steve Luzynski at June 22, 2005 05:46 PM

Yes, that would be easier! I forgot about the locate command. If thre filename was more common, like Info.plist, then the other approach would work better.
--corbin

Posted by: corbin at June 23, 2005 08:30 AM

Any idea whether/how Bedrock and Cocoa is related?

Posted by: Chee Wee at June 29, 2005 05:38 PM

Post a comment




Remember Me?