Skip to content

Instantly share code, notes, and snippets.

@tarot
Last active August 29, 2015 14:10
Show Gist options
  • Save tarot/f1dee7267596b79804fa to your computer and use it in GitHub Desktop.
Save tarot/f1dee7267596b79804fa to your computer and use it in GitHub Desktop.
<b:if cond='data:blog.isMobile'>
<script>
(function() {
var el = document.querySelector('#main');
el.__addEventListener = el.addEventListener;
el.addEventListener = function(type) {
if (!type.match(/^touch/)) {
this.__addEventListener.apply(this, arguments);
}
};
})();
</script>
</b:if>
@tarot
Copy link
Author

tarot commented Dec 8, 2014

Bloggerテンプレートのカスタマイズで</body>の直前に貼り付け、モバイルテンプレートをカスタムにすると、モバイルページのスワイプでページ移動を無効化できる。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment