Update bookmarklet.js
This commit is contained in:
parent
4b40fbfd86
commit
57e1f249fc
@ -1,16 +1,16 @@
|
||||
var qoomon_dev;
|
||||
var isDev = qoomon_dev;
|
||||
|
||||
// <GoogleAnalytics>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', 'UA-50840116-3', 'auto', {'alwaysSendReferrer': true});
|
||||
ga('send', {'hitType': 'pageview', 'page': '/jiracardprinter/Bookmarklet.js'});
|
||||
ga('create', 'UA-50840116-3', 'auto', {'name': 'jiraIssueCardPrinter'});
|
||||
// </GoogleAnalytics>
|
||||
|
||||
try {
|
||||
var qoomon_dev;
|
||||
var isDev = qoomon_dev;
|
||||
|
||||
// load jQuery
|
||||
if (window.jQuery === undefined) {
|
||||
appendScript('//ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js');
|
||||
@ -51,11 +51,16 @@ function main(){
|
||||
}
|
||||
|
||||
var issueKeyList = getSelectedIssueKeyList();
|
||||
|
||||
ga('send', 'event', 'bookmarklet', 'click', { 'eventValue': issueKeyList.length });
|
||||
|
||||
if(issueKeyList.length <= 0){
|
||||
alert("Please select at least one issue.");
|
||||
return;
|
||||
}
|
||||
|
||||
ga('send', 'pageview');
|
||||
|
||||
// open print preview
|
||||
jQuery("body").append(printOverlayHTML);
|
||||
jQuery("#card-print-overlay").prepend(printOverlayStyle);
|
||||
@ -1060,3 +1065,10 @@ function multilineString(commentFunction) {
|
||||
function resizeIframe(iframe) {
|
||||
iframe.height(iframe[0].contentWindow.document.body.scrollHeight);
|
||||
}
|
||||
|
||||
} catch (err) {
|
||||
ga('send', 'exception', {
|
||||
'exDescription': err.message,
|
||||
'exFatal': true
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user