{"action":"created","comment":{"url":"https://api.github.com/repos/jossmac/react-scrolllock/pulls/comments/193248829","pull_request_review_id":126185054,"id":193248829,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MzI0ODgyOQ==","diff_hunk":"@@ -0,0 +1,46 @@\n+// @flow\n+import React, { PureComponent } from 'react';\n+import { canUseDOM } from 'exenv';\n+\n+import { makeStyleTag, sheetForTag, injectStyles, insertStyleTag } from './utils';\n+\n+export const SHEET_ID = 'react-scrolllock-stylesheet';\n+type Props = { styles: string };\n+\n+export default class Sheet extends PureComponent<Props> {\n+  sheet: CSSStyleSheet | null;\n+  componentDidMount() {\n+    if (!canUseDOM) return;\n+\n+    // ensure there's only ever ONE stylesheet for react-scrolllock\n+    const existingLock = document.querySelector(`#${SHEET_ID}`);\n+    if (existingLock) return;","path":"src/StyleSheet.js","position":17,"original_position":17,"commit_id":"e6363b07f8f6f157c03982877662901d6fa56bd7","original_commit_id":"e6363b07f8f6f157c03982877662901d6fa56bd7","user":{"login":"treshugart","id":136556,"node_id":"MDQ6VXNlcjEzNjU1Ng==","avatar_url":"https://avatars3.githubusercontent.com/u/136556?v=4","gravatar_id":"","url":"https://api.github.com/users/treshugart","html_url":"https://github.com/treshugart","followers_url":"https://api.github.com/users/treshugart/followers","following_url":"https://api.github.com/users/treshugart/following{/other_user}","gists_url":"https://api.github.com/users/treshugart/gists{/gist_id}","starred_url":"https://api.github.com/users/treshugart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/treshugart/subscriptions","organizations_url":"https://api.github.com/users/treshugart/orgs","repos_url":"https://api.github.com/users/treshugart/repos","events_url":"https://api.github.com/users/treshugart/events{/privacy}","received_events_url":"https://api.github.com/users/treshugart/received_events","type":"User","site_admin":false},"body":"I tend to agree that this would be a safer algo. I don't think it should suffer from perf issues because I don't think there's a use case for mounting a scroll lock component thousands of times.","created_at":"2018-06-05T23:07:12Z","updated_at":"2018-06-05T23:07:13Z","html_url":"https://github.com/jossmac/react-scrolllock/pull/28#discussion_r193248829","pull_request_url":"https://api.github.com/repos/jossmac/react-scrolllock/pulls/28","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/jossmac/react-scrolllock/pulls/comments/193248829"},"html":{"href":"https://github.com/jossmac/react-scrolllock/pull/28#discussion_r193248829"},"pull_request":{"href":"https://api.github.com/repos/jossmac/react-scrolllock/pulls/28"}},"in_reply_to_id":193233169},"pull_request":{"url":"https://api.github.com/repos/jossmac/react-scrolllock/pulls/28","id":192628294,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkyNjI4Mjk0","html_url":"https://github.com/jossmac/react-scrolllock/pull/28","diff_url":"https://github.com/jossmac/react-scrolllock/pull/28.diff","patch_url":"https://github.com/jossmac/react-scrolllock/pull/28.patch","issue_url":"https://api.github.com/repos/jossmac/react-scrolllock/issues/28","number":28,"state":"open","locked":false,"title":"Replace inline styles on the body with an injected stylesheet","user":{"login":"jossmac","id":2730833,"node_id":"MDQ6VXNlcjI3MzA4MzM=","avatar_url":"https://avatars3.githubusercontent.com/u/2730833?v=4","gravatar_id":"","url":"https://api.github.com/users/jossmac","html_url":"https://github.com/jossmac","followers_url":"https://api.github.com/users/jossmac/followers","following_url":"https://api.github.com/users/jossmac/following{/other_user}","gists_url":"https://api.github.com/users/jossmac/gists{/gist_id}","starred_url":"https://api.github.com/users/jossmac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jossmac/subscriptions","organizations_url":"https://api.github.com/users/jossmac/orgs","repos_url":"https://api.github.com/users/jossmac/repos","events_url":"https://api.github.com/users/jossmac/events{/privacy}","received_events_url":"https://api.github.com/users/jossmac/received_events","type":"User","site_admin":false},"body":"- Resolves #17\r\n- Closes #24","created_at":"2018-06-05T08:33:44Z","updated_at":"2018-06-05T23:07:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"09d04680f767ac4833c00518b5d12ad9f70f8931","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/jossmac/react-scrolllock/pulls/28/commits","review_comments_url":"https://api.github.com/repos/jossmac/react-scrolllock/pulls/28/comments","review_comment_url":"https://api.github.com/repos/jossmac/react-scrolllock/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jossmac/react-scrolllock/issues/28/comments","statuses_url":"https://api.github.com/repos/jossmac/react-scrolllock/statuses/e6363b07f8f6f157c03982877662901d6fa56bd7","head":{"label":"jossmac:inject-stylesheet","ref":"inject-stylesheet","sha":"e6363b07f8f6f157c03982877662901d6fa56bd7","user":{"login":"jossmac","id":2730833,"node_id":"MDQ6VXNlcjI3MzA4MzM=","avatar_url":"https://avatars3.githubusercontent.com/u/2730833?v=4","gravatar_id":"","url":"https://api.github.com/users/jossmac","html_url":"https://github.com/jossmac","followers_url":"https://api.github.com/users/jossmac/followers","following_url":"https://api.github.com/users/jossmac/following{/other_user}","gists_url":"https://api.github.com/users/jossmac/gists{/gist_id}","starred_url":"https://api.github.com/users/jossmac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jossmac/subscriptions","organizations_url":"https://api.github.com/users/jossmac/orgs","repos_url":"https://api.github.com/users/jossmac/repos","events_url":"https://api.github.com/users/jossmac/events{/privacy}","received_events_url":"https://api.github.com/users/jossmac/received_events","type":"User","site_admin":false},"repo":{"id":72802690,"node_id":"MDEwOlJlcG9zaXRvcnk3MjgwMjY5MA==","name":"react-scrolllock","full_name":"jossmac/react-scrolllock","owner":{"login":"jossmac","id":2730833,"node_id":"MDQ6VXNlcjI3MzA4MzM=","avatar_url":"https://avatars3.githubusercontent.com/u/2730833?v=4","gravatar_id":"","url":"https://api.github.com/users/jossmac","html_url":"https://github.com/jossmac","followers_url":"https://api.github.com/users/jossmac/followers","following_url":"https://api.github.com/users/jossmac/following{/other_user}","gists_url":"https://api.github.com/users/jossmac/gists{/gist_id}","starred_url":"https://api.github.com/users/jossmac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jossmac/subscriptions","organizations_url":"https://api.github.com/users/jossmac/orgs","repos_url":"https://api.github.com/users/jossmac/repos","events_url":"https://api.github.com/users/jossmac/events{/privacy}","received_events_url":"https://api.github.com/users/jossmac/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jossmac/react-scrolllock","description":"🔒 Prevent scroll on the <body /> when mounted","fork":false,"url":"https://api.github.com/repos/jossmac/react-scrolllock","forks_url":"https://api.github.com/repos/jossmac/react-scrolllock/forks","keys_url":"https://api.github.com/repos/jossmac/react-scrolllock/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jossmac/react-scrolllock/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jossmac/react-scrolllock/teams","hooks_url":"https://api.github.com/repos/jossmac/react-scrolllock/hooks","issue_events_url":"https://api.github.com/repos/jossmac/react-scrolllock/issues/events{/number}","events_url":"https://api.github.com/repos/jossmac/react-scrolllock/events","assignees_url":"https://api.github.com/repos/jossmac/react-scrolllock/assignees{/user}","branches_url":"https://api.github.com/repos/jossmac/react-scrolllock/branches{/branch}","tags_url":"https://api.github.com/repos/jossmac/react-scrolllock/tags","blobs_url":"https://api.github.com/repos/jossmac/react-scrolllock/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jossmac/react-scrolllock/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jossmac/react-scrolllock/git/refs{/sha}","trees_url":"https://api.github.com/repos/jossmac/react-scrolllock/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jossmac/react-scrolllock/statuses/{sha}","languages_url":"https://api.github.com/repos/jossmac/react-scrolllock/languages","stargazers_url":"https://api.github.com/repos/jossmac/react-scrolllock/stargazers","contributors_url":"https://api.github.com/repos/jossmac/react-scrolllock/contributors","subscribers_url":"https://api.github.com/repos/jossmac/react-scrolllock/subscribers","subscription_url":"https://api.github.com/repos/jossmac/react-scrolllock/subscription","commits_url":"https://api.github.com/repos/jossmac/react-scrolllock/commits{/sha}","git_commits_url":"https://api.github.com/repos/jossmac/react-scrolllock/git/commits{/sha}","comments_url":"https://api.github.com/repos/jossmac/react-scrolllock/comments{/number}","issue_comment_url":"https://api.github.com/repos/jossmac/react-scrolllock/issues/comments{/number}","contents_url":"https://api.github.com/repos/jossmac/react-scrolllock/contents/{+path}","compare_url":"https://api.github.com/repos/jossmac/react-scrolllock/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jossmac/react-scrolllock/merges","archive_url":"https://api.github.com/repos/jossmac/react-scrolllock/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jossmac/react-scrolllock/downloads","issues_url":"https://api.github.com/repos/jossmac/react-scrolllock/issues{/number}","pulls_url":"https://api.github.com/repos/jossmac/react-scrolllock/pulls{/number}","milestones_url":"https://api.github.com/repos/jossmac/react-scrolllock/milestones{/number}","notifications_url":"https://api.github.com/repos/jossmac/react-scrolllock/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jossmac/react-scrolllock/labels{/name}","releases_url":"https://api.github.com/repos/jossmac/react-scrolllock/releases{/id}","deployments_url":"https://api.github.com/repos/jossmac/react-scrolllock/deployments","created_at":"2016-11-04T01:29:29Z","updated_at":"2018-06-05T10:56:43Z","pushed_at":"2018-06-05T10:29:02Z","git_url":"git://github.com/jossmac/react-scrolllock.git","ssh_url":"git@github.com:jossmac/react-scrolllock.git","clone_url":"https://github.com/jossmac/react-scrolllock.git","svn_url":"https://github.com/jossmac/react-scrolllock","homepage":"https://jossmac.github.io/react-scrolllock","size":291,"stargazers_count":150,"watchers_count":150,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":15,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":15,"open_issues":3,"watchers":150,"default_branch":"master"}},"base":{"label":"jossmac:master","ref":"master","sha":"3f9236a960de169f70c9419b400fdd552b397875","user":{"login":"jossmac","id":2730833,"node_id":"MDQ6VXNlcjI3MzA4MzM=","avatar_url":"https://avatars3.githubusercontent.com/u/2730833?v=4","gravatar_id":"","url":"https://api.github.com/users/jossmac","html_url":"https://github.com/jossmac","followers_url":"https://api.github.com/users/jossmac/followers","following_url":"https://api.github.com/users/jossmac/following{/other_user}","gists_url":"https://api.github.com/users/jossmac/gists{/gist_id}","starred_url":"https://api.github.com/users/jossmac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jossmac/subscriptions","organizations_url":"https://api.github.com/users/jossmac/orgs","repos_url":"https://api.github.com/users/jossmac/repos","events_url":"https://api.github.com/users/jossmac/events{/privacy}","received_events_url":"https://api.github.com/users/jossmac/received_events","type":"User","site_admin":false},"repo":{"id":72802690,"node_id":"MDEwOlJlcG9zaXRvcnk3MjgwMjY5MA==","name":"react-scrolllock","full_name":"jossmac/react-scrolllock","owner":{"login":"jossmac","id":2730833,"node_id":"MDQ6VXNlcjI3MzA4MzM=","avatar_url":"https://avatars3.githubusercontent.com/u/2730833?v=4","gravatar_id":"","url":"https://api.github.com/users/jossmac","html_url":"https://github.com/jossmac","followers_url":"https://api.github.com/users/jossmac/followers","following_url":"https://api.github.com/users/jossmac/following{/other_user}","gists_url":"https://api.github.com/users/jossmac/gists{/gist_id}","starred_url":"https://api.github.com/users/jossmac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jossmac/subscriptions","organizations_url":"https://api.github.com/users/jossmac/orgs","repos_url":"https://api.github.com/users/jossmac/repos","events_url":"https://api.github.com/users/jossmac/events{/privacy}","received_events_url":"https://api.github.com/users/jossmac/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jossmac/react-scrolllock","description":"🔒 Prevent scroll on the <body /> when mounted","fork":false,"url":"https://api.github.com/repos/jossmac/react-scrolllock","forks_url":"https://api.github.com/repos/jossmac/react-scrolllock/forks","keys_url":"https://api.github.com/repos/jossmac/react-scrolllock/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jossmac/react-scrolllock/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jossmac/react-scrolllock/teams","hooks_url":"https://api.github.com/repos/jossmac/react-scrolllock/hooks","issue_events_url":"https://api.github.com/repos/jossmac/react-scrolllock/issues/events{/number}","events_url":"https://api.github.com/repos/jossmac/react-scrolllock/events","assignees_url":"https://api.github.com/repos/jossmac/react-scrolllock/assignees{/user}","branches_url":"https://api.github.com/repos/jossmac/react-scrolllock/branches{/branch}","tags_url":"https://api.github.com/repos/jossmac/react-scrolllock/tags","blobs_url":"https://api.github.com/repos/jossmac/react-scrolllock/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jossmac/react-scrolllock/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jossmac/react-scrolllock/git/refs{/sha}","trees_url":"https://api.github.com/repos/jossmac/react-scrolllock/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jossmac/react-scrolllock/statuses/{sha}","languages_url":"https://api.github.com/repos/jossmac/react-scrolllock/languages","stargazers_url":"https://api.github.com/repos/jossmac/react-scrolllock/stargazers","contributors_url":"https://api.github.com/repos/jossmac/react-scrolllock/contributors","subscribers_url":"https://api.github.com/repos/jossmac/react-scrolllock/subscribers","subscription_url":"https://api.github.com/repos/jossmac/react-scrolllock/subscription","commits_url":"https://api.github.com/repos/jossmac/react-scrolllock/commits{/sha}","git_commits_url":"https://api.github.com/repos/jossmac/react-scrolllock/git/commits{/sha}","comments_url":"https://api.github.com/repos/jossmac/react-scrolllock/comments{/number}","issue_comment_url":"https://api.github.com/repos/jossmac/react-scrolllock/issues/comments{/number}","contents_url":"https://api.github.com/repos/jossmac/react-scrolllock/contents/{+path}","compare_url":"https://api.github.com/repos/jossmac/react-scrolllock/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jossmac/react-scrolllock/merges","archive_url":"https://api.github.com/repos/jossmac/react-scrolllock/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jossmac/react-scrolllock/downloads","issues_url":"https://api.github.com/repos/jossmac/react-scrolllock/issues{/number}","pulls_url":"https://api.github.com/repos/jossmac/react-scrolllock/pulls{/number}","milestones_url":"https://api.github.com/repos/jossmac/react-scrolllock/milestones{/number}","notifications_url":"https://api.github.com/repos/jossmac/react-scrolllock/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jossmac/react-scrolllock/labels{/name}","releases_url":"https://api.github.com/repos/jossmac/react-scrolllock/releases{/id}","deployments_url":"https://api.github.com/repos/jossmac/react-scrolllock/deployments","created_at":"2016-11-04T01:29:29Z","updated_at":"2018-06-05T10:56:43Z","pushed_at":"2018-06-05T10:29:02Z","git_url":"git://github.com/jossmac/react-scrolllock.git","ssh_url":"git@github.com:jossmac/react-scrolllock.git","clone_url":"https://github.com/jossmac/react-scrolllock.git","svn_url":"https://github.com/jossmac/react-scrolllock","homepage":"https://jossmac.github.io/react-scrolllock","size":291,"stargazers_count":150,"watchers_count":150,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":15,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":15,"open_issues":3,"watchers":150,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jossmac/react-scrolllock/pulls/28"},"html":{"href":"https://github.com/jossmac/react-scrolllock/pull/28"},"issue":{"href":"https://api.github.com/repos/jossmac/react-scrolllock/issues/28"},"comments":{"href":"https://api.github.com/repos/jossmac/react-scrolllock/issues/28/comments"},"review_comments":{"href":"https://api.github.com/repos/jossmac/react-scrolllock/pulls/28/comments"},"review_comment":{"href":"https://api.github.com/repos/jossmac/react-scrolllock/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jossmac/react-scrolllock/pulls/28/commits"},"statuses":{"href":"https://api.github.com/repos/jossmac/react-scrolllock/statuses/e6363b07f8f6f157c03982877662901d6fa56bd7"}},"author_association":"OWNER"}}
{"actor":{"display_login":"treshugart"}}