是否有浏览器插件(适用于 Firefox 或 Chrome)可以轻松地让我打开脚本文件的非缩小版本?
例如,生产网站将加载 script.min.js,但通常 script.js 也可以在同一目录中使用。
也是如此
对于某些 css 文件(style.min.css 或 style.css) ,.min 。符号似乎被使用了很多,
我并不是在寻找漂亮的打印机,就像这个问题一样:
是否有一个插件可以让我自动取消网站上包含的 Javascript?
但是对于会自动发现正确的未缩小文件的东西(其中包括评论等)
无法通过谷歌找到任何内容,但也许我错过了一个?
Is there a browser add-on (for firefox or chrome) that would easily let me open a non minified version of a script file?
eg, a production website would load script.min.js, but usually the script.js would also be available in the same directory.
same goes for some css files (style.min.css or style.css)
the .min. notation seems to be used quite a bit
I'm not looking for a pretty-printer, like in this question:
Is there a plugin that allows me to automatically unminify the Javascript included on a site?
but for something that would automatically discover the correct unminified file (which would include comments etc)
Couldnt find any through google, but perhaps I missed one?
发布评论
评论(3)
这是一个 书签
要激活,请将以上内容保存在带有 html 扩展名的文件中,将页面加载到浏览器并将链接拖动到链接栏
或者将 href 复制到现有书签中并重命名。
Here is a bookmarklet
To activate, save the above in a file with html extension, load the page into the browser and drag the link to the link bar
Alternatively copy the href into an existing bookmark and rename it.
有时,恢复“未缩小”的文件并不简单,如果您连接 Javascript 和 CSS 文件进行生产,就会发生这种情况。
您可以做的就是拥有一个包含原始文件的文件夹和另一个通过脚本构建的生产文件夹。这样切换模式只需将 URL 中的
/dev/
更改为/dist/
即可Sometimes recovering an "unminified" file is not straightfoward, as can happen if you concatenate Javascript and CSS files for production.
Something you can do is have a folder containing the original files and another production folder that is build via a script. This way switching modes is just a matter of changing from
/dev/
to/dist/
in the URLYAML Debug 是一个书签,它将显示页面的所有样式表并允许您激活/停用每一项(在“样式表”选项卡中)。
您可以将其与备用样式表结合使用,即用作样式切换器的样式表(如 (1) 中所示)
(1) http://tantek.com/CSS/Examples/codeisfreespeech.html
转到页面,然后在 Fx/IE/Opera 或 Safari 和 Chrome 中,按 Alt 键打开旧的普通菜单,选择“显示菜单/页面样式”,最后选择“无样式选项”或“当前样式”或您添加的任何替代样式。
相当老派,但仍然有用:)
YAML Debug is a bookmarklet that will display all the stylesheets of a page and allow you to activate/deactivate each one (in the Stylesheets tab).
You can combine it with alternate stylesheets, the one used as styleswitchers (as in (1))
(1) http://tantek.com/CSS/Examples/codeisfreespeech.html
Go to the page and then in Fx/IE/Opera maybe Safari and Chrome, press Alt key to open the old plain menu, choose Display menu / Page style and finally no style option or current style or any alternate style you added.
Quite old school but still useful :)