{"action":"created","comment":{"url":"https://api.github.com/repos/new-xkit/XKit/pulls/comments/46765448","id":46765448,"diff_hunk":"@@ -358,6 +358,13 @@ XKit.extensions.editable_reblogs = new Object({\n \t\t\t\t\tXKit.interface.kitty.set(response.getResponseHeader(\"X-tumblr-kittens\"));\n \t\t\t\t\tXKit.tools.add_function(function() {\n \t\t\t\t\t\tTumblr.Events.trigger(\"postForms:saved\");\n+\t\t\t\t\t\tvar query_string = window.location.search;\n+\t\t\t\t\t\tif (query_string.indexOf(\"redirect_to=\") !== -1) {\n+\t\t\t\t\t\t\tvar redirect_url = window.location.search.split(\"redirect_to=\")[1];","path":"Extensions/editable_reblogs.js","position":13,"original_position":13,"commit_id":"6d3bf040a5f35929a04399aae15618032f5f5354","original_commit_id":"6d3bf040a5f35929a04399aae15618032f5f5354","user":{"login":"nightpool","id":233815,"avatar_url":"https://avatars.githubusercontent.com/u/233815?v=3","gravatar_id":"","url":"https://api.github.com/users/nightpool","html_url":"https://github.com/nightpool","followers_url":"https://api.github.com/users/nightpool/followers","following_url":"https://api.github.com/users/nightpool/following{/other_user}","gists_url":"https://api.github.com/users/nightpool/gists{/gist_id}","starred_url":"https://api.github.com/users/nightpool/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nightpool/subscriptions","organizations_url":"https://api.github.com/users/nightpool/orgs","repos_url":"https://api.github.com/users/nightpool/repos","events_url":"https://api.github.com/users/nightpool/events{/privacy}","received_events_url":"https://api.github.com/users/nightpool/received_events","type":"User","site_admin":false},"body":"looks like I was wrong—there are a lot of libraries that do it, but no\nstandard way. I'd prefer a helper function in XKit.tools for the\nimplementation if that works for you\n\nOn Sat, Dec 5, 2015 at 8:30 PM Evan G <eg1290@gmail.com> wrote:\n\n> I wasn't referring specifically to param, but just that I'm pretty sure\n> there's a jquery function to do it\n>\n> On Sat, Dec 5, 2015 at 8:25 PM Bryan Tsang <notifications@github.com>\n> wrote:\n>\n>> In Extensions/editable_reblogs.js\n>> <https://github.com/new-xkit/XKit/pull/832#discussion_r46765394>:\n>>\n>> > @@ -358,6 +358,13 @@ XKit.extensions.editable_reblogs = new Object({\n>> >  \t\t\t\t\tXKit.interface.kitty.set(response.getResponseHeader(\"X-tumblr-kittens\"));\n>> >  \t\t\t\t\tXKit.tools.add_function(function() {\n>> >  \t\t\t\t\t\tTumblr.Events.trigger(\"postForms:saved\");\n>> > +\t\t\t\t\t\tvar query_string = window.location.search;\n>> > +\t\t\t\t\t\tif (query_string.indexOf(\"redirect_to=\") !== -1) {\n>> > +\t\t\t\t\t\t\tvar redirect_url = window.location.search.split(\"redirect_to=\")[1];\n>>\n>> I get this doesn't handle the case where redirect_to isn't the only\n>> search parameter, but can you help me understand how $.param\n>> <https://api.jquery.com/jquery.param> helps? It takes an array or an\n>> object and returns its serialized representation, but we want is the\n>> reverse: to deserialize the query parameter and redirect to it.\n>>\n>> The solution I'm thinking of will probably be something like this\n>> <http://stackoverflow.com/a/901144/2073440>.\n>>\n>> —\n>> Reply to this email directly or view it on GitHub\n>> <https://github.com/new-xkit/XKit/pull/832/files#r46765394>.\n>>\n>\n","created_at":"2015-12-06T01:33:56Z","updated_at":"2015-12-06T01:33:56Z","html_url":"https://github.com/new-xkit/XKit/pull/832#discussion_r46765448","pull_request_url":"https://api.github.com/repos/new-xkit/XKit/pulls/832","_links":{"self":{"href":"https://api.github.com/repos/new-xkit/XKit/pulls/comments/46765448"},"html":{"href":"https://github.com/new-xkit/XKit/pull/832#discussion_r46765448"},"pull_request":{"href":"https://api.github.com/repos/new-xkit/XKit/pulls/832"}}},"pull_request":{"url":"https://api.github.com/repos/new-xkit/XKit/pulls/832","id":52641039,"html_url":"https://github.com/new-xkit/XKit/pull/832","diff_url":"https://github.com/new-xkit/XKit/pull/832.diff","patch_url":"https://github.com/new-xkit/XKit/pull/832.patch","issue_url":"https://api.github.com/repos/new-xkit/XKit/issues/832","number":832,"state":"open","locked":false,"title":"Editable Reblogs: redirect after reblogging from a blog page","user":{"login":"bvtsang","id":370525,"avatar_url":"https://avatars.githubusercontent.com/u/370525?v=3","gravatar_id":"","url":"https://api.github.com/users/bvtsang","html_url":"https://github.com/bvtsang","followers_url":"https://api.github.com/users/bvtsang/followers","following_url":"https://api.github.com/users/bvtsang/following{/other_user}","gists_url":"https://api.github.com/users/bvtsang/gists{/gist_id}","starred_url":"https://api.github.com/users/bvtsang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bvtsang/subscriptions","organizations_url":"https://api.github.com/users/bvtsang/orgs","repos_url":"https://api.github.com/users/bvtsang/repos","events_url":"https://api.github.com/users/bvtsang/events{/privacy}","received_events_url":"https://api.github.com/users/bvtsang/received_events","type":"User","site_admin":false},"body":"Fixes #790 ","created_at":"2015-12-04T08:18:46Z","updated_at":"2015-12-06T01:33:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7a117b00543238d1e8cdae15ffa263f6d2695923","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/new-xkit/XKit/pulls/832/commits","review_comments_url":"https://api.github.com/repos/new-xkit/XKit/pulls/832/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/832/comments","statuses_url":"https://api.github.com/repos/new-xkit/XKit/statuses/6d3bf040a5f35929a04399aae15618032f5f5354","head":{"label":"bvtsang:er-redirect","ref":"er-redirect","sha":"6d3bf040a5f35929a04399aae15618032f5f5354","user":{"login":"bvtsang","id":370525,"avatar_url":"https://avatars.githubusercontent.com/u/370525?v=3","gravatar_id":"","url":"https://api.github.com/users/bvtsang","html_url":"https://github.com/bvtsang","followers_url":"https://api.github.com/users/bvtsang/followers","following_url":"https://api.github.com/users/bvtsang/following{/other_user}","gists_url":"https://api.github.com/users/bvtsang/gists{/gist_id}","starred_url":"https://api.github.com/users/bvtsang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bvtsang/subscriptions","organizations_url":"https://api.github.com/users/bvtsang/orgs","repos_url":"https://api.github.com/users/bvtsang/repos","events_url":"https://api.github.com/users/bvtsang/events{/privacy}","received_events_url":"https://api.github.com/users/bvtsang/received_events","type":"User","site_admin":false},"repo":{"id":39550663,"name":"XKit","full_name":"bvtsang/XKit","owner":{"login":"bvtsang","id":370525,"avatar_url":"https://avatars.githubusercontent.com/u/370525?v=3","gravatar_id":"","url":"https://api.github.com/users/bvtsang","html_url":"https://github.com/bvtsang","followers_url":"https://api.github.com/users/bvtsang/followers","following_url":"https://api.github.com/users/bvtsang/following{/other_user}","gists_url":"https://api.github.com/users/bvtsang/gists{/gist_id}","starred_url":"https://api.github.com/users/bvtsang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bvtsang/subscriptions","organizations_url":"https://api.github.com/users/bvtsang/orgs","repos_url":"https://api.github.com/users/bvtsang/repos","events_url":"https://api.github.com/users/bvtsang/events{/privacy}","received_events_url":"https://api.github.com/users/bvtsang/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bvtsang/XKit","description":"Fork of XKit, the Extension framework for Tumblr","fork":true,"url":"https://api.github.com/repos/bvtsang/XKit","forks_url":"https://api.github.com/repos/bvtsang/XKit/forks","keys_url":"https://api.github.com/repos/bvtsang/XKit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bvtsang/XKit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bvtsang/XKit/teams","hooks_url":"https://api.github.com/repos/bvtsang/XKit/hooks","issue_events_url":"https://api.github.com/repos/bvtsang/XKit/issues/events{/number}","events_url":"https://api.github.com/repos/bvtsang/XKit/events","assignees_url":"https://api.github.com/repos/bvtsang/XKit/assignees{/user}","branches_url":"https://api.github.com/repos/bvtsang/XKit/branches{/branch}","tags_url":"https://api.github.com/repos/bvtsang/XKit/tags","blobs_url":"https://api.github.com/repos/bvtsang/XKit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bvtsang/XKit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bvtsang/XKit/git/refs{/sha}","trees_url":"https://api.github.com/repos/bvtsang/XKit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bvtsang/XKit/statuses/{sha}","languages_url":"https://api.github.com/repos/bvtsang/XKit/languages","stargazers_url":"https://api.github.com/repos/bvtsang/XKit/stargazers","contributors_url":"https://api.github.com/repos/bvtsang/XKit/contributors","subscribers_url":"https://api.github.com/repos/bvtsang/XKit/subscribers","subscription_url":"https://api.github.com/repos/bvtsang/XKit/subscription","commits_url":"https://api.github.com/repos/bvtsang/XKit/commits{/sha}","git_commits_url":"https://api.github.com/repos/bvtsang/XKit/git/commits{/sha}","comments_url":"https://api.github.com/repos/bvtsang/XKit/comments{/number}","issue_comment_url":"https://api.github.com/repos/bvtsang/XKit/issues/comments{/number}","contents_url":"https://api.github.com/repos/bvtsang/XKit/contents/{+path}","compare_url":"https://api.github.com/repos/bvtsang/XKit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bvtsang/XKit/merges","archive_url":"https://api.github.com/repos/bvtsang/XKit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bvtsang/XKit/downloads","issues_url":"https://api.github.com/repos/bvtsang/XKit/issues{/number}","pulls_url":"https://api.github.com/repos/bvtsang/XKit/pulls{/number}","milestones_url":"https://api.github.com/repos/bvtsang/XKit/milestones{/number}","notifications_url":"https://api.github.com/repos/bvtsang/XKit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bvtsang/XKit/labels{/name}","releases_url":"https://api.github.com/repos/bvtsang/XKit/releases{/id}","created_at":"2015-07-23T06:49:19Z","updated_at":"2015-07-23T06:49:20Z","pushed_at":"2015-12-04T08:16:31Z","git_url":"git://github.com/bvtsang/XKit.git","ssh_url":"git@github.com:bvtsang/XKit.git","clone_url":"https://github.com/bvtsang/XKit.git","svn_url":"https://github.com/bvtsang/XKit","homepage":"http://new-xkit-extension.tumblr.com/","size":6750,"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":"fe25b0adcfbd3d4024e8aef3026e06e7b54a27a9","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-12-03T03:29:03Z","pushed_at":"2015-12-06T00:18:52Z","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":10028,"stargazers_count":132,"watchers_count":132,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":47,"mirror_url":null,"open_issues_count":233,"forks":47,"open_issues":233,"watchers":132,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/new-xkit/XKit/pulls/832"},"html":{"href":"https://github.com/new-xkit/XKit/pull/832"},"issue":{"href":"https://api.github.com/repos/new-xkit/XKit/issues/832"},"comments":{"href":"https://api.github.com/repos/new-xkit/XKit/issues/832/comments"},"review_comments":{"href":"https://api.github.com/repos/new-xkit/XKit/pulls/832/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/832/commits"},"statuses":{"href":"https://api.github.com/repos/new-xkit/XKit/statuses/6d3bf040a5f35929a04399aae15618032f5f5354"}}}}