PageSourceSearch

https://artpublicmontreal.ca/wp-content/themes/apm_theme_wordpress/rptools_core/js/rptools.script.js?ver=1.0

js artpublicmontreal.ca collected 2026-10-02 06:07:22 UTC 4,499 bytes, 110 lines download raw bytes

1//@codekit-prepend "libs/jquery-1.10.2.js"
2
3/*! jQuery Rot13 Plugin - v0.1.0 - 2012-04-24
4* https://github.com/kadamwhite/jquery.rot13
5* Copyright (c) 2012 K.Adam White; Licensed MIT */
6//(function(a){var b=function(b){var c=b.split("");return a.map(c,function(a){var b;return a.match(/[A-Za-z]/)?(b=a.charCodeAt(0),b<97?b=(b-52)%26+65:b=(b-84)%26+97,String.fromCharCode(b)):a}).join("")};a.fn.rot13=function(){return a(this).each(function(){var c=a(this).html();return c.match(/[<>]/)?(c=c.replace(/^([^<]*)</,b),c=c.replace(/>([^<]*)</g,b),c=c.replace(/>([^<]*)$/,b)):c=b(c),a(this).html(c)}),this},a.rot13=function(a){return b(a)}})(jQuery);
7
8//+ Jonas Raoni Soares Silva
9//@ http://jsfromhell.com/string/rot13 [rev. #1]
10
11String.prototype.rot13 = function(){
12    return this.replace(/[a-zA-Z]/g, function(c){
13        return String.fromCharCode((c <= "Z" ? 90 : 122) >= (c = c.charCodeAt(0) + 13) ? c : c - 26);
14    });
15};
16
17/*
18* arlette
19* Popup javascript reservé au debug_user avec le même style et fonctionnalité qu'en php.
20* @param : Comme pour php, message, type (notice, warning, danger), title.
21* @return true ou false...
22*/
23function arlette(message, type, title){
24    type = typeof type !== 'undefined' ? type : 'default';
25    title = typeof title !== 'undefined' ? title : 'Alert!';
26    alert_box = $("<div style='display:none;' class='debug-alert-container "+type+"'><div class='debug-alert-js debug-alert "+type+"'><nav><a class='expend-alert'>< - ></a> | <a class='close-alert'>X</a></nav><div class='debug-alert-title'>"+title+"</div><div class='debug-alert-content'>"+message+ "</div></div></div>");
27    if(is_debug_user()){
28        $("body").prepend(alert_box);
29        setTimeout(function(){
30           alert_box.fadeIn(150);
31        }, 20);
32    }
33}
34
35
36/*
37* is_debug_user
38* Vérfiie que l'utilisateur courant est "debug".
39* @return true ou false...
40*/
41function is_debug_user(){
42    if(typeof debug_user == "undefined"){
43        return false;
44    }
45    return debug_user == 1 ? true : false;
46}
47
48jQuery(document).ready(function ($) {
49    /*********************************************
50                LES DEBUGS ALERTS...
51    *********************************************/
52    $(document).on('click', ".debug-alert-title", function(){
53        if(!$(this).parents('.debug-alert').hasClass('expended')){
54            $(this).next("div").slideToggle(250);
55            $(this).parent('.debug-alert').toggleClass('minimized');
56        }
57    });
58    $(document).on('click', ".close-alert", function(){
59        alert_box = $(this).parents('.debug-alert');
60        if(alert_box.hasClass('expended')){
61            alert_box.removeClass('expended');
62        }
63        else{
64            if(alert_box.hasClass('debug-alert-js')){
65                alert_box.parents('.debug-alert-container').fadeOut(150, function(){
66                    $(this).remove();
67                });
68            }
69            else{
70                alert_box.animate({opacity:0}
70, 250, function(){
71                    $(this).slideUp(250);
72                });
73            }
74        }
75    });
76    $(document).on('click', ".expend-alert", function(){
77        alert_box = $(this).parents('.debug-alert');
78        alert_box.toggleClass('expended');
79    });
80
81    /*********************************************
82                SOCIAL POPUP
83    *********************************************/
84    //WHaaaaat ? :/
85    //Uncaught TypeError: Object .social-popup has no method 'apply'
86/*    $(document).on('click','.social-popup').click(function(){
87        window.open($(this).attr('href'), "Social", "width=650,height=500");
88        return false;
89    });*/
90
91    /*********************************************
92                DISPLAY DEBUG ?
93    *********************************************/
94    if(is_debug_user() && display_debug){
95        $("html").addClass('jumpstart-debug');
96    }
97    /*********************************************
98                PROTECTION (lié à tool-box.php:l291)
99    *********************************************/
100    //Retreive the rot13 encoded data-attr for user and domain, decode them and merge them into a beautiful botproof email adress.
101    if($('.add-email').length){
102        $(".add-email").each(function(){
103            usermail= $(this).data("user");
104            domain = $(this).data("domain");
105            usermail = usermail.rot13();
106            domain = domain.rot13();
107            $(this).html("<a href='mailto:"+usermail+"@"+domain+"'>"+usermail+"@"+domain+"</a>");
108        });
109    }
110});

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.