PageSourceSearch

https://www.limbuto.it/wp-content/plugins/thefork-widgets/js/admin.js?ver=1

js limbuto.it collected 2026-10-03 21:38:34 UTC 5,578 bytes, 122 lines download raw bytes

1jQuery(document).ready(function($) {
2
3/*       Imputs validation 
4-------------------------------------------*/
5function checkInput(idInput) {
6        // console.log($(idInput).val());
7        var uidNum = $(idInput).val();
8
9        if(uidNum && Math.floor(uidNum) == uidNum){
10                return true;
11        }else{
12                return false;
13        }
14}
15
16/*       Checkboxes validation
17--------------------------------------------*/
18function checkSelect(idSelect) {
19        return $(idSelect).val() ? true : false;
20}
21
22
23/*   Submit button activation-deactivaction
24-----------------------------------------------*/
25function enableSubmit (idButton) {
26        $(idButton).removeAttr("disabled");
27}
28 
29function disableSubmit (idButton) {
30        $(idButton).attr("disabled", "disabled");
31}
32
33
34/*             Form validation
35----------------------------------------------------------------------------*/
36function checkForm () {
37        $("#tfw-uidValue, #tfw-lngValue").on("change keydown", function() {
38                console.log("checkForm");
39                if (checkInput("#tfw-uidValue") &&  checkSelect("#tfw-lngValue"))
40                {
41                        console.log("Enable");
42                        enableSubmit('#tfw-submit');
43                } else {
44                        console.log("disabled");
45                        disableSubmit('#tfw-submit');
46                }
47        });
48}
49
50
51/*   Action if submit button is available 
52----------------------------------------------------------*/
53$(document).ready(function() {
54	checkForm();
55    $('#tfw-submit').click(function() {
56        var uidVal = $('#tfw-uidValue').val().trim();
57        var lang = $('#tfw-lngValue').val();
58        var theHash = "";
59        theHash = getTheHash(uidVal);
60        showTheWidget(lang, uidVal, theHash);
61
62    });
63});
64
65
66/*    Get the hash value
67-----------------------------------------------------*/
68function getTheHash(uidVal){
69        var hashVal="";
70        var strMD5 = $().crypt({
71                method: "md5",
72                source: "CESHTMOTW"+uidVal
73        });
74
75        hashVal= strMD5.substr(0,5);
76        return hashVal;
77}
78
79
80/*   Show the widget in the admin preview place
81----------------------------------------------------------------------------------*/
82function showTheWidget(lang, uidVal, theHash){
83
84        var html = "";
85        widgetType= "iframe";
86
87        switch (widgetType) { 
88                case 'iframe': 
89                        html = '<iframe src="https://module.lafourchette.com/'+ lang + '/module/'+ uidVal + '-' + theHash + ' " style="width: 100%; min-height:800px; border:none; scrolling:yes;"></iframe>';
90                       //text = '&lt;iframe src="https://module.lafourchette.com/'+ lang + '/module/'+ uidVal + '-' + theHash + ' " style="width: 100%; min-height:800px; border:none; scrolling:yes;"&gt;&lt;/iframe&gt;';
91                        break;
92                case 'vertical': 
93                        html = '<iframe src="https://module.lafourchette.com/'+ lang + '/cta/vertical/'+ uidVal + '-' + theHash + ' " frameborder="0" scrolling="no" allowtransparency="true"  width="100%" height="380px" ></iframe>';
94                        //text = '&lt;iframe src="https://module.lafourchette.com/'+ lang + '/cta/vertical/'+ uidVal + '-' + theHash + ' " frameborder="0" scrolling="no" allowtransparency="true" width="100%" height="380px" &gt;&lt;/iframe&gt;';
95                        break;
96                case 'horizontal': 
97                        html = '<iframe src="https://module.lafourchette.com/'+ lang + '/cta/horizontal/'+ uidVal + '-' + theHash + ' " frameborder="0" scrolling="no" allowtransparency="true"  width="100%" height="580px" ></iframe>';
98                        //text = '&lt;iframe src="https://module.lafourchette.com/'+ lang + '/cta/horizontal/'+ uidVal + '-' + theHash + ' " frameborder="0" scrolling="no" allowtransparency="true" width="100%" height="580px" &gt;&lt;/iframe&gt;';
99                        break;
100                case 'button': 
101                        html = '<iframe src="https://module.lafourchette.com/'+ lang + '/cta/button/'+ uidVal + '-' + theHash + ' " frameborder="0" scrolling="no" allowtransparency="true"  width="100%" height="380px" ></iframe>';
102                        //text = '&lt;iframe src="https://module.lafourchette.com/'+ lang + '/cta/button/'+ uidVal + '-' + theHash + ' " frameborder="0" scrolling="no" allowtransparency="true" width="100%" height="380px" &gt;&lt;/iframe&gt;';
103                        break;
104                case 'link': 
105                        html = '<iframe src="https://module.lafourchette.com/'+ lang + '/module/'+ uidVal + '-' + theHash + ' " style="width: 100%; min-height:800px; border:none; scrolling:yes;"></iframe>';
106                        //text = 'https://module.lafourchette.com/'+ lang + '/module/'+ uidVal + '-' + theHash;
107                    break;
108                default:
109                        html = '<iframe src="https://module.lafourchette.com/en_GB/cta/horizontal/56567-a3fd1" frameborder="0" scrolling="no" allowtransparency="true"  width="100%" height="380px" ></iframe>' ;
110                        //text = '&lt;iframe src="https://module.lafourchette.com/en_GB/cta/horizontal/56567-a3fd1" frameborder="0" scrolling="no" allowtransparency="true" width="100%" height="380px" &gt;&lt;/iframe&gt;';
111        }
112
113        document.getElementById("tfw-shortcode").value= "[tfw-iframe lang= "+ lang + " uid= "+ uidVal +"]";
114        document.getElementById("tfw-preview").innerHTML= html;
115
116        console.log(html);
117
118
119}
120
121
122} );

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.