{"action":"opened","issue":{"url":"https://api.github.com/repos/artiom167/dev/issues/1","repository_url":"https://api.github.com/repos/artiom167/dev","labels_url":"https://api.github.com/repos/artiom167/dev/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/artiom167/dev/issues/1/comments","events_url":"https://api.github.com/repos/artiom167/dev/issues/1/events","html_url":"https://github.com/artiom167/dev/issues/1","id":154399858,"number":1,"title":"INDEX.HTML","user":{"login":"artiom167","id":19319845,"avatar_url":"https://avatars.githubusercontent.com/u/19319845?v=3","gravatar_id":"","url":"https://api.github.com/users/artiom167","html_url":"https://github.com/artiom167","followers_url":"https://api.github.com/users/artiom167/followers","following_url":"https://api.github.com/users/artiom167/following{/other_user}","gists_url":"https://api.github.com/users/artiom167/gists{/gist_id}","starred_url":"https://api.github.com/users/artiom167/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artiom167/subscriptions","organizations_url":"https://api.github.com/users/artiom167/orgs","repos_url":"https://api.github.com/users/artiom167/repos","events_url":"https://api.github.com/users/artiom167/events{/privacy}","received_events_url":"https://api.github.com/users/artiom167/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-12T05:26:17Z","updated_at":"2016-05-12T05:26:17Z","closed_at":null,"body":"<!DOCTYPE html>\r\n<html>\r\n<head>\r\n<!-- Подключаем jquery -->\r\n<script src='http://code.jquery.com/jquery-1.7.1.js'></script>\r\n<script type=\"text/javascript>\r\nVK.init(\r\n  function(){\r\n});\r\n    function autosize(width) {\r\n        //Проверяем элемент body на наличие.\r\n        if (!document.getElementById('body')) {\r\n\t\t\talert('error');\r\n            return;\r\n        }\r\n        // Успешно ли подключен ВК скрипт\r\n        if (typeof VK.callMethod != 'undefined') {\r\n        /*\r\n        Вызываем функцию vk js api для управления окном.\r\n        VK.callMethod('функция', параметры)\r\n        В данном случае у нас - VK.callMethod('изменение_размеров_окна', ширина, высота);\r\n        Так же добавляем еще 60 пикселей что бы было небольшое расстояние.\r\n        */\r\n            VK.callMethod('resizeWindow', 840, document.getElementById('body').clientHeight + 60);\r\n        } else {\r\n\t    alert('error #2');\r\n        }\r\n    }\r\n    $(document).ready( function(){\r\n        //Вызываем функцию регулировки высоты каждые пол секунды.\r\n        setInterval('autosize(607)', 500);\r\n    });\r\n</script>\r\n<!-- Подключаем VK-->\r\n<script src=\"http://vk.com/js/api/xd_connection.js?2\" type=\"text/javascript\"></script>\r\n<script>\r\n// Функция получения друзей и вывода их на экран\r\nfunction doIt(){\r\n        /*\r\n        VK.api('метод', {параметр: \"значение\"}, callback функция{\r\n        // работаем с полученными данными\r\n        });\r\n        */\r\n\r\n\tVK.api(\"friends.get\", {fields: \"photo_medium\"}, function(data) { \r\n\t\t// Действия с полученными данными \r\n\t\tfor(c=0;c<data.response.length;c++){\r\n\t\t\t$(\"body\").append(\"<img src='\"+data.response[c].photo_medium+\"'>\r\n\r\n\");\r\n\t\t}\r\n\t});\r\n}\r\n$(document).ready(function(){\r\n\tdoIt();\r\n});\r\n</script>\r\n</head>\r\n<body style='text-align:center;padding-top:50px;' id='body'>\r\nhello world!\r\n</body>\r\n</html>"}}