Friday 1 August 2014

Remove Auto-Generated advertisement script appended to the results returned by ajax requests (Web hosting by Somee.com)

Remove Auto-Generated advertisement script appended to the results returned by ajax requests


OR

Removing or hiding javascript from a page using Javascript

Or
How to Remove Generated Script from somee.com

I have hosted my Site on somee.com.
I have used JQuery to send ajax requests.
On every ajax request the returned result is appended with the below text.
"<!--SCRIPT GENERATED BY SERVER! PLEASE REMOVE--> 
<center><a href="http://somee.com">Web hosting by Somee.com</a></center> </textarea>
</xml></script></noframes></noscript></object></layer></style></title></applet> 
<script language="JavaScript" 
src="http://ads.mgmt.somee.com/serveimages/ad2/WholeInsert4.js"></script>
<!--SCRIPT GENERATED BY SERVER! PLEASE REMOVE-->"
SO How to Resolve it .....

To Resolve Just Write the following Script

    <script>
        $(document).ready(function () {
            $("div[style='opacity: 0.9; z-index: 2147483647; position: fixed; left: 0px; bottom: 0px; height: 65px; right: 0px; display: block; width: 100%; background-color: #202020; margin: 0px; padding: 0px;']").remove();
            $("div[style='margin: 0px; padding: 0px; left: 0px; width: 100%; height: 65px; right: 0px; bottom: 0px; display: block; position: fixed; z-index: 2147483647; opacity: 0.9; background-color: rgb(32, 32, 32);']").remove();
            $("div[onmouseover='S_ssac();']").remove();
            $("center").remove();
        });
</script>


Thats It ;)



4 comments:

  1. hi i have an doubt my adsense ac disapproved because auto ganaratad page how i can rewove it

    ReplyDelete
  2. Brother its Working Fine. But Some Important Content and images not displaying. What to do.

    ReplyDelete
  3. Where should I write that script.

    ReplyDelete
  4. It worked like charm :) keep posting. For future readers there is one more line to added to remove white space at bottom.
    $("div[style='height: 65px;']").remove();

    ReplyDelete