本地开发用户脚本(Tampermonkey)能否实现浏览器同步测试? [英] Can synchronised browser testing be achieved when the user script (Tampermonkey) is developed locally?

查看:54
本文介绍了本地开发用户脚本(Tampermonkey)能否实现浏览器同步测试?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在本地开发用户脚本 (Tampermonkey).当本地JS发生变化时,我想自动刷新用户脚本的目标URL而不是本地HTML文件.

I am developing a user script (Tampermonkey) locally. When the local JS changes, I want to automatically refresh the target URL of the user script instead of a local HTML file.

如何实现?查了每一条命令和配置信息,都没有找到解决办法,就来求助了.

How can this be achieved? I checked every command and configuration information, but did not find a solution, so I came to ask for help.

本地开发UserScript的方法见这里.回答者提到可以使用browser-sync,但是我没有找到实现的方法.

The method of developing UserScript locally is seen here. The answerer mentioned that browser-sync can be used, but I did not find a way to achieve it.

推荐答案

livereload 可以很好的解决这个问题,因为 livereload 是通过浏览器扩展和本地程序实现的.当文件发生变化时,可以立即刷新目标网址.

livereload can solve this problem very well, because livereload is implemented through browser extensions and local programs. When the file changes, the target URL can be refreshed immediately.

http://livereload.com/

https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei/相关

这篇关于本地开发用户脚本(Tampermonkey)能否实现浏览器同步测试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆