MySpace Home - Redesign

By RunningBlind Last update Dec 13, 2008 — Installed 1,483 times.

suggestion

in
Subscribe to suggestion 4 posts, 2 voices



urbi(); Scriptwright

Wouldn't it be easier to use an XHR and then dump the responseText into a hidden iframe and replace the sections on the homepage with the updated sections from the iframe?

Then you wouldn't have to use jQuery, or use all those regular expressions. And this method would give you a lot more power to manipulate the contents as you would have the built in DOM methods and you could take advantage of API's like XPath.

 
RunningBlind Script's Author

If I was using XHR, why would I need to dump the contents into a iframe? It might be easier to use just one regular expression to find the element I want and just stick that somewhere hidden, so the entire page doesn't need to be parsed and the DOM doesn't see too many changes, but I definitely see the advantages to this approach. It would be less susceptible to changes in MySpace HTML, which happen pretty regularly.

Using XPath, or even if I just stayed with the jQuery CSS-like selectors would be so much easier than trying to dig things out of plain text. Thanks for your insight; this will definitely be implemented in one of the next few releases, but I think I'll stick with using jQuery.

 
urbi(); Scriptwright

Sure, no problem.

I just realized you're the RunningBlind my friend mentioned. I asked my friend for ideas of what features I could add to a myspace script I wrote, and he suggested I add a feature to add a comments section to the home page. Before I uploaded it he said that he'd gotten the idea from a script written by someone named RunningBlind and that I should mention that in the description.
I just checked out the one other review by the one person thus far who reviewed my script, and it was about this script, which, after viewing the source code, led to my suggestion.
Rather coincidental that the one person who has reviewed that script only had one other review, and it happened to be a review of a script written by the person my friend mentioned.

 
RunningBlind Script's Author

That's pretty cool.

I'm guessing you're talking about your homepage super mod script. Pretty cool stuff. I do have another script that just does the comments, though. When I read your suggestion in my RSS reader, that's the script I thought you were talking about until I started to write the reply. I should make the same change in that one, too, though.

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel