pixflow-upgrade-planning 1.2.3 → 1.2.5
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.
- package/index.js +4 -8
- package/package.json +1 -1
- package/template.html +0 -1
package/index.js
CHANGED
|
@@ -57,10 +57,6 @@ class PixflowUpgradePlanning extends HTMLElement {
|
|
|
57
57
|
}
|
|
58
58
|
})
|
|
59
59
|
}
|
|
60
|
-
|
|
61
|
-
if(cep_manifest.get_extension_id() != "net.pixflow.voiceai" && localStorage.getItem("unlock") == "0"){
|
|
62
|
-
this.querySelector("div.activate-code").classList.add("active");
|
|
63
|
-
}
|
|
64
60
|
|
|
65
61
|
}
|
|
66
62
|
|
|
@@ -82,9 +78,12 @@ class PixflowUpgradePlanning extends HTMLElement {
|
|
|
82
78
|
}
|
|
83
79
|
|
|
84
80
|
get_product_price_detail(){
|
|
81
|
+
const self = this;
|
|
85
82
|
if(cep_manifest.get_extension_id() == "net.pixflow.voiceai")
|
|
86
83
|
return;
|
|
87
|
-
|
|
84
|
+
self.querySelector("div.pixflow div.activate-code-block button").addEventListener("click", function(){
|
|
85
|
+
window.cep.util.openURLInDefaultBrowser(JSON.parse(localStorage.getItem("init-data")).userData.upgrade_subscription_url);
|
|
86
|
+
})
|
|
88
87
|
const xhr = new XMLHttpRequest();
|
|
89
88
|
xhr.open("GET", `https://pixflow.net/wp-json/pixflow/get_product_price_detail?product-id=${cep_manifest.get_post_id()}&token=${token()}`);
|
|
90
89
|
xhr.addEventListener("load", function(){
|
|
@@ -110,9 +109,6 @@ class PixflowUpgradePlanning extends HTMLElement {
|
|
|
110
109
|
el_plan.setAttribute("data-url", url);
|
|
111
110
|
el_plan.querySelector("div > p").textContent = plan;
|
|
112
111
|
}
|
|
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
112
|
self.querySelectorAll("div.plan > div > div").forEach(function(element){
|
|
117
113
|
element.addEventListener("click", function(){
|
|
118
114
|
try {
|
package/package.json
CHANGED
package/template.html
CHANGED