In my greasemonkey script I want to check if the GM Value : Username and Password isset but when i try the following code it gives me back the error :
TypeError: GM_getValue(...) is undefined
...f (GM_getValue ("username").length == 0 + GM_getValue ("password").length == 0 )
Code:
if (GM_getValue ("username").length == 0 + GM_getValue ("password").length == 0 ){
var username = $('input[name=username]');
var password = $('input[name=password]');
//Username en Password in Firefox zetten met GM_setValue
$(".button").click(function(){
GM_setValue ("username", username.val() );
GM_setValue ("password", password.val() );
});
}