设置 Mac 版 Chrome 默认使用内置的 Flash 插件

来源:百度文库 编辑:神马文学网 时间:2024/06/28 09:19:46

众所周知,从 Chrome 5.0.360.4 开始就正式在浏览器中集成了 Flash Player 插件,但目前使用内置的 Flash Player 插件还需要添加 --enable-internal-flash 启动参数。相信在 Windows 平台上大家添加启动参数已经很熟练了,但在 Mac 平台上怎么弄呢?其实不难,你只需要在终端执行如下语句:

$ cd "/Applications/Google Chrome.app/Contents/MacOS/"
$ sudo mv "Google Chrome" Google.real
$ sudo printf '#!/bin/bash\ncd "/Applications/Google Chrome.app/Contents/MacOS"\n"/Applications/Google Chrome.app/Contents/MacOS/Google.real" --enable-internal-flash "$@"\n' > Google\ Chrome
$ sudo chmod u+x "Google Chrome"

注意,其中的$是提示符,不需要输入。

经过上述操作之后,直接运行应用程序中的 Chrome内置的 Flash Player 插件了,记得进入 Chrome://plugins 将你已经安装的 Flash Player 插件禁用。当然,你还可以通过这个方法为 Chrome 加入更多的命令行启动参数。