Update bookmarklet.js
This commit is contained in:
parent
b0110503cb
commit
27ca2c0ac2
@ -1,43 +1,45 @@
|
|||||||
version = "3.1.20";
|
(function () {
|
||||||
console.log("Version: " + version);
|
var version = "3.1.20";
|
||||||
|
console.log("Version: " + version);
|
||||||
|
|
||||||
var isDev = typeof isDev !== 'undefined' && isDev ;
|
var isDev = typeof isDev !== 'undefined' && isDev ;
|
||||||
var isTest = typeof isTest !== 'undefined' && isTest ;
|
var isTest = typeof isTest !== 'undefined' && isTest ;
|
||||||
|
|
||||||
hostOrigin = "https://qoomon.github.io/Jira-Issue-Card-Printer/";
|
var hostOrigin = "https://qoomon.github.io/Jira-Issue-Card-Printer/";
|
||||||
if(isDev){
|
if(isDev){
|
||||||
console.log("DEVELOPMENT");
|
console.log("DEVELOPMENT");
|
||||||
hostOrigin = "https://rawgit.com/qoomon/Jira-Issue-Card-Printer/develop/";
|
hostOrigin = "https://rawgit.com/qoomon/Jira-Issue-Card-Printer/develop/";
|
||||||
}
|
}
|
||||||
if(isTest){
|
if(isTest){
|
||||||
console.log("TEST");
|
console.log("TEST");
|
||||||
}
|
}
|
||||||
|
|
||||||
cors = "https://cors-anywhere.herokuapp.com/";
|
cors = "https://cors-anywhere.herokuapp.com/";
|
||||||
//$("#card").load("https://cors-anywhere.herokuapp.com/"+"https://qoomon.github.io/Jira-Issue-Card-Printer/card.html");
|
//$("#card").load("https://cors-anywhere.herokuapp.com/"+"https://qoomon.github.io/Jira-Issue-Card-Printer/card.html");
|
||||||
|
|
||||||
// <GoogleAnalytics>
|
// <GoogleAnalytics>
|
||||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
(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),
|
(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)
|
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');
|
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||||
|
|
||||||
if(isTest || isDev){
|
|
||||||
|
ga('create', 'UA-50840116-3', {'alwaysSendReferrer': true});
|
||||||
|
if(isTest || isDev){
|
||||||
ga('set', 'referrer', 'dev.qoomon.com');
|
ga('set', 'referrer', 'dev.qoomon.com');
|
||||||
}
|
}
|
||||||
ga('create', 'UA-50840116-3', {'alwaysSendReferrer': true});
|
ga('set', 'page', '/cardprinter');
|
||||||
ga('set', 'page', '/cardprinter');
|
|
||||||
|
|
||||||
//ga('set', 'referrer', window.location.hostname);
|
//ga('set', 'referrer', window.location.hostname);
|
||||||
//ga('set', 'location', window.location.protocol + '//' + window.location.host + window.location.pathname);
|
//ga('set', 'location', window.location.protocol + '//' + window.location.host + window.location.pathname);
|
||||||
//ga('set', 'hostname', window.location.hostname);
|
//ga('set', 'hostname', window.location.hostname);
|
||||||
//ga('set', 'title', document.title);
|
//ga('set', 'title', document.title);
|
||||||
|
|
||||||
//ga('set', 'campaignSource', '(direct)');
|
//ga('set', 'campaignSource', '(direct)');
|
||||||
//ga('set', 'campaignMedium', '(none)');
|
//ga('set', 'campaignMedium', '(none)');
|
||||||
// </GoogleAnalytics>
|
// </GoogleAnalytics>
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
// load jQuery
|
// load jQuery
|
||||||
if (window.jQuery === undefined) {
|
if (window.jQuery === undefined) {
|
||||||
@ -1094,12 +1096,12 @@ try {
|
|||||||
iframe.height(iframe[0].contentWindow.document.body.scrollHeight);
|
iframe.height(iframe[0].contentWindow.document.body.scrollHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.logError(err.message);
|
console.logError(err.message);
|
||||||
ga('send', 'exception', {
|
ga('send', 'exception', {
|
||||||
'exDescription': err.message,
|
'exDescription': err.message,
|
||||||
'exFatal': true
|
'exFatal': true
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
})();
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user