找回密码
 立即注册
查看: 5933|回复: 55

[学术/精华文章] 永久开启Mac上chrome跨域问题

[复制链接]
发表于 2017-3-2 18:15 | 显示全部楼层 |阅读模式

方法一

open -a "Google Chrome" --args --disable-web-security

方法二(永久方法)


1.打开 Terminal 进入终端状态,默认的提示符应该是 $;

2.进入 Chrome.app 目录;


$ cd "/Applications/Google Chrome.app/Contents/MacOS/"


3.将原先的启动脚本改个名字;


$ sudo mv "Google Chrome" Google.real


4.使用管道操作创建新的启动脚本,注意其中加入你所需要的启动参数,这里的例子是启用内置的 Flash;



sudo printf '#!/bin/bash\ncd "/Applications/Google Chrome.app/Contents/MacOS"\n"/Applications/Google Chrome.app/Contents/MacOS/Google.real" --disable-web-security "$@"\n' > Google\ Chrome


5.给新的脚本加上运行权限; 


$ sudo chmod u+x "Google Chrome"


发表于 2017-4-11 18:52 | 显示全部楼层
很不错
发表于 2017-4-11 19:10 | 显示全部楼层
楼主是超人
发表于 2017-4-11 18:35 | 显示全部楼层
好帖就是要顶
发表于 2017-4-11 18:16 | 显示全部楼层
顶顶多好
发表于 2017-4-11 18:46 | 显示全部楼层
很好哦
发表于 2017-4-21 10:03 | 显示全部楼层
楼主是超人
发表于 2017-4-21 10:55 | 显示全部楼层
好帖就是要顶
发表于 2017-4-21 10:17 | 显示全部楼层
真心顶
发表于 2017-4-21 10:05 | 显示全部楼层
很好哦
懒得打字嘛,点击右侧快捷回复 【右侧内容,后台自定义】
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Unity开发者联盟 ( 粤ICP备20003399号 )

GMT+8, 2024-5-1 02:59 , Processed in 0.239940 second(s), 29 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表