I am working on a site where I need to modify a JavaScript feed from a site. The site is del.icio.us which is a place to store bookmarks on the net instead of saving them into your browser. The site provides a link they call a "tagroll" to put your "tags" onto your website. This works except that it comes complete with CSS information and this does not work in a site that I am working on.
I have figured out the JavaScript that comes down from the script link they provide and want to work it into a PHP script to allow me to apply my own CSS to the information.
All that being said, The key is that the first line of the JS that they send is as follows:
Code: Select all
(function () {var ts = {"tagname":1 , "nexttagname":#...etc}I was thinking of using a regular expression, but since I am not very experienced in using them, I am not sure how I would do it. There can be a lot of tags in there
later on we will need to provide each tag a link using another part of javascript feed from them... the js looks like this:
Code: Select all
for (var i=0;i<3;i++) c[i]=s(ca[i],cz[i],ts[t]-ta,tz)
document.write('<li style="font-size:15px;line-height:1;"><a style="color:rgb('+c[0]+','+c[1]+','+c[2]+')" href="http://del.icio.us/nitromike/'+encodeURIComponent(t).replace('%2F','/')+'">'+t+'</a> </li>');Any help would be appreciated on how to format the regular expression for this!
Thanks,
Mike