chromix-too
Advanced tools
Comparing version 0.0.14 to 0.0.15
#!/usr/bin/env node | ||
; | ||
var arg, args, chromix, commandArgs, commandName, filterTabs, fn, fn1, focusWindow, getMatchingTabs, getQueryFlags, i, j, len, len1, optimist, ref, url, utils, | ||
var arg, args, chromix, commandArgs, commandName, filterTabs, fn, fn1, focusWindow, getMatchingTabs, getQueryFlags, i, j, len, len1, optimist, ref, ref1, url, utils, | ||
slice = [].slice; | ||
@@ -143,3 +143,3 @@ | ||
break; | ||
case "select": | ||
case "reload": | ||
getMatchingTabs(commandArgs, function(tabs) { | ||
@@ -150,5 +150,3 @@ var i, len, results, tab; | ||
tab = tabs[i]; | ||
results.push(chromix("chrome.tabs.update", {}, tab.id, { | ||
selected: true | ||
})); | ||
results.push(chromix("chrome.tabs.reload", {}, tab.id, {})); | ||
} | ||
@@ -158,3 +156,4 @@ return results; | ||
break; | ||
case "reload": | ||
case "url": | ||
ref1 = commandArgs, url = ref1[0], commandArgs = 2 <= ref1.length ? slice.call(ref1, 1) : []; | ||
getMatchingTabs(commandArgs, function(tabs) { | ||
@@ -165,3 +164,5 @@ var i, len, results, tab; | ||
tab = tabs[i]; | ||
results.push(chromix("chrome.tabs.reload", {}, tab.id, {})); | ||
results.push(chromix("chrome.tabs.update", {}, tab.id, { | ||
url: url | ||
})); | ||
} | ||
@@ -257,10 +258,10 @@ return results; | ||
args = (function() { | ||
var k, len2, ref1, results; | ||
ref1 = commandArgs.slice(1); | ||
var k, len2, ref2, results; | ||
ref2 = commandArgs.slice(1); | ||
results = []; | ||
for (k = 0, len2 = ref1.length; k < len2; k++) { | ||
arg = ref1[k]; | ||
for (k = 0, len2 = ref2.length; k < len2; k++) { | ||
arg = ref2[k]; | ||
try { | ||
results.push(JSON.parse(arg)); | ||
} catch (_error) { | ||
} catch (error) { | ||
results.push(arg); | ||
@@ -267,0 +268,0 @@ } |
@@ -1,33 +0,29 @@ | ||
// Generated by CoffeeScript 1.9.3 | ||
(function() { | ||
var extend, root, | ||
hasProp = {}.hasOwnProperty, | ||
slice = [].slice; | ||
var extend, root, | ||
hasProp = {}.hasOwnProperty, | ||
slice = [].slice; | ||
root = typeof exports !== "undefined" && exports !== null ? exports : window; | ||
root = typeof exports !== "undefined" && exports !== null ? exports : window; | ||
extend = root.extend = function(hash1, hash2) { | ||
var key; | ||
for (key in hash2) { | ||
if (!hasProp.call(hash2, key)) continue; | ||
hash1[key] = hash2[key]; | ||
} | ||
return hash1; | ||
}; | ||
extend = root.extend = function(hash1, hash2) { | ||
var key; | ||
for (key in hash2) { | ||
if (!hasProp.call(hash2, key)) continue; | ||
hash1[key] = hash2[key]; | ||
} | ||
return hash1; | ||
}; | ||
extend(root, { | ||
config: { | ||
host: "localhost", | ||
port: "7442", | ||
timeout: 5000 | ||
}, | ||
makeIdempotent: function(func) { | ||
return function() { | ||
var args, base, previousFunc, ref; | ||
args = 1 <= arguments.length ? slice.call(arguments, 0) : []; | ||
return typeof (base = (ref = [func, null], previousFunc = ref[0], func = ref[1], ref))[0] === "function" ? base[0].apply(base, args) : void 0; | ||
}; | ||
} | ||
}); | ||
}).call(this); | ||
extend(root, { | ||
config: { | ||
host: "localhost", | ||
port: "7442", | ||
timeout: 5000 | ||
}, | ||
makeIdempotent: function(func) { | ||
return function() { | ||
var args, base, previousFunc, ref; | ||
args = 1 <= arguments.length ? slice.call(arguments, 0) : []; | ||
return typeof (base = (ref = [func, null], previousFunc = ref[0], func = ref[1], ref))[0] === "function" ? base[0].apply(base, args) : void 0; | ||
}; | ||
} | ||
}); |
{ | ||
"name": "chromix-too", | ||
"version": "0.0.14", | ||
"version": "0.0.15", | ||
"author": "Stephen Blott <smblott@gmail.com>", | ||
@@ -5,0 +5,0 @@ "description": "Command-line (or scripted) access to Chrome's APIs.", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
31978
2
511