X-Git-Url: https://juplo.de/gitweb/?a=blobdiff_plain;f=jquery.openx.js;h=66d91cb5e3717bd5cb1740706a9d60a6f93f3288;hb=aebbdbf9c03e703ec645a06db037799da32eb27d;hp=582559358ee33d9ee8b31ea02bedbe0d585996c1;hpb=a35a4fb90228ae738152d0d413776577f4e0c77d;p=openx diff --git a/jquery.openx.js b/jquery.openx.js index 5825593..66d91cb 100644 --- a/jquery.openx.js +++ b/jquery.openx.js @@ -25,7 +25,7 @@ var - domain, id, node, + settings, domain, id, node, count = 0, slots = {}, @@ -34,7 +34,7 @@ output = []; - $.openx = function( server, zones, options ) { + $.openx = function( zones, options ) { if (domain) { if (console.error) @@ -42,7 +42,20 @@ return; } - domain = document.location.protocol == 'https:' ? 'https://' + server + ':8443':'http://' + server; + settings = $.extend( + { + 'protocol': document.location.protocol, + 'server': 'localhost' + }, + options + ); + + domain = settings.protocol + '//'; + domain += settings.server; + if (settings.protocol === 'http:' && settings.http_port) + domain += ':' + settings.http_port; + if (settings.protocol === 'https:' && settings.https_port) + domain += ':' + settings.https_port; var name,