suggestion
|
|
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. |
|
|
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. |
|
|
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.
|
|
|
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. |