TinyURL Decoder

By setomits Last update May 12, 2011 — Installed 74,228 times.

onmouseover event

in
Subscribe to onmouseover event 3 posts, 2 voices



w35l3y Scriptwright

I think caching wouldn't be necessary if you just had used onmouseover event. That probably would be a lot faster than auto running it at once for all matching urls and at every 10000/counter miliseconds.

 
setomits Script's Author

Hi w35l3y,
Thank you for your comment and review.

I think that:

  • If there are lots of URLs, it might be troublesome to move mouse pointer for each link.
  • If there are a few URLs, conversions will be done soon.

Action freeness took priority in this script, but LongURL Mobile Expander ( http://userscripts.org/scripts/show/32115 ) might help your situation.

 
w35l3y Scriptwright

I agree with you, but in a common situation people would momentarily be interested to a few urls.
Or I just can't imagine a situation which people would like to know all extended/real urls.

You might understand my point after this draft.

// filtered_urls is an array of urls(anchors) that matches to whatever the pattern is

for (var ai = 0, at = filtered_urls.length ; ai < at ; ++ai )
{
	filtered_urls[i].addEventListener('onmouseover', function(e)
	{
		e.target.href = request_real_url(e.target);
	}, true);
}

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