{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/pdf.js/pulls/comments/58266680","id":58266680,"diff_hunk":"@@ -19,18 +19,21 @@\n 'use strict';\n \n var useRequireEnsure = false;\n-if (typeof module !== 'undefined' && module.require) {\n-  // node.js - disable worker and set require.ensure.\n-  PDFJS.disableWorker = true;\n-  if (typeof require.ensure === 'undefined') {\n-    require.ensure = require('node-ensure');\n+if (typeof module !== 'undefined' && module.exports !== 'undefined') {\n+  if (module.require) {\n+    // node.js - disable worker and set require.ensure.\n+    PDFJS.disableWorker = true;\n+    if (typeof require.ensure === 'undefined') {\n+      require.ensure = require('node-ensure');\n+    }\n+    useRequireEnsure = true;\n+  } else if (typeof __webpack_require__ !== 'undefined') {\n+    // Webpack - get/bundle pdf.worker.js as additional file.\n+    PDFJS.workerSrc = require('entry?name=[hash]-worker.js!./pdf.worker.js');\n+    useRequireEnsure = true;\n+  } else {\n+    PDFJS.workerSrc = workerify './pdf.worker.js'; // jshint ignore:line","path":"src/frameworks.js","position":22,"original_position":22,"commit_id":"1d4072340dd614674c6d11c58053383991cf04c4","original_commit_id":"e9c907e86f3356ba61ae7bdf1610a374880d672d","user":{"login":"yurydelendik","id":1523410,"avatar_url":"https://avatars.githubusercontent.com/u/1523410?v=3","gravatar_id":"","url":"https://api.github.com/users/yurydelendik","html_url":"https://github.com/yurydelendik","followers_url":"https://api.github.com/users/yurydelendik/followers","following_url":"https://api.github.com/users/yurydelendik/following{/other_user}","gists_url":"https://api.github.com/users/yurydelendik/gists{/gist_id}","starred_url":"https://api.github.com/users/yurydelendik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yurydelendik/subscriptions","organizations_url":"https://api.github.com/users/yurydelendik/orgs","repos_url":"https://api.github.com/users/yurydelendik/repos","events_url":"https://api.github.com/users/yurydelendik/events{/privacy}","received_events_url":"https://api.github.com/users/yurydelendik/received_events","type":"User","site_admin":false},"body":"Right, but pdf.js file will be used not only with browerify (see pdfjs-dist project output)","created_at":"2016-04-01T20:59:11Z","updated_at":"2016-04-01T20:59:11Z","html_url":"https://github.com/mozilla/pdf.js/pull/7147#discussion_r58266680","pull_request_url":"https://api.github.com/repos/mozilla/pdf.js/pulls/7147","_links":{"self":{"href":"https://api.github.com/repos/mozilla/pdf.js/pulls/comments/58266680"},"html":{"href":"https://github.com/mozilla/pdf.js/pull/7147#discussion_r58266680"},"pull_request":{"href":"https://api.github.com/repos/mozilla/pdf.js/pulls/7147"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/pdf.js/pulls/7147","id":65002087,"html_url":"https://github.com/mozilla/pdf.js/pull/7147","diff_url":"https://github.com/mozilla/pdf.js/pull/7147.diff","patch_url":"https://github.com/mozilla/pdf.js/pull/7147.patch","issue_url":"https://api.github.com/repos/mozilla/pdf.js/issues/7147","number":7147,"state":"open","locked":false,"title":"added browserify support","user":{"login":"mciparelli","id":403621,"avatar_url":"https://avatars.githubusercontent.com/u/403621?v=3","gravatar_id":"","url":"https://api.github.com/users/mciparelli","html_url":"https://github.com/mciparelli","followers_url":"https://api.github.com/users/mciparelli/followers","following_url":"https://api.github.com/users/mciparelli/following{/other_user}","gists_url":"https://api.github.com/users/mciparelli/gists{/gist_id}","starred_url":"https://api.github.com/users/mciparelli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mciparelli/subscriptions","organizations_url":"https://api.github.com/users/mciparelli/orgs","repos_url":"https://api.github.com/users/mciparelli/repos","events_url":"https://api.github.com/users/mciparelli/events{/privacy}","received_events_url":"https://api.github.com/users/mciparelli/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-01T20:40:16Z","updated_at":"2016-04-01T20:59:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fa6142a2b2fb007be079aa56a32ffd8785f1115a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/pdf.js/pulls/7147/commits","review_comments_url":"https://api.github.com/repos/mozilla/pdf.js/pulls/7147/comments","review_comment_url":"https://api.github.com/repos/mozilla/pdf.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/pdf.js/issues/7147/comments","statuses_url":"https://api.github.com/repos/mozilla/pdf.js/statuses/1d4072340dd614674c6d11c58053383991cf04c4","head":{"label":"mciparelli:browserify-support","ref":"browserify-support","sha":"1d4072340dd614674c6d11c58053383991cf04c4","user":{"login":"mciparelli","id":403621,"avatar_url":"https://avatars.githubusercontent.com/u/403621?v=3","gravatar_id":"","url":"https://api.github.com/users/mciparelli","html_url":"https://github.com/mciparelli","followers_url":"https://api.github.com/users/mciparelli/followers","following_url":"https://api.github.com/users/mciparelli/following{/other_user}","gists_url":"https://api.github.com/users/mciparelli/gists{/gist_id}","starred_url":"https://api.github.com/users/mciparelli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mciparelli/subscriptions","organizations_url":"https://api.github.com/users/mciparelli/orgs","repos_url":"https://api.github.com/users/mciparelli/repos","events_url":"https://api.github.com/users/mciparelli/events{/privacy}","received_events_url":"https://api.github.com/users/mciparelli/received_events","type":"User","site_admin":false},"repo":{"id":55260148,"name":"pdf.js","full_name":"mciparelli/pdf.js","owner":{"login":"mciparelli","id":403621,"avatar_url":"https://avatars.githubusercontent.com/u/403621?v=3","gravatar_id":"","url":"https://api.github.com/users/mciparelli","html_url":"https://github.com/mciparelli","followers_url":"https://api.github.com/users/mciparelli/followers","following_url":"https://api.github.com/users/mciparelli/following{/other_user}","gists_url":"https://api.github.com/users/mciparelli/gists{/gist_id}","starred_url":"https://api.github.com/users/mciparelli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mciparelli/subscriptions","organizations_url":"https://api.github.com/users/mciparelli/orgs","repos_url":"https://api.github.com/users/mciparelli/repos","events_url":"https://api.github.com/users/mciparelli/events{/privacy}","received_events_url":"https://api.github.com/users/mciparelli/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mciparelli/pdf.js","description":"PDF Reader in JavaScript","fork":true,"url":"https://api.github.com/repos/mciparelli/pdf.js","forks_url":"https://api.github.com/repos/mciparelli/pdf.js/forks","keys_url":"https://api.github.com/repos/mciparelli/pdf.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mciparelli/pdf.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mciparelli/pdf.js/teams","hooks_url":"https://api.github.com/repos/mciparelli/pdf.js/hooks","issue_events_url":"https://api.github.com/repos/mciparelli/pdf.js/issues/events{/number}","events_url":"https://api.github.com/repos/mciparelli/pdf.js/events","assignees_url":"https://api.github.com/repos/mciparelli/pdf.js/assignees{/user}","branches_url":"https://api.github.com/repos/mciparelli/pdf.js/branches{/branch}","tags_url":"https://api.github.com/repos/mciparelli/pdf.js/tags","blobs_url":"https://api.github.com/repos/mciparelli/pdf.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mciparelli/pdf.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mciparelli/pdf.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/mciparelli/pdf.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mciparelli/pdf.js/statuses/{sha}","languages_url":"https://api.github.com/repos/mciparelli/pdf.js/languages","stargazers_url":"https://api.github.com/repos/mciparelli/pdf.js/stargazers","contributors_url":"https://api.github.com/repos/mciparelli/pdf.js/contributors","subscribers_url":"https://api.github.com/repos/mciparelli/pdf.js/subscribers","subscription_url":"https://api.github.com/repos/mciparelli/pdf.js/subscription","commits_url":"https://api.github.com/repos/mciparelli/pdf.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/mciparelli/pdf.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/mciparelli/pdf.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/mciparelli/pdf.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/mciparelli/pdf.js/contents/{+path}","compare_url":"https://api.github.com/repos/mciparelli/pdf.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mciparelli/pdf.js/merges","archive_url":"https://api.github.com/repos/mciparelli/pdf.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mciparelli/pdf.js/downloads","issues_url":"https://api.github.com/repos/mciparelli/pdf.js/issues{/number}","pulls_url":"https://api.github.com/repos/mciparelli/pdf.js/pulls{/number}","milestones_url":"https://api.github.com/repos/mciparelli/pdf.js/milestones{/number}","notifications_url":"https://api.github.com/repos/mciparelli/pdf.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mciparelli/pdf.js/labels{/name}","releases_url":"https://api.github.com/repos/mciparelli/pdf.js/releases{/id}","deployments_url":"https://api.github.com/repos/mciparelli/pdf.js/deployments","created_at":"2016-04-01T20:23:49Z","updated_at":"2016-04-01T20:23:51Z","pushed_at":"2016-04-01T20:52:37Z","git_url":"git://github.com/mciparelli/pdf.js.git","ssh_url":"git@github.com:mciparelli/pdf.js.git","clone_url":"https://github.com/mciparelli/pdf.js.git","svn_url":"https://github.com/mciparelli/pdf.js","homepage":"","size":61593,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla:master","ref":"master","sha":"a250c150ab54be59f78cde67451e745e9a6ee8f7","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":1663468,"name":"pdf.js","full_name":"mozilla/pdf.js","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/pdf.js","description":"PDF Reader in JavaScript","fork":false,"url":"https://api.github.com/repos/mozilla/pdf.js","forks_url":"https://api.github.com/repos/mozilla/pdf.js/forks","keys_url":"https://api.github.com/repos/mozilla/pdf.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/pdf.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/pdf.js/teams","hooks_url":"https://api.github.com/repos/mozilla/pdf.js/hooks","issue_events_url":"https://api.github.com/repos/mozilla/pdf.js/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/pdf.js/events","assignees_url":"https://api.github.com/repos/mozilla/pdf.js/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/pdf.js/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/pdf.js/tags","blobs_url":"https://api.github.com/repos/mozilla/pdf.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/pdf.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/pdf.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/pdf.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/pdf.js/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/pdf.js/languages","stargazers_url":"https://api.github.com/repos/mozilla/pdf.js/stargazers","contributors_url":"https://api.github.com/repos/mozilla/pdf.js/contributors","subscribers_url":"https://api.github.com/repos/mozilla/pdf.js/subscribers","subscription_url":"https://api.github.com/repos/mozilla/pdf.js/subscription","commits_url":"https://api.github.com/repos/mozilla/pdf.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/pdf.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/pdf.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/pdf.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/pdf.js/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/pdf.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/pdf.js/merges","archive_url":"https://api.github.com/repos/mozilla/pdf.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/pdf.js/downloads","issues_url":"https://api.github.com/repos/mozilla/pdf.js/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/pdf.js/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/pdf.js/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/pdf.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/pdf.js/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/pdf.js/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla/pdf.js/deployments","created_at":"2011-04-26T06:32:03Z","updated_at":"2016-04-01T19:41:04Z","pushed_at":"2016-04-01T20:54:47Z","git_url":"git://github.com/mozilla/pdf.js.git","ssh_url":"git@github.com:mozilla/pdf.js.git","clone_url":"https://github.com/mozilla/pdf.js.git","svn_url":"https://github.com/mozilla/pdf.js","homepage":"","size":111146,"stargazers_count":14034,"watchers_count":14034,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":3311,"mirror_url":null,"open_issues_count":587,"forks":3311,"open_issues":587,"watchers":14034,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/pdf.js/pulls/7147"},"html":{"href":"https://github.com/mozilla/pdf.js/pull/7147"},"issue":{"href":"https://api.github.com/repos/mozilla/pdf.js/issues/7147"},"comments":{"href":"https://api.github.com/repos/mozilla/pdf.js/issues/7147/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/pdf.js/pulls/7147/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/pdf.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/pdf.js/pulls/7147/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/pdf.js/statuses/1d4072340dd614674c6d11c58053383991cf04c4"}}}}