gist: 10700 Download_button fork
public
Description:
Ubiquity - Search Domain Names
Public Clone URL: git://gist.github.com/10700.git
JavaScript
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
CmdUtils.CreateCommand({
  name: "search-domain-name",
  icon: "http://instantdomainsearch.com/favicon.ico",
  author: {name: "Pratham Kumar", email: "pratham@pratham.name"},
  description: "Checks availabilty of the domain name with com/net/org TLDs.",
  homepage: "http://pratham.name/",
  takes: {"example.com": noun_arb_text},
 
  preview: function (html, q) {
    var params = {name: q.text};
    html.innerHTML = 'Searching for <b>'+q.text+'</b>';
 
    jQuery.get ('http://instantdomainsearch.com/services/rest/', params, function (data) {
      data = eval ('('+data+')');
      var name = data ['name'];
 
      html.innerHTML = name + ' - <a style="color:'+(data ['com'] == 'a' ? 'green' : 'red')+'" href="http://'+name+'.com/">com</b> <a href="http://'+name+'.net/" style="color:'+(data ['net'] == 'a' ? 'green' : 'red')+'">net</a> <a href="http://'+name+'.org/" style="color:'+(data ['org'] == 'a' ? 'green' : 'red')+'">org</a>';
    });
  }
})

Owner

pratham

Revisions