PageSourceSearch

https://www.fotojet.com/modules/mod_fotojet_upgrade/js/payment.js?v=1696924675

js fotojet.com collected 2026-10-01 10:44:18 UTC 5,689 bytes, 227 lines download raw bytes

1function completeSubscriptionClick(flag) {
2    setSubscribed(true);
3    var swfRef = document.FotoJet || window.FotoJet;
4    if (swfRef && swfRef.updateUserState) {
5        swfRef.updateUserState("{'result':true}");
6    }
7    else if (typeof updateState == 'function') {
8        updateState(1);
9    }
10
11    closeSubscriptionPanel();
12    showModal('completed');
13
14    if (flag == 0) {
15        gaPage('/subscribe/success_card.html');
16    }
17    else {
18        gaPage('/subscribe/success_paypal.html');
19    }
20
21    setTimeout(() => {
22        try {
23            let source_data = window.localStorage.getItem('source_data');
24            window.localStorage.removeItem('source_data');
25            if(source_data)
26            {
27                source_data = JSON.parse(source_data);
28                if(source_data.source)
29                {
30                    let post_data = {
31                        transaction_id: window.fjuser.info.userid,
32                        amount: window.userInfo.subType == "Year" ? 39.99 : 6.99,
33                        source: source_data.source,
34                        other: {
35                            click_id: source_data.click_id
36                        }
37                    }
38                    if (window.csrf_token) {
39                        post_data[window.csrf_token] = 1;
40                    }
41                    jQuery.ajax({
42                        type: "POST",
43                        url: "/statistics/conversion",
44                        data: post_data,
45                        success: function (response) {
46                        },
47                        error: function (error) {
48                        }
49                    });
50                }
51            }
52        } catch (e) {
53        }
54    }, 100);
55
56    if (tmpCategory) {
57        gaEvent('Subscribe from', intoType, tmpCategory);
58    }
59    else {
60        if (flag == 0)
61            gaEvent('Subscribe from', intoType, '');
62        else
63            gaEvent('Subscribe from', intoType, '');
64    }
65}
66
67function completeSubscriptionClosed() {
68    closeModal('completed');
69
70    if (jQuery('#profile-div').length > 0) {
71        window.location.reload();
72    }
73}
74
75function failSubscription(flag, error) {
76    setSubscribed(false);
77
78    if (flag == 0) {
79        if (error)
80            jQuery('#cc-error-tip').html(error);
81        else
82            jQuery('#cc-error-tip').html(cc_error);
83        jQuery('#cc-error-tip').show();
84
85        gaPage('/subscribe/fail_card.html');
86    }
87    else {
88        jQuery('#pp-erroe-tip').show();
89
90        gaPage('/subscribe/fail_paypal.html');
91    }
92}
93
94function cancelSubscribe() {
95    setSubscribed(false);
96    gaPage('/subscribe/cancel.html');
97}
98
99function paypalButtonClick() {
100    try {
101        gaPage('/subscribe/checkoutwithpaypal.html');
102    }
103    catch (err) {
104    }
105}
106
107function closeSubscriptionClick() {
108    closeSubscriptionPanel();
109
110    if(localStorage.leaveShown != "true")
111    {
112        localStorage.leaveShown = true;
113        showModal('leave');
114    }
115}
116
117function closeSubscriptionPanel() {
118
119    closeModal("subscription");
120
121    jQuery("#cc-name").css({
122        "border-color": '#e8ecee'
123    });
124    jQuery("#cc-number").css({
125        "border-color": '#e8ecee'
126    });
127    jQuery("#cc-exp").css({
128        "border-color": '#e8ecee'
129    });
130    jQuery("#cc-cvc").css({
131        "border-left": 'none',
132        "border-color": '#e8ecee'
133    });
134    jQuery("#cc-name").val("");
135    jQuery("#cc-number").val("");
136    jQuery("#cc-exp").val("");
137    jQuery("#cc-cvc").val("");
138    jQuery('#cc-name-tip').hide();
139    jQuery('#cc-number-tip').hide();
140    jQuery('#cc-error-tip').hide();
141    jQuery('#pp-error-tip').hide();
142
143    if (!couponCode) {
144        jQuery(".fotojet-plan__coupon>p").html("");
145    }
146    stripeEnd();
147}
148
149function securityReason() {
150    closeModal('leave');
151    showModal('secure');
152    gaEvent('Giveup payment', 'security', '');
153}
154
155function trialReason() {
156    closeModal('leave');
157    showModal('trial');
158    gaEvent('Giveup payment', 'trial', '');
159}
160
161function paymentReason() {
162    closeModal('leave');
163    gaEvent('Giveup payment', 'one-time payment', '');
164}
165
166function expensiveReason() {
167    closeModal('leave');
168    gaEvent('Giveup payment', 'too expensive', '');
169}
170
171function lifetimeReason() {
172    closeModal('leave');
173    var isMac = (navigator.platform == "Mac68K") || (navigator.platform == "MacPPC") || (navigator.platform == "Macintosh") || (navigator.platform == "MacIntel");
174
175    var url = "https://www.fotojet.com/windows/";
176    var os = "Win";
177
178    if(isMac)
179    {
180        url = "https://www.fotojet.com/mac/";
181        os = "Mac"
182    }
183    jQuery("#desktopURL").attr("href", url);
184    document.getElementById("desktopURL").click();
185
186    gaEvent('Giveup payment', 'lifetime desktop version', os);
187}
188
189function secureContinue() {
190    closeModal('secure');
191    gaPage('/subscribe/security.html');
192    updateGroup();
193}
194
195function trialContinue() {
196    closeModal('trial');
197    gaPage('/subscribe/trial.html');
198    updateGroup();
199}
200
201function keySubscribe(e) {
202    e = e ? e : window.event;
203    if (e.keyCode == 13) //回车键的键值为13
204    {
205        jQuery("#cc_submit").click();
206    }
207}
208
209function stripeEnd() {
210    jQuery("#cc_progress").hide();
211    jQuery("#cc_submit").removeClass('processing-btn');
212    jQuery("#cc_submit").html(buy_now);
213
214    var $form = jQuery('#payment-form');
215    $form.find('#cc_submit').prop('disabled', false);
216
217    window.isPaying = false;
218}
219
220function stripeBegin() {
221    jQuery("#cc_progress").show();
222    jQuery("#cc_submit").addClass('processing-btn');
223    jQuery("#cc_submit").html('');
224
225    var $form = jQuery('#payment-form');
226    $form.find('#cc_submit').prop('disabled', true);
227}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.