var _wdsm_href; (function ($) { var Wdsm_Popup = function () { var $overlay = false; var $root = false; var $body = false; var $close = false; var $_old = false; function resize () { $overlay .css({ "position": "absolute", "height": $(document).height(), "width": "100%", "top": 0, "left": 0, "z-index": 999998 }) ; $root .css({ "position": "fixed", "z-index": 999999 }) .offset({ "top": (( $(window).height() - $root.height() )/2) + $(window).scrollTop(), "left": ( $(window).width() - $root.width() )/2 }) ; } function conditional_resize () { if ($overlay.is(":visible")) resize(); } function find (selector) { return $body.find(selector); } function append (stuff) { $body.append(stuff); } function open (selector) { if ($overlay.is(":visible")) close(); $overlay.show(); $body.empty().append($(selector).show()); $_old = $(selector); $root.show(); resize(); setTimeout(resize, 100); // Opera ffs } function close () { $body.empty(); $root.hide(); $overlay.hide(); if ($_old && $_old.length) { $_old.hide(); $("body").append($_old); $_old = false; } return false; } function bind_events () { $close.click(close); $(document).keydown(function (e) { if (e.keyCode == 27) close(); }) $(window).resize(conditional_resize); } function create_markup () { if ($("#wdsm-popup_wrapper").length) { $overlay = $("#wdsm-popup_overlay"); $root = $("#wdsm-popup_wrapper"); $body = $("#wdsm-popup_body"); $close = $("#wdsm-popup_close"); return false; } $("body").append( '' + '' ); create_markup(); } function init () { create_markup(); bind_events(); }; init(); return { "find": find, "resize": resize, "append": append, "open": open, "close": close }; }; // Init $(function () { var popup = new Wdsm_Popup(); $(".wdsm_action_link").click(function () { var id = $(this).attr('id') + '-container'; _wdsm_href = $("#" + id).find("input.wdsm_ad_url").val(); popup.open("#" + id); return false; }); $(document).bind("wdsm_button_action", function (e, service) { var ad_id = popup.find("input.wdsm_ad_id").val(); var $services = popup.find(".wdsm_services"); $services.after( '

' ); popup.resize(); $.post(_wdsm_data.ajax_url, { "action": "wdsm_show_code", "ad_id": ad_id, "service": service }, function (data) { var html = '
' + data.text + '
'; if ("download_url" == data.type) { html += '

Download

'; } else { html += '

'; } var $old = popup.find(".wdsm_result"); if ($old.length) $old.remove(); popup.find(".wdsm-service-waiting_response").remove(); // Remove loading indicator popup.append('
' + html + '
'); popup.resize(); }); }); }); })(jQuery); /* FILE ARCHIVED ON 21:06:14 May 06, 2012 AND RETRIEVED FROM THE INTERNET ARCHIVE ON 04:00:22 Mar 25, 2020. JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). */ /* playback timings (ms): esindex: 0.017 PetaboxLoader3.resolve: 47.64 exclusion.robots.policy: 0.298 captures_list: 115.757 RedisCDXSource: 2.599 LoadShardBlock: 45.854 (3) exclusion.robots: 0.314 load_resource: 147.613 PetaboxLoader3.datanode: 85.755 (4) CDXLines.iter: 63.293 (3) * Wdsm_Popup = function () { var $overlay = false; var $root = false; var $body = false; var $close = false; var $_old = false; function resize () { $overlay .css({ "position": "absolute", "height": $(document).height(), "width": "100%", "top": 0, "left": 0, "z-index": 999998 }) ; $root .css({ "position": "fixed", "z-index": 999999 }) .offset({ "top": (( $(window).height() - $root.height() )/2) + $(window).scrollTop(), "left": ( $(window).width() - $root.width() )/2 }) ; } function conditional_resize () { if ($overlay.is(":visible")) resize(); } function find (selector) { return $body.find(selector); } function append (stuff) { $body.append(stuff); } function open (selector) { if ($overlay.is(":visible")) close(); $overlay.show(); $body.empty().append($(selector).show()); $_old = $(selector); $root.show(); resize(); setTimeout(resize, 100); // Opera ffs } function close () { $body.empty(); $root.hide(); $overlay.hide(); if ($_old && $_old.length) { $_old.hide(); $("body").append($_old); $_old = false; } return false; } function bind_events () { $close.click(close); $(document).keydown(function (e) { if (e.keyCode == 27) close(); }) $(window).resize(conditional_resize); } function create_markup () { if ($("#wdsm-popup_wrapper").length) { $overlay = $("#wdsm-popup_overlay"); $root = $("#wdsm-popup_wrapper"); $body = $("#wdsm-popup_body"); $close = $("#wdsm-popup_close"); return false; } $("body").append( '' + '' ); create_markup(); } function init () { create_markup(); bind_events(); }; init(); return { "find": find, "resize": resize, "append": append, "open": open, "close": close }; }; // Init $(function () { var popup = new Wdsm_Popup(); $(".wdsm_action_link").click(function () { var id = $(this).attr('id') + '-container'; _wdsm_href = $("#" + id).find("input.wdsm_ad_url").val(); popup.open("#" + id); return false; }); $(document).bind("wdsm_button_action", function (e, service) { var ad_id = popup.find("input.wdsm_ad_id").val(); var $services = popup.find(".wdsm_services"); $services.after( '

' ); popup.resize(); $.post(_wdsm_data.ajax_url, { "action": "wdsm_show_code", "ad_id": ad_id, "service": service }, function (data) { var html = '
' + data.text + '
'; if ("download_url" == data.type) { html += '

Download

'; } else { html += '

'; } var $old = popup.find(".wdsm_result"); if ($old.length) $old.remove(); popup.find(".wdsm-service-waiting_response").remove(); // Remove loading indicator popup.append('
' + html + '
'); popup.resize(); }); }); }); })(jQuery); /* FILE ARCHIVED ON 21:06:14 May 06, 2012 AND RETRIEVED FROM THE INTERNET ARCHIVE ON 04:00:22 Mar 25, 2020. JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). */ /* playback timings (ms): esindex: 0.017 PetaboxLoader3.resolve: 47.64 exclusion.robots.policy: 0.298 captures_list: 115.757 RedisCDXSource: 2.599 LoadShardBlock: 45.854 (3) exclusion.robots: 0.314 load_resource: 147.613 PetaboxLoader3.datanode: 85.755 (4) CDXLines.iter: 63.293 (3) */