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 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Aug 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Unload - block Js in a remote iframe

    hi guys,

    i have found this, http://cricfree.sx/update/skycalcio.php and i want to put in mywebsite as iframe.
    Is there a way to unload the ads that are over the player ? Using js i think, or in other way...

    Anyone can suggest me how in js with a real sample?

    Thanks

  • #2
    Regular Coder
    Join Date
    Jan 2013
    Location
    Sunnyvale, CA
    Posts
    136
    Thanks
    10
    Thanked 7 Times in 7 Posts
    You generally have limited control over video streams in javascript. Stripping content, such as advertisements, from such a stream will require parsing the stream on a server, saving it as a native stream, and then sending it out upon client requests, well beyond basic HTML and browser-sandboxed scripting.

  • #3
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,642
    Thanks
    0
    Thanked 649 Times in 639 Posts
    To have any control at all over a remote iframe the code in the iframe must be set up to allow remote JavaScript communication. You can send a message from the script on one domain and listen for it from the script on the other domain but if the remote script doesn't listen for messages then trying to send it messages will not work.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #4
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Location
    Urbana
    Posts
    4,444
    Thanks
    11
    Thanked 598 Times in 578 Posts
    if the page uses flash for video an js for ads, you could stop it, but it uses js for everything so you're hosed. your description likely violates a TOS or two anyway...
    my site (updated 2014/10/20)
    BROWSER STATS [% share] (2014/9/03) IE7:0.1, IE8:4.3, IE11:9.2, IE9:2.7, IE10:2.6, FF:16.8, CH:47.5, SF:7.8, NON-MOUSE:37%


  •  

    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
    •