Updated the Exit Link code
gh-pages
John Kiernander 2013-07-29 15:07:16 +01:00
parent eef39d9aef
commit f04be57953
5 changed files with 75 additions and 0 deletions

View File

@ -75,6 +75,21 @@
var pageTracker = _gat._getTracker("UA-41100937-1");
pageTracker._trackPageview();
} catch(err) {}
$(function() {
$("a").on('click',function(e){
var url = $(this).attr("href");
if (e.currentTarget.host != window.location.host) {
_gat._getTrackerByName()._trackEvent("Outbound Links", e.currentTarget.host.replace(':80',''), url, 0);
if (e.metaKey || e.ctrlKey) {
var newtab = true;
}
if (!newtab) {
e.preventDefault();
setTimeout('document.location = "' + url + '"', 100);
}
}
});
});
</script>
</body>
</html>

View File

@ -115,6 +115,21 @@
var pageTracker = _gat._getTracker("UA-41100937-1");
pageTracker._trackPageview();
} catch(err) {}
$(function() {
$("a").on('click',function(e){
var url = $(this).attr("href");
if (e.currentTarget.host != window.location.host) {
_gat._getTrackerByName()._trackEvent("Outbound Links", e.currentTarget.host.replace(':80',''), url, 0);
if (e.metaKey || e.ctrlKey) {
var newtab = true;
}
if (!newtab) {
e.preventDefault();
setTimeout('document.location = "' + url + '"', 100);
}
}
});
});
</script>
<script type="text/javascript">
var disqus_shortname = 'dimplejs';

View File

@ -78,6 +78,21 @@
var pageTracker = _gat._getTracker("UA-41100937-1");
pageTracker._trackPageview();
} catch(err) {}
$(function() {
$("a").on('click',function(e){
var url = $(this).attr("href");
if (e.currentTarget.host != window.location.host) {
_gat._getTrackerByName()._trackEvent("Outbound Links", e.currentTarget.host.replace(':80',''), url, 0);
if (e.metaKey || e.ctrlKey) {
var newtab = true;
}
if (!newtab) {
e.preventDefault();
setTimeout('document.location = "' + url + '"', 100);
}
}
});
});
</script>
</body>
</html>

View File

@ -115,6 +115,21 @@
var pageTracker = _gat._getTracker("UA-41100937-1");
pageTracker._trackPageview();
} catch(err) {}
$(function() {
$("a").on('click',function(e){
var url = $(this).attr("href");
if (e.currentTarget.host != window.location.host) {
_gat._getTrackerByName()._trackEvent("Outbound Links", e.currentTarget.host.replace(':80',''), url, 0);
if (e.metaKey || e.ctrlKey) {
var newtab = true;
}
if (!newtab) {
e.preventDefault();
setTimeout('document.location = "' + url + '"', 100);
}
}
});
});
</script>
<script type="text/javascript">
var disqus_shortname = 'dimplejs';

View File

@ -129,6 +129,21 @@
var pageTracker = _gat._getTracker("UA-41100937-1");
pageTracker._trackPageview();
} catch(err) {}
$(function() {
$("a").on('click',function(e){
var url = $(this).attr("href");
if (e.currentTarget.host != window.location.host) {
_gat._getTrackerByName()._trackEvent("Outbound Links", e.currentTarget.host.replace(':80',''), url, 0);
if (e.metaKey || e.ctrlKey) {
var newtab = true;
}
if (!newtab) {
e.preventDefault();
setTimeout('document.location = "' + url + '"', 100);
}
}
});
});
</script>
<a href="https://github.com/PMSI-AlignAlytics/dimple/fork">
<img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub">