File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change 31
31
ga . src = ( 'https:' == document . location . protocol ? 'https://ssl' : 'http://www' ) + '.google-analytics.com/ga.js' ;
32
32
var s = document . getElementsByTagName ( 'script' ) [ 0 ] ; s . parentNode . insertBefore ( ga , s ) ;
33
33
} ) ( ) ;
34
-
34
+ var f = function ( event ) {
35
+ var href = $ ( this ) . attr ( 'href' ) ;
36
+ var target = $ ( this ) . attr ( 'target' ) ;
37
+ _gaq . push ( [ '_trackEvent' , 'Downloads' , 'Download' , href ] ) ;
38
+ if ( target === undefined || target . toLowerCase ( ) != '_blank' ) {
39
+ setTimeout ( function ( ) { location . href = href ; } , 200 ) ;
40
+ return false ;
41
+ }
42
+ } ;
43
+ function endsWith ( str , suffix ) {
44
+ return str . indexOf ( suffix , str . length - suffix . length ) !== - 1 ;
45
+ }
46
+ $ ( function ( ) {
47
+ $ ( 'a' ) . filter ( function ( ) {
48
+ var href = $ ( this ) . attr ( 'href' ) ;
49
+ return ! endsWith ( href , '/' ) && ! endsWith ( href , 'html' ) ;
50
+ } ) . on ( 'click' , f ) ;
51
+ } ) ;
35
52
</ script >
36
53
</ head>
37
54
< body onload ="styleCode() ">
You can’t perform that action at this time.
0 commit comments