Last active
May 23, 2018 06:11
-
-
Save Itach1Uchixa/c7f703ae631a4802cbacb230a4f32f39 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Batch IP addresses inputter to kerio control ip address groups | |
* Input IP addresses must be splitted with character to match \s regex pattern | |
* | |
* @author Javlonbek Kakhramonov <kakjavlon@gmail.com> | |
*/ | |
(function (selector) { | |
var ips = prompt(); | |
var ipAdresses = ips.split(/\s/); | |
var addBtn = selector('#addressGroupList_k_bottomToolbar_k_btnAdd button'); | |
for (var index = 0; index<ipAdresses.length; index++) { | |
addBtn.click(); | |
var addressInput = selector('#ipAddressGroupAdd_k_form_k_hostName'); | |
var insertButton = selector('#ipAddressGroupAdd_k_tb button'); | |
addressInput.value = ipAdresses[index]; | |
insertButton.click(); | |
} | |
})($); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment