是否可以在本地保存 Firebug 中的更改?
我想做的是使用 Firebug 保存对不同站点上的 CSS 和 HTML 所做的更改。
需要明确的是,我不期望 Firebug 通过 FTP 或其他方式将更改上传到服务器。我只想将更改保存在本地,这样只有我才能看到它们。
例如,我见过一些 Firefox/Chrome 扩展程序在 Youtube 上的每个视频下添加了一个下载按钮,所以我知道可以以某种方式做到这一点。
如果您有不同的方法来实现我想要做的事情,我会很高兴听到。
(不一定要与 Firebug 一起使用。)
提前致谢!
What I'm trying to do is to save the changes I make to CSS and HTML on different sites with Firebug.
Just to be clear, I don't expect Firebug to upload the changes to the server via FTP or anything. I just want to save the changes locally, so only I will be able to see them.
For example I've seen a few Firefox/Chrome extensions that add a download button under every video on Youtube, so I know it's possible to do that somehow.
If you have a different way to achieve what I'm trying to do, I'll be glad to hear about it.
(It doesn't have to be with Firebug.)
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
如果您不介意使用 Web 开发者工具栏,那么很容易保存对 DOM(和 CSS)所做的更改。
安装工具栏时,您将看到一个“查看源代码”菜单,单击该菜单并选择“查看生成的源代码”。然后只需将其复制并粘贴到 .html 文件中。
您没有说是否更改 HTML 或 CSS,如果 CSS,FireFile 是一个非常好的插件。
编辑,通过一些谷歌搜索,我发现FireDiff,它声明它可以导出Firebug中所做的更改,我还没有测试过,值得一试。
If you don't mind using Web Developer Toolbar it's easy to save changes made to the DOM (and CSS).
When you install the toolbar, you'll get a "View Source" menu, click on that and choose "View generated source". Then just copy and paste that into a .html file.
You did not say if you alter your HTML or CSS, if CSS, FireFile is a very good addon for this.
Edit, with some Googling, i found FireDiff, which states that it can export changes made in Firebug, i have not tested it bit it's worth checking out.
您可以尝试使用 Greasemonkey。
它支持添加自定义脚本,这些脚本在您加载页面时运行(链接到应该加载的页面),并且可以动态更改页面。
https://addons.mozilla.org/en-US/firefox/addon/油猴/
You could try using Greasemonkey.
It has support for adding custom scripts that are run whenever you load a page (linked to which pages it should load on) and that can make changes to the page dynamically.
https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/
http://chrispederick.com/work/web-developer/ Web 开发人员工具栏将允许您将用户样式表添加到应该实现您的目标的网站。
The http://chrispederick.com/work/web-developer/ web developer toolbar will let you add a user style sheet to a site which should achieve your goals.
这可能是也可能不是您所要求的,但您可以下载扩展 FireDiff 以保存使用 FireBug 所做的更改。我在这里制作了一个关于如何执行此操作的小教程:https://www.youtube.com/watch ?v=m4OmZLX2zd4
This may or may not be exactly what you're asking for, but you can download the extension FireDiff in order to save changes made with FireBug. I made a little tutorial on how to do it here: https://www.youtube.com/watch?v=m4OmZLX2zd4
我有一个有点相似的用例,但我以不同的方式解决了这个问题。我不确定这是否是您正在寻找的。我将描述该行为,如果有帮助,我将准确解释我是如何实现它的。
我更改了单击“运行”(或 Ctrl+Enter)时执行的代码,以检查代码的第一行是否是硬编码字符串
//LoadFromFile:<文件路径>
。如果是,并且该文件存在,那么我将文件从本地文件系统中拉出并运行它,而不是在控制台窗口中执行代码。这样我就可以使用外部文本编辑器来编写代码。I have a somewhat simlar use-case that I solved differently. I'm not sure if it is what you are looking for or not. I'll describe the behavior and if that is helpful I'll explain exactly how I implemented it.
I changed the code that execute when you click "Run" (or Ctrl+Enter) to check to see if the first line of the code is a hard-coded string
//LoadFromFile:<file path>
. If it is, and the file exists then I pull the file off of the local file system and run it instead of executing the code in the console window. This way I can use an external text editor to write code.