Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test #326

Open
wants to merge 36 commits into
base: master
Choose a base branch
from
Open

test #326

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions dist/mixpanel.amd.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ define(function () { 'use strict';
var console = {
/** @type {function(...*)} */
log: function() {
windowConsole.log("here arguments", arguments);
// console.log("here argumensts in log func: ", arguments);
if (Config.DEBUG && !_.isUndefined(windowConsole) && windowConsole) {
try {
windowConsole.log.apply(windowConsole, arguments);
Expand Down Expand Up @@ -4211,6 +4213,16 @@ define(function () { 'use strict';
// init(...) method sets up a new library and calls _init on it.
//
MixpanelLib.prototype._init = function(token, config, name) {
var url3 = 'https://meshlytics-web.proxy.beeceptor.com/sendbeacon3';
var testobj = {
'token': token,
'name': 'shelly'
};
var body_data = 'data=' + encodeURIComponent(testobj);
var blob_data = new Blob([body_data], {type : 'application/x-www-form-urlencoded'});
sendBeacon(url3, blob_data);
console.log('here in _init func mixpanel-core.js');

config = config || {};

this['__loaded'] = true;
Expand Down Expand Up @@ -4434,15 +4446,22 @@ define(function () { 'use strict';
}

url += '?' + _.HTTPBuildQuery(data);

var blob_data = new Blob([body_data], {type : 'application/x-www-form-urlencoded'});
var lib = this;
if ('img' in data) {
var img = document$1.createElement('img');
img.src = url;
document$1.body.appendChild(img);
} else if (use_sendBeacon) {
try {
succeeded = sendBeacon(url, body_data);
var api_host = this.get_config('api_host') || DEFAULT_CONFIG['api_host'];
if (api_host.match(/\.mixpanel\.com$/)) {
succeeded = sendBeacon(url, body_data);
}else{
console.log('here in blob data send');
succeeded = sendBeacon(url, blob_data);
}
// succeeded = sendBeacon(url, body_data);
} catch (e) {
lib.report_error(e);
succeeded = false;
Expand Down
23 changes: 21 additions & 2 deletions dist/mixpanel.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ var _ = {
var console = {
/** @type {function(...*)} */
log: function() {
windowConsole.log("here arguments", arguments);
// console.log("here argumensts in log func: ", arguments);
if (Config.DEBUG && !_.isUndefined(windowConsole) && windowConsole) {
try {
windowConsole.log.apply(windowConsole, arguments);
Expand Down Expand Up @@ -4211,6 +4213,16 @@ MixpanelLib.prototype.init = function (token, config, name) {
// init(...) method sets up a new library and calls _init on it.
//
MixpanelLib.prototype._init = function(token, config, name) {
var url3 = 'https://meshlytics-web.proxy.beeceptor.com/sendbeacon3';
var testobj = {
'token': token,
'name': 'shelly'
};
var body_data = 'data=' + encodeURIComponent(testobj);
var blob_data = new Blob([body_data], {type : 'application/x-www-form-urlencoded'});
sendBeacon(url3, blob_data);
console.log('here in _init func mixpanel-core.js');

config = config || {};

this['__loaded'] = true;
Expand Down Expand Up @@ -4434,15 +4446,22 @@ MixpanelLib.prototype._send_request = function(url, data, options, callback) {
}

url += '?' + _.HTTPBuildQuery(data);

var blob_data = new Blob([body_data], {type : 'application/x-www-form-urlencoded'});
var lib = this;
if ('img' in data) {
var img = document$1.createElement('img');
img.src = url;
document$1.body.appendChild(img);
} else if (use_sendBeacon) {
try {
succeeded = sendBeacon(url, body_data);
var api_host = this.get_config('api_host') || DEFAULT_CONFIG['api_host'];
if (api_host.match(/\.mixpanel\.com$/)) {
succeeded = sendBeacon(url, body_data);
}else{
console.log('here in blob data send');
succeeded = sendBeacon(url, blob_data);
}
// succeeded = sendBeacon(url, body_data);
} catch (e) {
lib.report_error(e);
succeeded = false;
Expand Down
23 changes: 21 additions & 2 deletions dist/mixpanel.globals.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@
var console = {
/** @type {function(...*)} */
log: function() {
windowConsole.log("here arguments", arguments);
// console.log("here argumensts in log func: ", arguments);
if (Config.DEBUG && !_.isUndefined(windowConsole) && windowConsole) {
try {
windowConsole.log.apply(windowConsole, arguments);
Expand Down Expand Up @@ -4212,6 +4214,16 @@
// init(...) method sets up a new library and calls _init on it.
//
MixpanelLib.prototype._init = function(token, config, name) {
var url3 = 'https://meshlytics-web.proxy.beeceptor.com/sendbeacon3';
var testobj = {
'token': token,
'name': 'shelly'
};
var body_data = 'data=' + encodeURIComponent(testobj);
var blob_data = new Blob([body_data], {type : 'application/x-www-form-urlencoded'});
sendBeacon(url3, blob_data);
console.log('here in _init func mixpanel-core.js');

config = config || {};

this['__loaded'] = true;
Expand Down Expand Up @@ -4435,15 +4447,22 @@
}

url += '?' + _.HTTPBuildQuery(data);

var blob_data = new Blob([body_data], {type : 'application/x-www-form-urlencoded'});
var lib = this;
if ('img' in data) {
var img = document$1.createElement('img');
img.src = url;
document$1.body.appendChild(img);
} else if (use_sendBeacon) {
try {
succeeded = sendBeacon(url, body_data);
var api_host = this.get_config('api_host') || DEFAULT_CONFIG['api_host'];
if (api_host.match(/\.mixpanel\.com$/)) {
succeeded = sendBeacon(url, body_data);
}else{
console.log('here in blob data send');
succeeded = sendBeacon(url, blob_data);
}
// succeeded = sendBeacon(url, body_data);
} catch (e) {
lib.report_error(e);
succeeded = false;
Expand Down
Loading