FelisCatus / switchysharp

Automatically exported from code.google.com/p/switchysharp
GNU General Public License v3.0
140 stars 50 forks source link

那个批量添加情景模式的代码该怎么修改 #1020

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
(function(Settings){var p = Settings.getObject('profiles'); var t = 
p['template']; window.prompt().split(';').forEach(function(proxy) { 
p[proxy]=jQuery.extend({}, t, {id:proxy,name:proxy,proxyHttp:proxy}); }); 
Settings.setObject('profiles', p); history.go(0) 
})(chrome.extension.getBackgroundPage().Settings)

我在控制台运行了,发现输入进去的  127.0.0.1:1234;127.0.0.1:5678 
 2个ip可以批量添加到情景模式
可是每个情景模式的名字确实 
“ip地址”。我要复制进去的ip如果是:
127.0.0.1:1234 重庆;127.0.0.1:5678 北京,又怎么弄?我就是想 
把我复制进去ip的名字地区当每个情景模式的名字,该怎么修
改上面那段代码

Original issue reported on code.google.com by ilikaxi on 1 Oct 2014 at 4:04

Attachments:

GoogleCodeExporter commented 9 years ago
一个问题一个 Issue ,谢谢。请移步 Issue 1019.

Original comment by shyc2...@gmail.com on 1 Oct 2014 at 5:06