Hilfe durchsuchen

Vorsicht vor Support-Betrug: Wir fordern Sie niemals auf, eine Telefonnummer anzurufen, eine SMS an eine Telefonnummer zu senden oder persönliche Daten preiszugeben. Bitte melden Sie verdächtige Aktivitäten über die Funktion „Missbrauch melden“.

Weitere Informationen

Firefox addon how to remove the persisted data on open tab

  • 1 Antwort
  • 1 hat dieses Problem
  • 1 Aufruf
  • Letzte Antwort von philipp

more options

I and sending a request using tab Like this

var pageUrl = "sitedetails.html";
           
      tabs.on("ready", function(tab) 
      {       
       var worker = tab.attach({
        contentScriptFile: [self.data.url("jquery.min.js"),self.data.url("CallsClasses.js"),self.data.url("aes.js"),self.data.url("crypt/sha1.js"),self.data.url("crypt/pbkdf2.js"),self.data.url("sitedetails.js"),self.data.url("commonclasees.js")]
       });
       
       worker.port.emit('send_user_domain',userid,userdevicetoken,urlid,registersites,registerusers);
       worker.port.on('action',function(resp)
       {
        switch(resp.action)
        {
         case "update_domain":
          console.log("updated Domain Request"+JSON.stringify(resp.data));
          update_items("registered_sites","localtime_registered_sites",resp.data,resp.urlid,resp.user_id);
         break;
         case "registered_users":
          console.log("registered_users Domain Request"+JSON.stringify(resp.data));
          addItem("registered_users",resp.data);
         break;
         case "delete_domain":
          console.log("Deleted Domain Request"+JSON.stringify(resp.urlid));
          delete_items("registered_sites","localtime_registered_sites",resp.urlid,resp.user_id);
         break;
         case "update_user":
          console.log("updated update_user Request "+JSON.stringify(resp.data));
          update_items("registered_users","localtime_registered_users",resp.detailid,resp.user_id);
         break;
         case "delete_user":
          console.log("deleted delete_user Request "+JSON.stringify(resp.detailid));
          delete_items("registered_users","localtime_registered_users",resp.detailid,resp.user_id);
         break;
        }
        
       });
      });
      tabs.open(pageUrl); 

first time It shows Correct result. but on second time it goes for 2 requests . First is new one and second is old. As We open multiple tabs with same request. It goes for multiple request. What I want is to, whenever I open a new tab my old tab request should not be followed with new one

I and sending a request using tab Like this <pre><nowiki>var pageUrl = "sitedetails.html"; tabs.on("ready", function(tab) { var worker = tab.attach({ contentScriptFile: [self.data.url("jquery.min.js"),self.data.url("CallsClasses.js"),self.data.url("aes.js"),self.data.url("crypt/sha1.js"),self.data.url("crypt/pbkdf2.js"),self.data.url("sitedetails.js"),self.data.url("commonclasees.js")] }); worker.port.emit('send_user_domain',userid,userdevicetoken,urlid,registersites,registerusers); worker.port.on('action',function(resp) { switch(resp.action) { case "update_domain": console.log("updated Domain Request"+JSON.stringify(resp.data)); update_items("registered_sites","localtime_registered_sites",resp.data,resp.urlid,resp.user_id); break; case "registered_users": console.log("registered_users Domain Request"+JSON.stringify(resp.data)); addItem("registered_users",resp.data); break; case "delete_domain": console.log("Deleted Domain Request"+JSON.stringify(resp.urlid)); delete_items("registered_sites","localtime_registered_sites",resp.urlid,resp.user_id); break; case "update_user": console.log("updated update_user Request "+JSON.stringify(resp.data)); update_items("registered_users","localtime_registered_users",resp.detailid,resp.user_id); break; case "delete_user": console.log("deleted delete_user Request "+JSON.stringify(resp.detailid)); delete_items("registered_users","localtime_registered_users",resp.detailid,resp.user_id); break; } }); }); tabs.open(pageUrl); </nowiki></pre> first time It shows Correct result. but on second time it goes for 2 requests . First is new one and second is old. As We open multiple tabs with same request. It goes for multiple request. What I want is to, whenever I open a new tab my old tab request should not be followed with new one

Geändert am von cor-el

Alle Antworten (1)

more options

hi sanjeet_singh, support.mozilla.org is intended for end-user support. please put your question to the mozilla addon forums where you will probably get better answers to all issues regrading extension development: https://discourse.mozilla-community.org/c/add-ons

Where to go for developer support