1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How Can I Block This Code

Discussion in 'HTML & Website Design' started by PinchHarmonic, Jul 27, 2013.

  1. #1
    Hi ! I have freewebhostingarea account how can ı block this ads code ? Thank you .

    <!-- Free Web Hosting Area Start -->
    <br><center><a target="_blank" href="http://www.freewebhostingarea.com"><img src="http://user99.freewebhostingarea.com/i/freehosting.png" border="0" width="88" height="15" alt="Free Web Hosting"></a></center>
    <script type="text/javascript" src="http://user99.freewebhostingarea.com/a/in728.js"></script>
    <script type="text/javascript" src="http://user99.freewebhostingarea.com/a/specoff.js"></script>
    <script type="text/javascript" src="http://user99.freewebhostingarea.com/a/in300.js"></script>
    <noscript><br><center><font color='#000000' face='Verdana' style='font-size: 11px; background-color:#FFFFFF'><a target='_blank' href='http://www.freewebhostingarea.com'><font color='#000000'>Free Web Hosting</font></a></font></center></noscript>
    <!-- Free Web Hosting Area End -->
    HTML:

     
    PinchHarmonic, Jul 27, 2013 IP
  2. PinchHarmonic

    PinchHarmonic Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #2
    Please ?
     
    PinchHarmonic, Jul 27, 2013 IP
  3. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #3
    If it's free, it would be unethical to block their ads. You don't want ads? Pay for the hosting.
     
    kk5st, Jul 27, 2013 IP
    malky66 likes this.
  4. PinchHarmonic

    PinchHarmonic Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #4
    ohh thanks
     
    PinchHarmonic, Jul 27, 2013 IP
  5. Mike Carroll

    Mike Carroll Greenhorn

    Messages:
    89
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    8
    #5
    Yea I second that. I originally thought you wanted help with <div>s but if you are trying to remove ads from your site that are not your own, then pay for your hosting next time.
     
    Mike Carroll, Jul 28, 2013 IP
  6. DrShirts

    DrShirts Peon

    Messages:
    28
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    1
    #6
    Im posting this only because its a REALLY REALLY REALLY OUT OF THE BOX way of doing it!

    Most js ads use document.write to do their "dirty work" sooo
    Overload document.write so it doesnt work let them!

    Pritty cool code by Frank Something or another

    PS: Pay for your hosting!!! They will catch you using this and they will punish you for it! hosting is CHEAP!

    var domWrite = (function(){         
    // private
     
    var dw = document.write,              // save document.write()
              myCalls = [],                // contains all outstanding Scripts
              t = '';                      // timeout
     
    function startnext(){                // start next call in pipeline
      if ( myCalls.length > 0 ) {
      if ( Object.watch ) console.log( 'next is '+myCalls[0].f.toString() );
      myCalls[0].startCall();
      }
      }
     
    function evals( pCall ){            // eval embedded script tags in HTML code
      var scripts = [],
          script,
          regexp = /<script[^>]*>([\s\S]*?)<\/script>/gi;
      while ((script = regexp.exec(pCall.buf))) scripts.push(script[1]);
      scripts = scripts.join('\n');
      if (scripts) {
      eval(scripts);
      }
      }
     
    function finishCall( pCall ){
      pCall.e.innerHTML = pCall.buf;            // write output to element
      evals( pCall );
      document.write=dw;                        // restore document.write()
      myCalls.shift();
      window.setTimeout( startnext, 50 );
      }
     
    function testDone( pCall ){
      var myCall = pCall;
      return function(){
        if ( myCall.buf !== myCall.oldbuf ){
        myCall.oldbuf = myCall.buf;
        t=window.setTimeout( testDone( myCall ), myCall.ms );
        }
        else {
        finishCall( myCall );
        }
        }
      }
     
    function MyCall( pDiv, pSrc, pFunc ){                    // Class
      this.e = ( typeof pDiv == 'string' ?
                document.getElementById( pDiv ) :
                pDiv ),                    // the div element
      this.f = pFunc || function(){},
      this.stat = 0,                        // 0=idle, 1=waiting, 2=running, 3=finished
      this.src = pSrc,                      // script source address
      this.buf = '',                        // output string buffer
      this.oldbuf = '',                      // compare buffer
      this.ms = 100,                        // milliseconds
      this.scripttag;                        // the script tag
      }
     
    MyCall.prototype={
      startCall: function(){
      this.f.apply( window );                // execute settings function
      this.stat=1;
      var that = this;                            // status = waiting
      document.write = (function(){
        var o=that,
            cb=testDone( o ),
            t;
        return function( pString ){            // overload document.write()
        window.clearTimeout( t );
        o.stat=2;                            // status = running
        window.clearTimeout(t);
        o.oldbuf = o.buf;
        o.buf += pString;                    // add string to buffer
        t=window.setTimeout( cb, o.ms );
        };
        })();
      var s=document.createElement('script');
      s.setAttribute('language','javascript');
      s.setAttribute('type','text/javascript');
      s.setAttribute('src', this.src);
      document.getElementsByTagName('head')[0].appendChild(s);
      }
      }
     
    return function( pDiv, pSrc, pFunc ){  // public
      var c = new MyCall( pDiv, pSrc, pFunc );
      myCalls.push( c );
      if ( myCalls.length === 1 ){
      startnext();
      }
      }
    })();
    Code (markup):
     
    DrShirts, Jul 30, 2013 IP
  7. vwtom

    vwtom Greenhorn

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #7
    Agree with all - they needs to ads to "pay" for your hosting.

    What is your domain so I can see the ads on the site.
     
    vwtom, Jul 31, 2013 IP