Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "PasswordMaker",
"version": "0.2.3",
"version": "0.2.4",
"description": "Generates a unique password for every site from a single master password.",
"browser_action": {
"default_icon": "icon16.png",
Expand Down
32 changes: 29 additions & 3 deletions passwordmaker-custom.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright (c) 2009 Matt Perry. All rights reserved.
// 2013 Chris Juelg: minor user experience changes
// Use of this source code is governed by the LGPL that can be found in the
// LICENSE file.

Expand Down Expand Up @@ -30,9 +31,7 @@ function saveSettings() {
chrome.storage.sync.set(storage);
}

function initCustom() {
init();

function insertTabURL() {
// Get the site's URL and fill in the input field.
chrome.tabs.query({active: true, currentWindow: true}, function(tabs) {
if (tabs && tabs[0]) {
Expand All @@ -41,8 +40,30 @@ function initCustom() {
populateURL();
}
});
}

// wrap loadProfile() and insertTabURL if none given in profile
var alias_loadProfile = loadProfile;

var loadProfile = function loadProfile() {
alias_loadProfile();

// don't insert if isOptions or defined in profile
var isOptions = location.search.indexOf("options=true") >= 0;
if (!isOptions && (preUrl.value == undefined || preUrl.value == "")) insertTabURL();
}

function initCustom() {
init();

chrome.tabs.query({active: true, currentWindow: true}, function(tabs) {
if (tabs && tabs[0]) {
window.contentTab = tabs[0];
}
});

var isOptions = location.search.indexOf("options=true") >= 0;
if (!isOptions) insertTabURL();

var elemTable = document.getElementsByTagName('table')[0];
elemTable = elemTable.getElementsByTagName('tbody')[0];
Expand Down Expand Up @@ -185,6 +206,11 @@ function showOptions() {
for (var i = 0; i < options.length; ++i) {
options[i].style.display = 'table-row';
}

var activateEdits = document.getElementsByClassName("activateEdit");
for (var i = 0; i < activateEdits.length; ++i) {
activateEdits[i].style.display = 'inline';
}
}

// Regenerates the password and verifier code.
Expand Down
Binary file modified passwordmaker.crx
Binary file not shown.
3 changes: 3 additions & 0 deletions passwordmaker.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@
option.activateEdit {
font-style : italic;
color : #800;

/* display set again in showOptions() */
display: none;
}
</style>

Expand Down
4 changes: 2 additions & 2 deletions passwordmaker.js
Original file line number Diff line number Diff line change
Expand Up @@ -649,8 +649,8 @@ function init() {
preGeneratePassword();
}
populateURL(); // in case passwdUrl.value is using document.location instead of cookie value, this calculates the correct URL
passwdMaster.focus();
initDone = true;
passwdMaster.focus();
initDone = true;
}

// Loads a certain profile.
Expand Down
2 changes: 1 addition & 1 deletion profileList.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
profileLB = new Bs_Dropdown();
profileLB.imgDir = 'scripts/blueShoes/components/dropdown/img/win2k/';
profileLB.imgDir = 'scripts/blueShoes/components/dropdown/img/win2k/';
profileLB.setValue('Default');
profileLB.drawInto('profileLB');
profileLB.attachEvent('onChange', loadProfile);
Expand Down