Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jun 2019
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    I need help on how to disable timeout, using page inspection.

    Hello, I'm a beginner and I need help with how to disable a timeout on a page, that prevent me from typing, I tried messing around with elements and source in page inspection but it either reloads the page or not work.

    this is the code, I'm sorry if it's not clear, but I hope you can help.

    (function($){var a={},c="doTimeout",d=Array.prototype.slice;$[c]=function(){return b.apply(window,[0].concat(d.call(arguments)))};$.fn[c]=function(){var f=d.call(arguments),e=b.apply(this,[c+f[0]].concat(f));return typeof f[0]==="number"||typeof f[1]==="number"?this:e};function b(l){var m=this,h,k={},g=l?$.fn:$,n=arguments,i=4,f=n[1],j=n[2],p=n[3];if(typeof f!=="string"){i--;f=l=0;j=n[1];p=n[2]}if(l){h=m.eq(0);h.data(l,k=h.data(l)||{})}else{if(f){k=a[f]||(a[f]={})}}k.id&&clearTimeout(k.id);delete k.id;function e(){if(l){h.removeData(l)}else{if(f){delete a[f]}}}function o(){k.id=setTimeout(function(){k.fn()},j)}if(p){k.fn=function(q){if(typeof p==="string"){p=g[p]}p.apply(m,d.call(n,i))===true&&!q?o():e()};o()}else{if(k.fn){j===undefined?e():k.fn(j===false);retu rn true}else{e()}}}})(jQuery);

  2. #2
    Master Coder sunfighter's Avatar
    Join Date
    Jan 2011
    Location
    West Des Moines, Iowa
    Posts
    8,104
    Thanks
    37
    Thanked 1,086 Times in 1,082 Posts
    Welcome to the forums pslove5.
    The first thing you must do, as a beginner, is get an editor that indents for you. Many out there to try, I suggest VSCode https://code.visualstudio.com/ it's free.
    Next start using names that are easy to understand. Using b or o for functions make things hard to understand.
    Lastly Javascript without html.css is hard to understand or troubleshoot.

    All that being said. Here is your code for anyone willing to give it a go. I highlighted what I think is the important areas.
    Code:
    (function($){
        var a={},c="doTimeout",d=Array.prototype.slice;
        $[c]=function(){
            return b.apply(window,[0].concat(d.call(arguments)))
        };
        
        $.fn[c]=function(){
            var f=d.call(arguments),e=b.apply(this,[c+f[0]].concat(f));
            return typeof f[0]==="number"||typeof f[1]==="number"?this:e
        };
        
        function b(l){
            var m=this,h,k={},g=l?$.fn:$,n=arguments,i=4,f=n[1],j=n[2],p=n[3];
            if(typeof f!=="string"){
                i--;
                f=l=0;
                j=n[1];
                p=n[2]
            }
            if(l){
                h=m.eq(0);
                h.data(l,k=h.data(l)||{})
            }else{
                if(f){
                    k=a[f]||(a[f]={})
                }
            }
    
        k.id && clearTimeout(k.id);
        delete k.id;
    
            function e(){
                if(l){h.removeData(l)
                }else{
                    if(f){
                        delete a[f]
                    }
                }
            }
            function o(){
                k.id=setTimeout(function(){
                    k.fn()
                },
                j
            )}
            if(p){
                k.fn=function(q){
                    if(typeof p==="string"){
                        p=g[p]
                    }
                    p.apply(m,d.call(n,i))===true&&!q?o():e()
                };
            o()
            }else{
                if(k.fn){
                    j===undefined?e():k.fn(j===false);
                    return true
                }else{
                    e()
                }
            }
        }
    })(jQuery);
    Both setting a timeout and clearing the time out is part of function b and I do not see anywhere it is called. If you have more code look through it and find where.
    Evolution - The non-random survival of random variants.
    Physics is actually atoms trying to understand themselves.

  3. #3
    New to the CF scene
    Join Date
    Jun 2019
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank you Sunfighter, I appreciate you taking the time to help and you helped a lot, I will give it a try.


 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •