|
289 | 289 | <script type="text/javascript"> |
290 | 290 | {{#if blobId}} |
291 | 291 | var blobId = "{{blobId}}"; |
292 | | - ga('send', 'event', "Blobs", "load", blobId); |
293 | 292 | {{else}} |
294 | 293 | var blobId = null; |
295 | 294 | {{/if}} |
|
322 | 321 | app.codeEditor.resize(); |
323 | 322 | } |
324 | 323 | $('#tour').click(function() { |
325 | | - if (blobId) { |
326 | | - ga('send', 'event', "Tour", "start", blobId); |
327 | | - } else { |
328 | | - ga('send', 'event', "Tour", "start"); |
329 | | - } |
330 | 324 | $('#tourContent').joyride({ |
331 | 325 | autoStart: true, |
332 | 326 | expose: true, |
|
335 | 329 | tipAnimationFadeSpeed: 300, |
336 | 330 | cookieMonster: true, |
337 | 331 | cookieName: 'jsonblobTour', |
338 | | - cookieDomain: true, |
339 | | - postRideCallback: function () { |
340 | | - if (blobId) { |
341 | | - ga('send', 'event', "Tour", "complete", blobId); |
342 | | - } else { |
343 | | - ga('send', 'event', "Tour", "complete"); |
344 | | - } |
345 | | - }, |
346 | | - 'postStepCallback': function (index, tip) { |
347 | | - if (blobId) { |
348 | | - ga('send', 'event', "Tour", "step", blobId, index); |
349 | | - } else { |
350 | | - ga('send', 'event', "Tour", "step", null, index); |
351 | | - } |
352 | | - } |
| 332 | + cookieDomain: true |
353 | 333 | }); |
354 | 334 | }); |
355 | 335 | $(document).ready(function() { |
|
365 | 345 | } |
366 | 346 | }); |
367 | 347 | $("#createGist").click(function() { |
368 | | - if (blobId) { |
369 | | - ga('send', 'event', "Blobs", "gist", blobId); |
370 | | - } else { |
371 | | - ga('send', 'event', "Blobs", "gist"); |
372 | | - } |
373 | 348 | var gist = { |
374 | 349 | "description": "JSON Blob from " + document.URL, |
375 | 350 | "public": false, |
|
394 | 369 | }); |
395 | 370 | }); |
396 | 371 | $("#clear").click(function() { |
397 | | - if (blobId) { |
398 | | - ga('send', 'event', "Blobs", "clear", blobId); |
399 | | - } else { |
400 | | - ga('send', 'event', "Blobs", "clear"); |
401 | | - } |
402 | 372 | app.codeEditor.set({}); |
403 | 373 | app.treeEditor.set({}); |
404 | 374 | blobId = null; |
|
419 | 389 | alert("Please enter a URL for the request to be sent to!"); |
420 | 390 | return false; |
421 | 391 | } |
422 | | - if (blobId) { |
423 | | - ga('send', 'event', "Blobs", "makeRequest", blobId); |
424 | | - } else { |
425 | | - ga('send', 'event', "Blobs", "makeRequest"); |
426 | | - } |
427 | 392 | var method = $(this).text(); |
428 | 393 | var headers = {}; |
429 | 394 | $(".requestHeader").each(function() { |
|
455 | 420 | } |
456 | 421 | $('#makeRequestModal').modal('hide'); |
457 | 422 | $('#makeRequestSuccess').modal('show'); |
458 | | - ga('send', 'event', "Blobs", "makeRequestSuccess"); |
459 | 423 | }, |
460 | 424 | error: function(jqXHR, textStatus, errorThrown) { |
461 | 425 | if (errorThrown) { |
|
470 | 434 | $(".requestedUrl").text($("#requestUrl").val()); |
471 | 435 | $("#makeRequestModal").modal('hide'); |
472 | 436 | $("#makeRequestFailure").modal('show'); |
473 | | - ga('send', 'event', "Blobs", "makeRequestFailure"); |
474 | 437 | }, |
475 | 438 | cache: false |
476 | 439 | }; |
|
490 | 453 | $("#save").click(function() { |
491 | 454 | var jsonString = app.codeEditor == app.lastChanged ? app.codeEditor.getText() : app.treeEditor.getText(); |
492 | 455 | var valid = !isValidJson(jsonString); |
493 | | - if (blobId) { |
494 | | - ga('send', 'event', "Blobs", "save", blobId, valid ? 1 : 0); |
495 | | - } else { |
496 | | - ga('send', 'event', "Blobs", "save", null, valid ? 1 : 0); |
497 | | - } |
498 | 456 | if (valid) { |
499 | 457 | $('#invalidJson').modal('show'); |
500 | 458 | return; |
|
0 commit comments