Hello everyone,
I though I was new to these forums although I guess I was mistaken (I had to edit my "first post" introduction lol.) Anyways, I have been very actively studying web design/development, particularly php, for the last 6-7 months. I have decided to make the switch to "actively" learning more javascript. I have been studying a feature on a site called dabble.com, it is a video aggregation site. Unfortunately in order to see the feature for yourself you have to register and account (its free  ) but I will describe it the best I can.
So the idea of their site is users submit videos from other websites ex. youtube, google vid, ect. Its similar to the digg or del.icio.us idea, but for videos. What dabble has though is a javascript bookmarklet link that does the similar thing to a del.icio.us browser addon. You add the link to your bookmarks then when you hit the bookmark it will parse the page you are currently viewing for a videos information (title, meta description, embed code, ect). Here is the code, I disected it to make it a bit easier to read...
Code:
<a href="javascript:{
b='http://dabble.com';
e=encodeURIComponent;
d=document;
function k(){
location.href=b+'/?q=bmbu'+'&u='+e(location.href)+'&t='+e(d.title)+'&v=bu';
}
gT=setTimeout(k,1000);
sT=d.body;
o=d.createElement('scri'+'pt');
if(typeof o!='object')exit();
o.setAttribute('src',b+'/js/bm.php?u='+e(location.href));
o.setAttribute('type','text/javascript');
void(sT.appendChild(o));
}
">Add to Dabble</a>
This script appears to append a script to the current page which then relays the info back to the dabble php page!? This is where I start getting confused. I would love to have a watered down version of this that could say just send back the url and page title of the page the is being viewed/bookmarked.
Last edited by CheebaHawk; 03-31-2007 at 04:49 PM..
|