// ==UserScript==
// @name DD-WRT PIA VPN Server List
//@namespace https://www.greasyfork.org/en/scripts/372887-dd-wrt-pia-vpn-server-list
// @author ScottAllyn
//
// @description Replaces DD-WRT's Services->VPN->Server IP/Name textbox with a drop-down list of current PIA servers
//
// @include http://192.168.1.1/*
// @include https://192.168.1.1/*
//
// @version 0.7.6
// @namespace https://greasyfork.org/users/xxxxxxxxx
// @downloadURL none
// ==/UserScript==
// List up to date as of 05-Oct-2018
// Edit the two @include lines above to match the address of your DD-WRT installation.
(function() {
'use strict';
var serverTextBox = document.getElementsByName("openvpncl_remoteip")[0];
var serverDropDown = document.createElement('select');
serverDropDown.setAttribute("name", "openvpncl_remoteip");
serverDropDown.innerHTML =
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n' +
'\n';
serverDropDown.value = serverTextBox.value;
serverTextBox.parentNode.replaceChild(serverDropDown, serverTextBox);
})();