Mobile browser touch gestures

Add touch gestures to your mobile browser, ready to use and no configuration required. In addition to general gestures, there are also special gestures for text, images, and videos. Do you still think it's not enough? Support adding personalized gestures that belong to you. We recommend using Lemur browser, Yandex browser, and Kiwi browser.

< Feedback on Mobile browser touch gestures

Review: Good - script works

§
Posted: 2021-03-20
Edited: 2021-03-20

更新了版本,你这样单单把陀螺仪写出来iframe还是不能横屏的,因为这个isLock变量在iframe视频网站里永远是0. 我看了好久终于知道怎么回事了,是油猴的脚本,他会在网页本身以及他内部每个iframe运行一次,所以就存在了多个isLock.视频播放只会改到离他最近的也就是嵌套他的那个iframe的isLock.而陀螺仪能起作用的其实是网页本身那个,他的isLock一直是0,从未被改为1过.这也就解释了以前你把监听器放在videoEvent()里面为什么代码执行了还是没效果. 其实你只要用油猴的GM_setValue来存isLock就可以修复了. 你试试哔哩哔哩的嵌套视频,第一个是横型的视频,第二个是竖型的.放到w3school里就可以测试iframe啦

<iframe src="//player.bilibili.com/player.html?aid=671830600&bvid=BV1FU4y1s7K6&cid=302842505&page=1" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true"> </iframe>

<iframe src="//player.bilibili.com/player.html?aid=671776873&bvid=BV1XU4y1W7Xj&cid=302811417&page=1" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true"> </iframe>

https://www.w3school.com.cn/tiy/t.asp?f=html_intro

还有我想请教一下if(videoPlayer.webkitRequestFullscreen){videoBox.webkitRequestFullscreen();} 这个videoPlayer.webkitRequestFullscreen为什么可以作为判断条件,他是什么类型?

L.XavierAuthor
§
Posted: 2021-03-21

十分感谢你的测试和反馈,让我了解到了原因出在哪里得以完善脚本。

if(videoPlayer.webkitRequestFullscreen)是用来测试兼容性的,判断网页是否存在这个方法。存在即为true,不存在undefined即为false。

L.XavierAuthor
§
Posted: 2021-03-21

已更新v6.8.2,应该ok了😌

Post reply

Sign in to post a reply.