{"action":"created","issue":{"url":"https://api.github.com/repos/prettydiff/prettydiff/issues/248","labels_url":"https://api.github.com/repos/prettydiff/prettydiff/issues/248/labels{/name}","comments_url":"https://api.github.com/repos/prettydiff/prettydiff/issues/248/comments","events_url":"https://api.github.com/repos/prettydiff/prettydiff/issues/248/events","html_url":"https://github.com/prettydiff/prettydiff/issues/248","id":124661112,"number":248,"title":"How to use prettydiff on the browser?","user":{"login":"anik786","id":5897460,"avatar_url":"https://avatars.githubusercontent.com/u/5897460?v=3","gravatar_id":"","url":"https://api.github.com/users/anik786","html_url":"https://github.com/anik786","followers_url":"https://api.github.com/users/anik786/followers","following_url":"https://api.github.com/users/anik786/following{/other_user}","gists_url":"https://api.github.com/users/anik786/gists{/gist_id}","starred_url":"https://api.github.com/users/anik786/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anik786/subscriptions","organizations_url":"https://api.github.com/users/anik786/orgs","repos_url":"https://api.github.com/users/anik786/repos","events_url":"https://api.github.com/users/anik786/events{/privacy}","received_events_url":"https://api.github.com/users/anik786/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/prettydiff/prettydiff/labels/Defect","name":"Defect","color":"e11d21"},{"url":"https://api.github.com/repos/prettydiff/prettydiff/labels/Underway","name":"Underway","color":"bfe5bf"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/prettydiff/prettydiff/milestones/41","html_url":"https://github.com/prettydiff/prettydiff/milestones/v1.16.9","labels_url":"https://api.github.com/repos/prettydiff/prettydiff/milestones/41/labels","id":1481249,"number":41,"title":"v1.16.9","description":null,"creator":{"login":"prettydiff","id":524902,"avatar_url":"https://avatars.githubusercontent.com/u/524902?v=3","gravatar_id":"","url":"https://api.github.com/users/prettydiff","html_url":"https://github.com/prettydiff","followers_url":"https://api.github.com/users/prettydiff/followers","following_url":"https://api.github.com/users/prettydiff/following{/other_user}","gists_url":"https://api.github.com/users/prettydiff/gists{/gist_id}","starred_url":"https://api.github.com/users/prettydiff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prettydiff/subscriptions","organizations_url":"https://api.github.com/users/prettydiff/orgs","repos_url":"https://api.github.com/users/prettydiff/repos","events_url":"https://api.github.com/users/prettydiff/events{/privacy}","received_events_url":"https://api.github.com/users/prettydiff/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":1,"state":"open","created_at":"2016-01-03T20:23:51Z","updated_at":"2016-01-20T20:37:06Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2016-01-03T17:44:07Z","updated_at":"2016-01-20T20:37:06Z","closed_at":"2016-01-20T20:37:06Z","body":"I'm getting extremely confused as to how to use this library in a normal browser.\r\n\r\nHere's what I have so far\r\n\r\n```html\r\n<html>\r\n<head>\r\n    <script>\r\n        var global = {},\r\n                args   = {\r\n                    source: \"asdf\",\r\n                    diff  : \"asdd\",\r\n                    lang  : \"text\"\r\n                };\r\n//                output = prettydiff(args);\r\n    </script>\r\n\r\n    <script src=\"bower_components/prettydiff/lib/csspretty.js\"></script>\r\n    <script src=\"bower_components/prettydiff/lib/csvpretty.js\"></script>\r\n    <script src=\"bower_components/prettydiff/lib/diffview.js\"></script>\r\n    <script src=\"bower_components/prettydiff/lib/jspretty.js\"></script>\r\n    <script src=\"'bower_components/prettydiff/lib/markuppretty.js\"></script>\r\n    <script src=\"bower_components/prettydiff/lib/safeSort.js\"></script>\r\n\r\n    <script src=\"bower_components/prettydiff/prettydiff.js\"></script>\r\n    <script src=\"'bower_components/prettydiff/api/dom.js\"></script>\r\n</head>\r\n<body>\r\n</body>\r\n</html>\r\n```\r\n\r\nNote that I had to add a bunch of libraries in order to remove many of the console errors (something that is not documented)! \r\n\r\nIs there a minified version of this library as it is quite important for browsers???\r\n\r\nAlso I found that the variables need to be declared BEFORE the other script tags, which is also not documented.\r\n\r\nHowever, I still have a console error:\r\n`Uncaught TypeError: Cannot read property 'getAttribute' of undefined`\r\n\r\nIs there just a simple example on how to use this plugin for the web?\r\nIs this plugin even suitable for the web?\r\n\r\nPlease help!\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/prettydiff/prettydiff/issues/comments/173351972","html_url":"https://github.com/prettydiff/prettydiff/issues/248#issuecomment-173351972","issue_url":"https://api.github.com/repos/prettydiff/prettydiff/issues/248","id":173351972,"user":{"login":"prettydiff","id":524902,"avatar_url":"https://avatars.githubusercontent.com/u/524902?v=3","gravatar_id":"","url":"https://api.github.com/users/prettydiff","html_url":"https://github.com/prettydiff","followers_url":"https://api.github.com/users/prettydiff/followers","following_url":"https://api.github.com/users/prettydiff/following{/other_user}","gists_url":"https://api.github.com/users/prettydiff/gists{/gist_id}","starred_url":"https://api.github.com/users/prettydiff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prettydiff/subscriptions","organizations_url":"https://api.github.com/users/prettydiff/orgs","repos_url":"https://api.github.com/users/prettydiff/repos","events_url":"https://api.github.com/users/prettydiff/events{/privacy}","received_events_url":"https://api.github.com/users/prettydiff/received_events","type":"User","site_admin":false},"created_at":"2016-01-20T20:37:06Z","updated_at":"2016-01-20T20:37:06Z","body":"I have largely accomplished this issue by providing new documentation that is more accurate and friendly on the eyes.  The updated and refined CSS code will be tracked in the recently opened #253."}}