Permalink
Browse files

Codacy fixes

  • Loading branch information...
1 parent 46d34a4 commit e7c0c049d92cc57ed430bfeefc62dbaf43f55bd8 @spolu spolu committed Dec 2, 2014
Showing with 26 additions and 13 deletions.
  1. +8 −10 lib/api.menu.js
  2. +15 −0 lib/api.session.js
  3. +1 −1 test/menu_multiple_windows.js
  4. +1 −1 test/menu_popup.js
  5. +1 −1 test/menu_set_application_menu.js
View
@@ -12,8 +12,6 @@
var common = require('./common.js');
-var os = require('os');
-
// ## menu
//
// API `menu` object reprensetation.
@@ -33,16 +31,16 @@ var menu = function(spec, my) {
var popup; /* popup(window, cb_); */
var set_application_menu; /* set_application_menu(cb_); */
- var add_item; /* add_item(command_id, label, cb_); */
- var add_check_item; /* add_check_item(command_id, label, cb_); */
- var add_radio_item; /* add_radio_item(command_id, label, group_id, cb_); */
- var add_separator; /* add_separator(cb_); */
+ var add_item; /* add_item(command_id, label, cb_); */
+ var add_check_item; /* add_check_item(command_id, label, cb_); */
+ var add_radio_item; /* add_radio_item(command_id, label, group_id, cb_); */
+ var add_separator; /* add_separator(cb_); */
- var set_checked; /* set_checked(command_id, value); */
- var set_enabled; /* set_enabled(command_id, value); */
- var set_visible; /* set_visible(command_id, value); */
+ var set_checked; /* set_checked(command_id, value); */
+ var set_enabled; /* set_enabled(command_id, value); */
+ var set_visible; /* set_visible(command_id, value); */
- var add_submenu; /* add_submenu(command_id, label, menu, cb_); */
+ var add_submenu; /* add_submenu(command_id, label, menu, cb_); */
//
// #### _private_
View
@@ -162,6 +162,19 @@ var session = function(spec, my) {
that.call('proxy_clear', {}, cb_);
};
+ // ### is_off_the_record
+ //
+ // Returns wether this session is off the record or not
+ //
+ // ```
+ // @cb_ {function(err, is_off_the_record)}
+ // ```
+ is_off_the_record = function(cb_) {
+ that.call('is_off_the_record', {}, function(err, res) {
+ return cb_(err, res ? res.off_the_record : null);
+ });
+ };
+
common.method(that, 'invoke_cookies_load', invoke_cookies_load, _super);
common.method(that, 'invoke_cookies_load_for_key', invoke_cookies_load_for_key, _super);
@@ -172,6 +185,8 @@ var session = function(spec, my) {
common.method(that, 'proxy_set', proxy_set, _super);
common.method(that, 'proxy_clear', proxy_clear, _super);
+ common.method(that, 'is_off_the_record', is_off_the_record, _super);
+
return that;
}
@@ -1,12 +1,12 @@
var common = require('../lib/common.js');
var async = require('async');
-var os = require('os');
var _api = null;
var _window_1 = null;
var _window_2 = null;
var _menu = null;
+var _file = null;
async.series([
function(cb_) {
View
@@ -1,11 +1,11 @@
var common = require('../lib/common.js');
var async = require('async');
-var os = require('os');
var _api = null;
var _window = null;
var _menu = null;
+var _file = null;
async.series([
function(cb_) {
@@ -1,11 +1,11 @@
var common = require('../lib/common.js');
var async = require('async');
-var os = require('os');
var _api = null;
var _window = null;
var _menu = null;
+var _file = null;
async.series([
function(cb_) {

0 comments on commit e7c0c04

Please sign in to comment.