Thread Tools Display Modes
Prev Previous Post   Next Post Next
08-11-14, 11:19 AM   #1
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Download button still doesnt work...

... when Google Analytics isn't loaded.
<div class="dwnldBtn"><a onclick="ga('send', 'event', 'Downloads', 'Minion-Win', { 'hitCallback': function() { document.location = 'http://cdn.mmoui.com/minion/Minion2.0.11b-beta.exe'; }}); return false;" href="http://cdn.mmoui.com/minion/Minion2.0.11b-beta.exe"></a></div>
That "return false" is the problem. If GA really requires hardcoded onclick handlers, you can at least wrap it in a check so it doesn't break the link when GA isn't available:
<div class="dwnldBtn"><a onclick="if(window.gaGlobal){ga('send', 'event', 'Downloads', 'Minion-Win', { 'hitCallback': function() { document.location = 'http://cdn.mmoui.com/minion/Minion2.0.11b-beta.exe'; }}); return false;}" href="http://cdn.mmoui.com/minion/Minion2.0.11b-beta.exe"></a></div>
This currently affects the download button itself, and the links right below it for downloading for other operating systems.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
 

WoWInterface » Site Forums » Minion » Download button still doesnt work...


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off