Αναζήτηση στην υποστήριξη

Προσοχή στις απάτες! Δεν θα σας ζητήσουμε ποτέ να καλέσετε ή να στείλετε μήνυμα σε κάποιον αριθμό τηλεφώνου ή να μοιραστείτε προσωπικά δεδομένα. Αναφέρετε τυχόν ύποπτη δραστηριότητα μέσω της επιλογής «Αναφορά κατάχρησης».

Learn More

in my extension tabs.on("ready", ...) doesn't work after its installation, but works in debug mode (cfx run)

  • 3 απαντήσεις
  • 1 έχει αυτό το πρόβλημα
  • 5 προβολές
  • Τελευταία απάντηση από the-edmeister

more options

I had written an extension

var tabs = require("sdk/tabs"); var Request = require("sdk/request").Request;


tabs.on("ready", function(tab){

   var vk_oauth = "oauth.vk.com/blank.html";
   var vk_blind = "http://localhost:5000";
   var auth_complete = "/complete/vk-oauth2/";
   if (tab.url.indexOf(vk_oauth) > -1) {
       var code = tab.url.match(/code=(.+)&/)[1];
       var state = tab.url.match(/state=(.+)$/)[1];
       var auth_url = vk_blind + auth_complete + '?code=' + code + '&state=' + state;
       var auth_request = Request({
           url: auth_url,
           onComplete: function(response) {
               tab.url = vk_blind;   
           }
       });
       auth_request.get();
       tab.url = ;

   }

});

But it works only in debug mode: cfx run. after cfx xpi and installation no result

I had written an extension var tabs = require("sdk/tabs"); var Request = require("sdk/request").Request; tabs.on("ready", function(tab){ var vk_oauth = "oauth.vk.com/blank.html"; var vk_blind = "http://localhost:5000"; var auth_complete = "/complete/vk-oauth2/"; if (tab.url.indexOf(vk_oauth) > -1) { var code = tab.url.match(/code=(.+)&/)[1]; var state = tab.url.match(/state=(.+)$/)[1]; var auth_url = vk_blind + auth_complete + '?code=' + code + '&state=' + state; var auth_request = Request({ url: auth_url, onComplete: function(response) { tab.url = vk_blind; } }); auth_request.get(); tab.url = ''; } }); But it works only in debug mode: cfx run. after cfx xpi and installation no result

Όλες οι απαντήσεις (3)

more options

Could I suggest asking over here:

Extension Development • Mozilla Add-ons Forum

more options

There's also an Extension Development forum over here: \http://forums.mozillazine.org/viewforum.php?f=19