You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@marmotta.apache.org by bu...@apache.org on 2013/06/27 18:24:21 UTC
svn commit: r867643 - in /websites/staging/marmotta/trunk/content: ./
js/marmotta.js
Author: buildbot
Date: Thu Jun 27 16:24:20 2013
New Revision: 867643
Log:
Staging update by buildbot for marmotta
Modified:
websites/staging/marmotta/trunk/content/ (props changed)
websites/staging/marmotta/trunk/content/js/marmotta.js
Propchange: websites/staging/marmotta/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Thu Jun 27 16:24:20 2013
@@ -1 +1 @@
-1497398
+1497424
Modified: websites/staging/marmotta/trunk/content/js/marmotta.js
==============================================================================
--- websites/staging/marmotta/trunk/content/js/marmotta.js (original)
+++ websites/staging/marmotta/trunk/content/js/marmotta.js Thu Jun 27 16:24:20 2013
@@ -59,20 +59,13 @@ $(document).ready(function() {
showHideChangelogs();
var filetypes = /\.(zip|gz)$/i;
- var baseHref = '';
- if (jQuery('base').attr('href') != undefined)
- baseHref = jQuery('base').attr('href');
- jQuery('a').each(function() {
- var href = jQuery(this).attr('href');
+ $("a").each(function() {
+ var href = $(this).attr("href");
if (href && href.match(filetypes)) {
- jQuery(this).click(function() {
- var extension = (/[.]/.exec(href)) ? /[^.]+$/.exec(href) : undefined;
- var filePath = href;
- _gaq.push(['_trackEvent', 'Download', 'Click-' + extension, filePath]);
- if (jQuery(this).attr('target') != undefined && jQuery(this).attr('target').toLowerCase() != '_blank') {
- setTimeout(function() { location.href = baseHref + href; }, 200);
- return false;
- }
+ $(this).click(function() {
+ _trackEvent("_trackEvent", "download", $(this).attr("href"));
+ setTimeout(function() { location.href = $(this).attr("href"); }, 300);
+ return false;
});
}
});