imothep85's Recent Forum Activity

  • Your laxt capx is working fine,

    it is possible instead of looking for word added inside the events to looks for words inside a txt list?

    maybe with ajax?

    and if the user type one of those listed words, then he is redirected to google

    thanks a lot

  • can you give me a capx please i tried yesterday but without any result :s

  • ok i see, but maybe im explaining it wrong

    what i want is this:

    when someone type something INSIDE THE IFRAME, for exampel here i typed cgtalk.com

    i want the text_url copy exactly what the user typed and if it match an listed url, THEN he is directly redirected to google.com

    your example works i get the redirecton if y type the url inside the text_url on top and if i hit the go buton.

  • hope to see some news

  • trying stuffs but nothign works :s

  • i tried this:

    on any key pressed+ iframe is focused > text > set text Keyboard.StringFromKeyCode(keyboard.LastKeyCode)

    and:

    on iframe is focused > text > set text Keyboard.StringFromKeyCode(keyboard.LastKeyCode)

    and:

    on any key pressed > text > set text Keyboard.StringFromKeyCode(keyboard.LastKeyCode)

    and:

    on iframe is focused > text > set text keyboard.LastKeyCode

    but nothing works...

    can someone try?

  • i cant do it with on iframe focus :s

  • can someone help?

  • where i can find the expression "check the LastKeyCode expression" ??

  • can someone help to achieve this?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • the only function missing is in fact: onbefore loading

    like that if the user types and url, who is blacklisted in a txt file for example, the page is not visible at all and the user is instantly redirected to google

  • if you can add the function for the iframe

         block = true;
                 }
    
                 if (block) {
                  //httpChannel.cancel(Cr.NS_BINDING_ABORTED); //this aborts the load
                  httpChannel.redirectTo(Services.io.newURI('https://www.google.com/', null, null)); //can redirect with this line, if dont want to redirect and just block, then uncomment this line and comment out line above (line 17)
                 }
                }[/code:4yfay4o9]
    
    this come from my mozilla add-on
    
    or maybe something like:
    
    [code:4yfay4o9]};
    function extract_domain(url)    {
        var matches = url.match(/^https?\:\/\/([^\/?#]+)(?:[\/?#]|$)/i);
        return matches[1];
    }
     
    chrome.webRequest.onBeforeRequest.addListener(function(details) { 
    var domain = extract_domain(details.url);
    return { cancel: AUTHORIZED_DOMAINS[domain ]===false }; 
    }, {urls: ["<all_urls>"]},["blocking"]);})();[/code:4yfay4o9]
imothep85's avatar

imothep85

Member since 12 Jun, 2011

Twitter
imothep85 has 4 followers

Trophy Case

  • 13-Year Club
  • Email Verified

Progress

14/44
How to earn trophies