{"comment":{"url":"https://api.github.com/repos/ether/etherpad-require-kernel/comments/9917502","html_url":"https://github.com/ether/etherpad-require-kernel/commit/c0097140ff556d70566cfd3344c7b283150ad337#commitcomment-9917502","id":9917502,"user":{"login":"goldquest","id":1248214,"avatar_url":"https://avatars.githubusercontent.com/u/1248214?v=3","gravatar_id":"","url":"https://api.github.com/users/goldquest","html_url":"https://github.com/goldquest","followers_url":"https://api.github.com/users/goldquest/followers","following_url":"https://api.github.com/users/goldquest/following{/other_user}","gists_url":"https://api.github.com/users/goldquest/gists{/gist_id}","starred_url":"https://api.github.com/users/goldquest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goldquest/subscriptions","organizations_url":"https://api.github.com/users/goldquest/orgs","repos_url":"https://api.github.com/users/goldquest/repos","events_url":"https://api.github.com/users/goldquest/events{/privacy}","received_events_url":"https://api.github.com/users/goldquest/received_events","type":"User","site_admin":false},"position":null,"line":null,"path":"","commit_id":"c0097140ff556d70566cfd3344c7b283150ad337","created_at":"2015-02-25T16:02:12Z","updated_at":"2015-02-25T16:02:12Z","body":"I stumbled across this problem while testing etherpad v1.5.1 and fixed it myself, then saw your solution.\r\n\r\nInstead of the hack, you could maybe just check, if the path ends in `.js` and if so use only the empty suffix.\r\nIf you then have a path, which ends on `.js`, you would only have 1 request.\r\nIf not, you would just have a quick `path.slice(-3)` function call.\r\n\r\nWhat do you think?\r\n"}}