diff --git a/index.html b/index.html index 6e7e6c0..ff8a88d 100644 --- a/index.html +++ b/index.html @@ -40,9 +40,7 @@
- +
diff --git a/main.js b/main.js index f4eea28..044ebbe 100644 --- a/main.js +++ b/main.js @@ -3,51 +3,53 @@ jQuery.fn.extend({ var self = $(this); $.ajax({ url: dataurl, - async:true, - contentType:"application/json", + async: true, + contentType: "application/json", dataType: "json", - success: function(data){ - $.each(data, function(key, attributes2){ - var sitename = attributes2.sitename; - var site_div = $("
"); - var site_title = $("

"); - $(site_title).text = sitename; - $(site_title).appendTo(site_div); - $.each(attributes2.sites, function(key, attributes){ - var my_link = (typeof attributes['link'] != 'undefined') ? attributes['link'] : ""; - var my_button = (typeof attributes['button'] != 'undefined') ? attributes['button'] : ""; - var my_name = (typeof attributes['name'] != 'undefined') ? attributes['name'] : ""; - var my_image = ((typeof attributes['image'] != 'undefined') && (attributes['image'] == "empty")) ? my_name : attributes['image']; + success: function (data) { + $.each(data, function (key, attributes2) { + var sitename = attributes2.sitename; + var site_div = $("
"); + $(site_div).attr('id', sitename); + var site_list = $("