{"action":"created","issue":{"url":"https://api.github.com/repos/Strategery-Inc/Magento-InfiniteScroll/issues/102","labels_url":"https://api.github.com/repos/Strategery-Inc/Magento-InfiniteScroll/issues/102/labels{/name}","comments_url":"https://api.github.com/repos/Strategery-Inc/Magento-InfiniteScroll/issues/102/comments","events_url":"https://api.github.com/repos/Strategery-Inc/Magento-InfiniteScroll/issues/102/events","html_url":"https://github.com/Strategery-Inc/Magento-InfiniteScroll/issues/102","id":86679862,"number":102,"title":"Load type based on viewport","user":{"login":"stefkosmo","id":8162643,"avatar_url":"https://avatars.githubusercontent.com/u/8162643?v=3","gravatar_id":"","url":"https://api.github.com/users/stefkosmo","html_url":"https://github.com/stefkosmo","followers_url":"https://api.github.com/users/stefkosmo/followers","following_url":"https://api.github.com/users/stefkosmo/following{/other_user}","gists_url":"https://api.github.com/users/stefkosmo/gists{/gist_id}","starred_url":"https://api.github.com/users/stefkosmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefkosmo/subscriptions","organizations_url":"https://api.github.com/users/stefkosmo/orgs","repos_url":"https://api.github.com/users/stefkosmo/repos","events_url":"https://api.github.com/users/stefkosmo/events{/privacy}","received_events_url":"https://api.github.com/users/stefkosmo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-09T17:53:36Z","updated_at":"2015-06-10T19:16:04Z","closed_at":null,"body":"Hey, \r\n\r\nThis is not an issue, but was wondering if it was possible to have load more button on desktop but automatic loading on phone and tablet?\r\n\r\nthanks"},"comment":{"url":"https://api.github.com/repos/Strategery-Inc/Magento-InfiniteScroll/issues/comments/110883104","html_url":"https://github.com/Strategery-Inc/Magento-InfiniteScroll/issues/102#issuecomment-110883104","issue_url":"https://api.github.com/repos/Strategery-Inc/Magento-InfiniteScroll/issues/102","id":110883104,"user":{"login":"stefkosmo","id":8162643,"avatar_url":"https://avatars.githubusercontent.com/u/8162643?v=3","gravatar_id":"","url":"https://api.github.com/users/stefkosmo","html_url":"https://github.com/stefkosmo","followers_url":"https://api.github.com/users/stefkosmo/followers","following_url":"https://api.github.com/users/stefkosmo/following{/other_user}","gists_url":"https://api.github.com/users/stefkosmo/gists{/gist_id}","starred_url":"https://api.github.com/users/stefkosmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefkosmo/subscriptions","organizations_url":"https://api.github.com/users/stefkosmo/orgs","repos_url":"https://api.github.com/users/stefkosmo/repos","events_url":"https://api.github.com/users/stefkosmo/events{/privacy}","received_events_url":"https://api.github.com/users/stefkosmo/received_events","type":"User","site_admin":false},"created_at":"2015-06-10T19:16:04Z","updated_at":"2015-06-10T19:16:04Z","body":"Hey,\r\n\r\nThanks for your reply.\r\n\r\nHere's an unrefined snippet to get this working:\r\n<pre>\r\n<code>\r\nvar viewport = function() {\r\n      var w = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);\r\n      if (w < 767) {\r\n            return 15;\r\n      } else {\r\n            return <?php echo (int) $helper->getConfigData('design/load_more_threshold') ?>\r\n      }\r\n}\r\n</code>\r\n</pre>\r\n\r\nAnd then change:\r\n\r\n<pre>\r\n<code>\r\noffset: viewport()\r\n</code>\r\n</pre>\r\n\r\nThanks"}}