Last active
August 29, 2015 14:24
-
-
Save leohxj/01a96602460255f5820d to your computer and use it in GitHub Desktop.
UC浏览器关闭默认手势和长按弹出菜单
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // UC-U3内核JavaScript专用API | |
| // (经测试,官方文档给出的API很多也不能使用,下面只列出测试能用的) | |
| // 1. 关闭默认手势 | |
| // 用法: | |
| navigator.control.gesture(false); | |
| // 推荐写法: | |
| try { | |
| navigator.control.gesture(false); | |
| } catch (e) { | |
| } | |
| // 2. 关闭长按弹出菜单 | |
| // 用法: | |
| navigator.control.longpressMenu(false); | |
| // 推荐写法: | |
| try { | |
| navigator.control.longpressMenu(false); | |
| } catch (e) {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var control = navigator.control || {}; | |
| if (control.gesture) { | |
| control.gesture(false); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment