1(function ($) { 2 'use strict'; 3 4 /** 5 * All of the code for your public-facing JavaScript source 6 * should reside in this file. 7 * 8 * Note: It has been assumed you will write jQuery code here, so the 9 * $ function reference has been prepared for usage within the scope 10 * of this function. 11 * 12 * This enables you to define handlers, for when the DOM is ready: 13 * 14 * $(function() { 15 * 16 * }); 17 * 18 * When the window is loaded: 19 * 20 * $( window ).load(function() { 21 * 22 * }); 23 * 24 * ...and/or other possibilities. 25 * 26 * Ideally, it is not considered best practise to attach more than a 27 * single DOM-ready or window-load handler for a particular page. 28 * Although scripts in the WordPress core, Plugins and Themes may be 29 * practising this, we should strive to set a better example in our own work. 30 */ 31 32 $(document).ready(function () { 33 34 $(document).on('click', ".bp-share-button", function (e) { 35 $(this).parent().next(".service-buttons").toggle(500); 36 }); 37 $(document).on("click", ".bp-share.has-popup", function (e) {
38 var display_attr = $(this).attr('attr-display'); 39 if ('no-popup' != display_attr) { 40 e.preventDefault(); 41 console.log(display_attr); 42 goclicky($(this).attr("href")); 43 } 44 }); 45 function FindLeftWindowBoundry() { 46 // In Internet Explorer window.screenLeft is the window's left boundry 47 if (window.screenLeft) { 48 return window.screenLeft; 49 } 50 51 // In Firefox window.screenX is the window's left boundry 52 if (window.screenX) 53 return window.screenX; 54 55 return 0; 56 } 57 // Find Left Boundry of current Window 58 function FindTopWindowBoundry() { 59 // In Internet Explorer window.screenLeft is the window's left boundry 60 if (window.screenTop) { 61 return window.screenTop; 62 } 63 64 // In Firefox window.screenY is the window's left boundry 65 if (window.screenY) 66 return window.screenY; 67 68 return 0; 69 } 70 71 function goclicky(meh) { 72 73 console.log(FindLeftWindowBoundry(), FindTopWindowBoundry()); 74 var x = screen.width / 2 - 700 / 2 + FindLeftWindowBoundry(); 75 var y = screen.height / 2 - 450 / 2 + FindTopWindowBoundry(); 76 window.open(meh, '', 'height=485,width=700,left=' + x + ',top=' + y); 77 } 78 79 80 81 $(document).on('click', ".bp-cpoy", function (e) { 82 e.preventDefault(); 83 var copyText = $(this).data('href'); 84 85 document.addEventListener('copy', function (e) { 86 e.clipboardData.setData('text/plain', copyText); 87 e.preventDefault(); 88 }, true); 89 90 document.execCommand('copy'); 91 var tooltip = $(this).next(); 92 tooltip.removeClass('tooltip-hide'); 93 setTimeout(function () { 94 tooltip.addClass('tooltip-hide'); 95 }, 500); 96 97 98 }); 99 }); 100 101})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.