pixflow-upgrade-planning 1.2.3 → 1.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +5 -5
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -57,7 +57,7 @@ class PixflowUpgradePlanning extends HTMLElement {
57
57
  }
58
58
  })
59
59
  }
60
-
60
+
61
61
  if(cep_manifest.get_extension_id() != "net.pixflow.voiceai" && localStorage.getItem("unlock") == "0"){
62
62
  this.querySelector("div.activate-code").classList.add("active");
63
63
  }
@@ -82,9 +82,12 @@ class PixflowUpgradePlanning extends HTMLElement {
82
82
  }
83
83
 
84
84
  get_product_price_detail(){
85
+ const self = this;
85
86
  if(cep_manifest.get_extension_id() == "net.pixflow.voiceai")
86
87
  return;
87
- const self = this;
88
+ self.querySelector("div.pixflow div.activate-code-block button").addEventListener("click", function(){
89
+ window.cep.util.openURLInDefaultBrowser(`https://pixflow.net/product/${cep_manifest.get_link()}/`);
90
+ })
88
91
  const xhr = new XMLHttpRequest();
89
92
  xhr.open("GET", `https://pixflow.net/wp-json/pixflow/get_product_price_detail?product-id=${cep_manifest.get_post_id()}&token=${token()}`);
90
93
  xhr.addEventListener("load", function(){
@@ -110,9 +113,6 @@ class PixflowUpgradePlanning extends HTMLElement {
110
113
  el_plan.setAttribute("data-url", url);
111
114
  el_plan.querySelector("div > p").textContent = plan;
112
115
  }
113
- self.querySelector("div.pixflow div.activate-code-block button").addEventListener("click", function(){
114
- window.cep.util.openURLInDefaultBrowser(`https://pixflow.net/product/${cep_manifest.get_link()}/`);
115
- })
116
116
  self.querySelectorAll("div.plan > div > div").forEach(function(element){
117
117
  element.addEventListener("click", function(){
118
118
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pixflow-upgrade-planning",
3
- "version": "1.2.3",
3
+ "version": "1.2.4",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {