{"action":"created","comment":{"url":"https://api.github.com/repos/new-xkit/XKit/pulls/comments/43577895","id":43577895,"diff_hunk":"@@ -96,9 +96,9 @@ XKit.extensions.retags = {\n \t\t\t}\n \t\t\tif (url) {\n \t\t\t\turl = url.split('/');\n-\t\t\t\tvar host = url[2], id = url[4], cache = 'retags_'+id;\n-\t\t\t\tif (localStorage.getItem(cache) !== null) {\n-\t\t\t\t\tXKit.extensions.retags.append($t,cls,$c,JSON.parse(localStorage.getItem(cache)));\n+\t\t\t\tvar host = url[2], id = url[4], cache = 'post_'+id;\n+\t\t\t\tif (XKit.storage.get('retags', cache, null) !== null) {\n+\t\t\t\t\tXKit.extensions.retags.append($t, cls, $c, XKit.storage.get('retags', cache));","path":"Extensions/retags.js","position":39,"original_position":39,"commit_id":"25057e91932a8627d4b23ac3d42570dd579e707d","original_commit_id":"25057e91932a8627d4b23ac3d42570dd579e707d","user":{"login":"hobinjk","id":2776089,"avatar_url":"https://avatars.githubusercontent.com/u/2776089?v=3","gravatar_id":"","url":"https://api.github.com/users/hobinjk","html_url":"https://github.com/hobinjk","followers_url":"https://api.github.com/users/hobinjk/followers","following_url":"https://api.github.com/users/hobinjk/following{/other_user}","gists_url":"https://api.github.com/users/hobinjk/gists{/gist_id}","starred_url":"https://api.github.com/users/hobinjk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hobinjk/subscriptions","organizations_url":"https://api.github.com/users/hobinjk/orgs","repos_url":"https://api.github.com/users/hobinjk/repos","events_url":"https://api.github.com/users/hobinjk/events{/privacy}","received_events_url":"https://api.github.com/users/hobinjk/received_events","type":"User","site_admin":false},"body":"Oh nice! My memory has failed me.","created_at":"2015-11-01T01:08:54Z","updated_at":"2015-11-01T01:08:54Z","html_url":"https://github.com/new-xkit/XKit/pull/697#discussion_r43577895","pull_request_url":"https://api.github.com/repos/new-xkit/XKit/pulls/697","_links":{"self":{"href":"https://api.github.com/repos/new-xkit/XKit/pulls/comments/43577895"},"html":{"href":"https://github.com/new-xkit/XKit/pull/697#discussion_r43577895"},"pull_request":{"href":"https://api.github.com/repos/new-xkit/XKit/pulls/697"}}},"pull_request":{"url":"https://api.github.com/repos/new-xkit/XKit/pulls/697","id":49342069,"html_url":"https://github.com/new-xkit/XKit/pull/697","diff_url":"https://github.com/new-xkit/XKit/pull/697.diff","patch_url":"https://github.com/new-xkit/XKit/pull/697.patch","issue_url":"https://api.github.com/repos/new-xkit/XKit/issues/697","number":697,"state":"open","locked":false,"title":"retags: Use XKit.storage, clear old cached posts","user":{"login":"00Davo","id":610876,"avatar_url":"https://avatars.githubusercontent.com/u/610876?v=3","gravatar_id":"","url":"https://api.github.com/users/00Davo","html_url":"https://github.com/00Davo","followers_url":"https://api.github.com/users/00Davo/followers","following_url":"https://api.github.com/users/00Davo/following{/other_user}","gists_url":"https://api.github.com/users/00Davo/gists{/gist_id}","starred_url":"https://api.github.com/users/00Davo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/00Davo/subscriptions","organizations_url":"https://api.github.com/users/00Davo/orgs","repos_url":"https://api.github.com/users/00Davo/repos","events_url":"https://api.github.com/users/00Davo/events{/privacy}","received_events_url":"https://api.github.com/users/00Davo/received_events","type":"User","site_admin":false},"body":"Retags was written as a standalone script originally, and so it was using `localStorage` rather than the XKit storage API. This caused problems once `localStorage` was *completely filled up*, because Retags caches every post it sees - in particular, Retags silently stopped working, and resetting XKit changed absolutely nothing because `localStorage` was still full.\r\n\r\nI've addressed the problem in two ways - first, XKit storage is used now, so XKit can provide warnings when it's getting full and can clear it. Second, the actual number of cached posts is tracked, and when it exceeds 1000 (or when the extension nears its XKit storage quota), all but the newest 100 are dropped from the cache. Seems to do the trick!","created_at":"2015-10-31T05:05:52Z","updated_at":"2015-11-01T01:08:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f7e819852c05616e04fd519f3531fec76c698823","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/new-xkit/XKit/pulls/697/commits","review_comments_url":"https://api.github.com/repos/new-xkit/XKit/pulls/697/comments","review_comment_url":"https://api.github.com/repos/new-xkit/XKit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/new-xkit/XKit/issues/697/comments","statuses_url":"https://api.github.com/repos/new-xkit/XKit/statuses/25057e91932a8627d4b23ac3d42570dd579e707d","head":{"label":"00Davo:retags-improved-storage","ref":"retags-improved-storage","sha":"25057e91932a8627d4b23ac3d42570dd579e707d","user":{"login":"00Davo","id":610876,"avatar_url":"https://avatars.githubusercontent.com/u/610876?v=3","gravatar_id":"","url":"https://api.github.com/users/00Davo","html_url":"https://github.com/00Davo","followers_url":"https://api.github.com/users/00Davo/followers","following_url":"https://api.github.com/users/00Davo/following{/other_user}","gists_url":"https://api.github.com/users/00Davo/gists{/gist_id}","starred_url":"https://api.github.com/users/00Davo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/00Davo/subscriptions","organizations_url":"https://api.github.com/users/00Davo/orgs","repos_url":"https://api.github.com/users/00Davo/repos","events_url":"https://api.github.com/users/00Davo/events{/privacy}","received_events_url":"https://api.github.com/users/00Davo/received_events","type":"User","site_admin":false},"repo":{"id":42091564,"name":"XKit","full_name":"00Davo/XKit","owner":{"login":"00Davo","id":610876,"avatar_url":"https://avatars.githubusercontent.com/u/610876?v=3","gravatar_id":"","url":"https://api.github.com/users/00Davo","html_url":"https://github.com/00Davo","followers_url":"https://api.github.com/users/00Davo/followers","following_url":"https://api.github.com/users/00Davo/following{/other_user}","gists_url":"https://api.github.com/users/00Davo/gists{/gist_id}","starred_url":"https://api.github.com/users/00Davo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/00Davo/subscriptions","organizations_url":"https://api.github.com/users/00Davo/orgs","repos_url":"https://api.github.com/users/00Davo/repos","events_url":"https://api.github.com/users/00Davo/events{/privacy}","received_events_url":"https://api.github.com/users/00Davo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/00Davo/XKit","description":"Fork of XKit, the Extension framework for Tumblr","fork":true,"url":"https://api.github.com/repos/00Davo/XKit","forks_url":"https://api.github.com/repos/00Davo/XKit/forks","keys_url":"https://api.github.com/repos/00Davo/XKit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/00Davo/XKit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/00Davo/XKit/teams","hooks_url":"https://api.github.com/repos/00Davo/XKit/hooks","issue_events_url":"https://api.github.com/repos/00Davo/XKit/issues/events{/number}","events_url":"https://api.github.com/repos/00Davo/XKit/events","assignees_url":"https://api.github.com/repos/00Davo/XKit/assignees{/user}","branches_url":"https://api.github.com/repos/00Davo/XKit/branches{/branch}","tags_url":"https://api.github.com/repos/00Davo/XKit/tags","blobs_url":"https://api.github.com/repos/00Davo/XKit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/00Davo/XKit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/00Davo/XKit/git/refs{/sha}","trees_url":"https://api.github.com/repos/00Davo/XKit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/00Davo/XKit/statuses/{sha}","languages_url":"https://api.github.com/repos/00Davo/XKit/languages","stargazers_url":"https://api.github.com/repos/00Davo/XKit/stargazers","contributors_url":"https://api.github.com/repos/00Davo/XKit/contributors","subscribers_url":"https://api.github.com/repos/00Davo/XKit/subscribers","subscription_url":"https://api.github.com/repos/00Davo/XKit/subscription","commits_url":"https://api.github.com/repos/00Davo/XKit/commits{/sha}","git_commits_url":"https://api.github.com/repos/00Davo/XKit/git/commits{/sha}","comments_url":"https://api.github.com/repos/00Davo/XKit/comments{/number}","issue_comment_url":"https://api.github.com/repos/00Davo/XKit/issues/comments{/number}","contents_url":"https://api.github.com/repos/00Davo/XKit/contents/{+path}","compare_url":"https://api.github.com/repos/00Davo/XKit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/00Davo/XKit/merges","archive_url":"https://api.github.com/repos/00Davo/XKit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/00Davo/XKit/downloads","issues_url":"https://api.github.com/repos/00Davo/XKit/issues{/number}","pulls_url":"https://api.github.com/repos/00Davo/XKit/pulls{/number}","milestones_url":"https://api.github.com/repos/00Davo/XKit/milestones{/number}","notifications_url":"https://api.github.com/repos/00Davo/XKit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/00Davo/XKit/labels{/name}","releases_url":"https://api.github.com/repos/00Davo/XKit/releases{/id}","created_at":"2015-09-08T05:20:45Z","updated_at":"2015-09-08T05:20:47Z","pushed_at":"2015-10-31T05:05:34Z","git_url":"git://github.com/00Davo/XKit.git","ssh_url":"git@github.com:00Davo/XKit.git","clone_url":"https://github.com/00Davo/XKit.git","svn_url":"https://github.com/00Davo/XKit","homepage":"http://new-xkit-extension.tumblr.com/","size":7533,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"new-xkit:master","ref":"master","sha":"edeb171c81503689a4d0f125e0aabe5ccb7042c9","user":{"login":"new-xkit","id":13651827,"avatar_url":"https://avatars.githubusercontent.com/u/13651827?v=3","gravatar_id":"","url":"https://api.github.com/users/new-xkit","html_url":"https://github.com/new-xkit","followers_url":"https://api.github.com/users/new-xkit/followers","following_url":"https://api.github.com/users/new-xkit/following{/other_user}","gists_url":"https://api.github.com/users/new-xkit/gists{/gist_id}","starred_url":"https://api.github.com/users/new-xkit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/new-xkit/subscriptions","organizations_url":"https://api.github.com/users/new-xkit/orgs","repos_url":"https://api.github.com/users/new-xkit/repos","events_url":"https://api.github.com/users/new-xkit/events{/privacy}","received_events_url":"https://api.github.com/users/new-xkit/received_events","type":"Organization","site_admin":false},"repo":{"id":38794346,"name":"XKit","full_name":"new-xkit/XKit","owner":{"login":"new-xkit","id":13651827,"avatar_url":"https://avatars.githubusercontent.com/u/13651827?v=3","gravatar_id":"","url":"https://api.github.com/users/new-xkit","html_url":"https://github.com/new-xkit","followers_url":"https://api.github.com/users/new-xkit/followers","following_url":"https://api.github.com/users/new-xkit/following{/other_user}","gists_url":"https://api.github.com/users/new-xkit/gists{/gist_id}","starred_url":"https://api.github.com/users/new-xkit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/new-xkit/subscriptions","organizations_url":"https://api.github.com/users/new-xkit/orgs","repos_url":"https://api.github.com/users/new-xkit/repos","events_url":"https://api.github.com/users/new-xkit/events{/privacy}","received_events_url":"https://api.github.com/users/new-xkit/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/new-xkit/XKit","description":"Fork of XKit, the Extension framework for Tumblr","fork":true,"url":"https://api.github.com/repos/new-xkit/XKit","forks_url":"https://api.github.com/repos/new-xkit/XKit/forks","keys_url":"https://api.github.com/repos/new-xkit/XKit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/new-xkit/XKit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/new-xkit/XKit/teams","hooks_url":"https://api.github.com/repos/new-xkit/XKit/hooks","issue_events_url":"https://api.github.com/repos/new-xkit/XKit/issues/events{/number}","events_url":"https://api.github.com/repos/new-xkit/XKit/events","assignees_url":"https://api.github.com/repos/new-xkit/XKit/assignees{/user}","branches_url":"https://api.github.com/repos/new-xkit/XKit/branches{/branch}","tags_url":"https://api.github.com/repos/new-xkit/XKit/tags","blobs_url":"https://api.github.com/repos/new-xkit/XKit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/new-xkit/XKit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/new-xkit/XKit/git/refs{/sha}","trees_url":"https://api.github.com/repos/new-xkit/XKit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/new-xkit/XKit/statuses/{sha}","languages_url":"https://api.github.com/repos/new-xkit/XKit/languages","stargazers_url":"https://api.github.com/repos/new-xkit/XKit/stargazers","contributors_url":"https://api.github.com/repos/new-xkit/XKit/contributors","subscribers_url":"https://api.github.com/repos/new-xkit/XKit/subscribers","subscription_url":"https://api.github.com/repos/new-xkit/XKit/subscription","commits_url":"https://api.github.com/repos/new-xkit/XKit/commits{/sha}","git_commits_url":"https://api.github.com/repos/new-xkit/XKit/git/commits{/sha}","comments_url":"https://api.github.com/repos/new-xkit/XKit/comments{/number}","issue_comment_url":"https://api.github.com/repos/new-xkit/XKit/issues/comments{/number}","contents_url":"https://api.github.com/repos/new-xkit/XKit/contents/{+path}","compare_url":"https://api.github.com/repos/new-xkit/XKit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/new-xkit/XKit/merges","archive_url":"https://api.github.com/repos/new-xkit/XKit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/new-xkit/XKit/downloads","issues_url":"https://api.github.com/repos/new-xkit/XKit/issues{/number}","pulls_url":"https://api.github.com/repos/new-xkit/XKit/pulls{/number}","milestones_url":"https://api.github.com/repos/new-xkit/XKit/milestones{/number}","notifications_url":"https://api.github.com/repos/new-xkit/XKit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/new-xkit/XKit/labels{/name}","releases_url":"https://api.github.com/repos/new-xkit/XKit/releases{/id}","created_at":"2015-07-09T03:20:10Z","updated_at":"2015-10-31T15:06:31Z","pushed_at":"2015-10-31T22:07:35Z","git_url":"git://github.com/new-xkit/XKit.git","ssh_url":"git@github.com:new-xkit/XKit.git","clone_url":"https://github.com/new-xkit/XKit.git","svn_url":"https://github.com/new-xkit/XKit","homepage":"http://new-xkit-extension.tumblr.com/","size":12944,"stargazers_count":108,"watchers_count":108,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":39,"mirror_url":null,"open_issues_count":216,"forks":39,"open_issues":216,"watchers":108,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/new-xkit/XKit/pulls/697"},"html":{"href":"https://github.com/new-xkit/XKit/pull/697"},"issue":{"href":"https://api.github.com/repos/new-xkit/XKit/issues/697"},"comments":{"href":"https://api.github.com/repos/new-xkit/XKit/issues/697/comments"},"review_comments":{"href":"https://api.github.com/repos/new-xkit/XKit/pulls/697/comments"},"review_comment":{"href":"https://api.github.com/repos/new-xkit/XKit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/new-xkit/XKit/pulls/697/commits"},"statuses":{"href":"https://api.github.com/repos/new-xkit/XKit/statuses/25057e91932a8627d4b23ac3d42570dd579e707d"}}}}