[PLUGIN] HTML | iFrame

From the Asset Store
Get ready to dive into a sea of endless excitement with "Dolphin Jump," the thrilling new game that puts you in control
  • it gives me an error i cant opent your capx file error in value not an expression hostname is not an expression or instance variable in iframe line 13, column 17 in event xml

  • Did you download the new version?

    Download - For compatibility error with old projects

  • yeah <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy"> now your last version works but still a problem, when i load the app i did this, added google.com at start

    IF the user is visiting an url i want to be blocked, then he is redirected to google.com this actually works with your example

    BUT what i need is to BLOCK acces to that specific url i dont want the user see the content <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

    also like i said if the visited url is for example http://www.bad1.com i want blocked, it works, and im redirected to google

    BUT if the url is http://www.bad1.com/something, the url is not more recognised and im not redirected to google.

    im going to send you a PM <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

    thanks for all your help <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

  • 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]
  • 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

  • Thanks for giving it a shot Nandynho... I'm not sure what the solution is - but you will be a complete hero if you can figure out how to force the size on Apple devices. It works perfectly on every other platform/format as it is now, but Apple are being horrid.

    Thanks!

    ~Sol

  • hope to see some news

  • imothep85 try 'On Go to URL' with 'iFrame.Host'.

    [quote:2vjazwn1]

    New Version 1.29 (Feb 26, 2017)

    • [+] On Go to URL *(triggered when a new page load starts).
    • [#] Get Host *(now returns only the hostname. eg: facebook, twitter, google...).

    Download - For compatibility error with old projects - CAPX

    SoldjahBoy sorry man I do not find any discussion about this.

    If you can give me some any discussion links about this to help me.

  • 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.

  • imothep85 it's a google search, I can not block something that is off limits.

    For you to block google search you must get what you typed, in this example 'cgtalk.com'.

    This value is inside the query represented by 'q' (https://www.google.com/search?...q=cgtalk.com...).

    tokenat(tokenat(iFrame.URL, 1, "&q="), 0, "&")
    ~~~ in some cases ~~~
    tokenat(tokenat(iFrame.URL, 1, "#q="), 0, "&")
    [/code:25ihmpzz]
    
    But it is very simple to break this barrier, search for: '[i]icgtalk.com[/i]'
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • can you give me a capx please i tried yesterday but without any result :s

  • Hello

    When use this plugin, i have this error:

    Please can you help me

  • imothep85 I do not recommend trying to do this, it's a google search. I've never seen any script that did something like that. It is very easy to get around any script, if put 'iFacebook' will return the same values as 'Facebook' but will not get caught by the restriction. But... CAPX

    jarsa this is a browser restriction in preview mode, I recommend using Node-Webkit to test. After exporting it will work very well. Good luck.

    [quote:2vr0w682]

    New version 1.30 (Mar 01, 2017)

    • [#] Function C2()

    Download - For compatibility error with old projects - CAPX

  • [quote:11bxu3x6]

    New version 1.31 (Mar 01, 2017)

    • [#] Revised

    Download - For compatibility error with old projects

  • 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

Jump to:
Active Users
There are 3 visitors browsing this topic (0 users and 3 guests)