https://bugzilla.wikimedia.org/show_bug.cgi?id=25439

           Summary: Make variable destinations in banners behave like html
                    links
           Product: MediaWiki extensions
           Version: any
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: Normal
         Component: CentralNotice
        AssignedTo: [email protected]
        ReportedBy: [email protected]


Currently we the following js to selecr a variable destination page.

function goToDonationPage( mode ) {
 var url =
'{{{banner-url-2010}}}?utm_medium=sitenotice&utm_campaign={{{campaign}}}&utm_source={{{banner}}}';
 if ( mode && mode.length ) { 
  url += '_' + mode;
 }
 var targets = String( '{{{targets}}}' ).split(',');
 if ( targets.length ) {
  url += '&' + targets[Math.floor( Math.random() * targets.length
)].replace(/^\s+|\s+$/, '');
 }
 window.location = url;
}

While functionally this does what we want it creates a link that is a js
function making it not right clickable. If we could run the js on page load,
create a link, and then present that link to the user .. we would have a normal
html link with all the properties that people are used to.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to