File tree 3 files changed +5
-5
lines changed
3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 60
60
* @param {Object } message
61
61
*/
62
62
'do-script-injection' : function ( message ) {
63
- chrome . windows . getCurrent ( w => {
64
- chrome . tabs . query ( { active : true , windowId : w . id } , tabs => {
63
+ chrome . windows . getCurrent ( ) . then ( w => {
64
+ chrome . tabs . query ( { active : true , windowId : w . id } ) . then ( tabs => {
65
65
chrome . scripting . executeScript ( {
66
66
target : {
67
67
// inject the script only into the frame
Original file line number Diff line number Diff line change @@ -128,8 +128,8 @@ function _getPort () {
128
128
function _sendToAll ( message , callback ) {
129
129
var frameId = message . frameId ;
130
130
var options ;
131
- chrome . windows . getCurrent ( w => {
132
- chrome . tabs . query ( { active : true , windowId : w . id } , tabs => {
131
+ chrome . windows . getCurrent ( ) . then ( w => {
132
+ chrome . tabs . query ( { active : true , windowId : w . id } ) . then ( tabs => {
133
133
// options.frameId allows to send the message to
134
134
// a specific frame instead of all frames in the tab
135
135
if ( frameId !== undefined ) {
Original file line number Diff line number Diff line change 2
2
3
3
var utils = require ( '../modules/utils/utils.js' ) ;
4
4
5
- window . chrome . tabs . query ( { active : true , currentWindow : true } , function ( tabs ) {
5
+ window . chrome . tabs . query ( { active : true , currentWindow : true } ) . then ( function ( tabs ) {
6
6
// Create a port with background page for continuous message communication
7
7
var port = utils . getPort ( ) ;
8
8
You can’t perform that action at this time.
0 commit comments