Page 1 of 1

Google result page link cleanup

Posted: Sun Jun 26, 2016 12:45 pm
by julien
Hi,

A short script to clean a link taken from a Google result page.

Javascript:

Code: Select all

url=Clipboard.value;

query = url.split('?')[1];
if (query)
{
  args = query.split('&');
  for(i=0;i<args.length;i++)
  {
    v = args[i].split('=');
    if (v[0] == 'url') { url = decodeURIComponent(v[1]); break; }
  }
}
Clipboard.value = url;


Julien