Commit 17819700 authored by Nate Fox's avatar Nate Fox
Browse files

fixed small bug, enabled blank users ability

parent 149bc1de
......@@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "AWS SSH RDP Links",
"description": "Adds SSH and RDP links to the AWS Console",
"version": "0.1.0",
"version": "0.1.1",
"content_scripts": [
{
"matches": [
......
......@@ -18,7 +18,6 @@ document.addEventListener('DOMContentLoaded', function() {
function get_storage() {
chrome.storage.sync.get(default_data, function(items){
saved_data = items
// go();
window.setTimeout(function(){
go();
}, 400);
......@@ -50,7 +49,7 @@ function add_to_field(fld) {
field_text = (fld.text().indexOf(':') > -1)
// grab last item via reverse->first item
? fld.text().split(" ").reverse()[0]
: fld.text()
: fld.text().split(" ")[0]
if (field_text.indexOf("-") == 0 || field_text.trim().length == 0)
return
......@@ -99,11 +98,19 @@ function get_ssh_user() {
if (saved_data['always_override_user'])
user = default_user
return user + "@"
if (user.length)
return user + "@"
else
return ""
}
function get_windows_user() {
return saved_data['rdp_user'] + "@"
user = saved_data['rdp_user']
if (user.length)
return user + "@"
else
return ""
}
function get_selector(row,div) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment