PageSourceSearch

https://nyweekly.com/wp-content/plugins/wp-external-links/public/js/wpel-front.js?ver=6.9.9

js nyweekly.com collected 2026-09-24 08:56:34 UTC 5,669 bytes, 87 lines download raw bytes

1/**
2 * WP Links Plugin
3 * Admin
4 */
5/*global jQuery, window*/
6jQuery(function ($) {
7    const urlParams = new URLSearchParams(window.location.search);
8    let link_to_find = decodeURI(urlParams.get('wpel-link-highlight'));
9    
10    if(link_to_find.length > 10){
11        if($('a[href="' + link_to_find + '"]').length == 0){
12            if(link_to_find.substr(-1) == '/'){
13                link_to_find = link_to_find.slice(0, - 1);
14            } else {
15                link_to_find = link_to_find + '/';
16            }
17        }
18
19        if($('a[href="' + link_to_find + '"]').length == 0){
20            link_to_find = link_to_find.replace(window.location.origin,'');
21        }
22        
23        if($('a[href="' + link_to_find + '"]').length == 0){
24            if(link_to_find.substr(-1) == '/'){
25                link_to_find = link_to_find.slice(0, - 1);
26            } else {
27                link_to_find = link_to_find + '/';
28            }
29        }
30
31        if($('a[href="' + link_to_find + '"]').length == 0){
32            alert('Link not found ' + link_to_find);
33        } else {
34            $('a[href="' + link_to_find + '"]').css('border', '3px dashed #00a1ff').css('box-shadow','1px 1px 18px 4px #00a1ff').css('padding', '10px');
35            $([document.documentElement, document.body]).animate({
36                scrollTop: $('a[href="' + link_to_find + '"]').offset().top - 100
37            }, 100);
38        }
39    }
40
41    $('.wpel-exit-confirmation').on('click', function(e){
42        e.preventDefault();
43console.log(wp_external_links);
44        exit_confirmation_html = '';
45        if(wp_external_links.overlay == '1'){
46            exit_confirmation_html += '<div id="wpel_exit_confirmation_overlay"></div>';
47        }
48        exit_confirmation_html += '<div id="wpel_exit_confirmation">';
49        if(wp_external_links.title.length>0){
50            exit_confirmation_html += '<div id="wpel_exit_confirmation_title">'+wp_external_links.title+'</div>';
51        }
52        exit_confirmation_html += '<div id="wpel_exit_confirmation_link">'+wp_external_links.text+'<br />';
53        if(wp_external_links.continue_button != '1'){
54            exit_confirmation_html += '<a target="'+$(this).attr('target')+'" href="'+$(this).attr('href')+'">'+$(this).attr('href')+'</a>';
55        }
56        exit_confirmation_html += '</div>';
57        exit_confirmation_html += '<div id="wpel_exit_confirmation_button_wrapper">';
58        if(wp_external_links.continue_button == '1'){
59            exit_confirmation_html += '<a target="'+$(this).attr('target')+'" href="'+$(this).attr('href')+'" id="wpel_exit_confirmation_continue" onMouseOver="this.style.opacity=\'0.8\'" onMouseOut="this.style.opacity=\'1\'">' + wp_external_links.continue_button_text + '</a>';
60        }
61        
62        exit_confirmation_html += '<div id="wpel_exit_confirmation_cancel" onMouseOver="this.style.opacity=\'0.8\'" onMouseOut="this.style.opacity=\'1\'">' + wp_external_links.button_text + '</a></div>';
63        exit_confirmation_html += '</div>';
64        exit_confirmation_html += '</div>';
65
66        exit_confirmation_html += '<style>';
67        exit_confirmation_html += '#wpel_exit_confirmation_overlay{width:100%;height:100%;position:fixed;top:0px;left:0px;opacity:0.2;z-index:100000;background:'+wp_external_links.overlay_color+';}';
68        exit_confirmation_html += '#wpel_exit_confirmation{z-index:100001;border-radius:4px;padding-bottom:40px;position:fixed;top:0px;left:0px;top:50%;left:50%;margin-top:-'+(wp_external_links.popup_height/2)+'px;margin-left:-'+(wp_external_links.popup_width/2)+'px;width:'+wp_external_links.popup_width+'px;height:'+wp_external_links.popup_height+'px;background:'+wp_external_links.background+';}';
69        exit_confirmation_html += '#wpel_exit_confirmation_title{width:100%;padding:4px 10px; text-align:center; box-sizing: border-box; background:'+wp_external_links.title_background+';font-size:'+wp_external_links.title_size+'px; color:'+wp_external_links.title_color+';}';
70        exit_confirmation_html += '#wpel_exit_confirmation_link{width:100%;padding:10px 20px; box-sizing: border-box;font-size:'+wp_external_links.text_size+'px; color:'+wp_external_links.text_color+';}';
71        exit_confirmation_html += '#wpel_exit_confirmation_button_wrapper{width:100%; text-align:center; position:absolute; bottom:10px;}';
72        exit_confirmation_html += '#wpel_exit_confirmation_continue{text-decoration:none;cursor:pointer;margin-right:4px;border-radius:4px;padding:4px 10px;display:inline-block;font-size:'+wp_external_links.button_size+'px;color:'+wp_external_links.button_color+'; background:'+wp_external_links.button_background+';}';
73        exit_confirmation_html += '#wpel_exit_confirmation_cancel{cursor:pointer;border-radius:4px;padding:4px 10px;display:inline-block;font-size:'+wp_external_links.button_size+'px;color:'+wp_external_links.button_color+'; background:'+wp_external_links.button_background+';}';
74
75        exit_confirmation_html += '@media only screen and (max-width: 900px) {';
76        exit_confirmation_html += '#wpel_exit_confirmation{ width: 90%; margin: 0 auto; padding-bottom: 40px; top: 20%; position: fixed; left: auto; height: auto; height:'+wp_external_links.popup_height+'px; display: block; margin-left: 5%;}';
77        exit_confirmation_html += '}';
78        exit_confirmation_html += '</style>';
79        
80        $('body').append(exit_confirmation_html);
81    });
82
83    $('body').on('click', '#wpel_exit_confirmation_cancel', function(e){
84        $('#wpel_exit_confirmation_overlay').remove();
85        $('#wpel_exit_confirmation').remove();
86    });
87});

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.