Showing posts with label JAVASCRIPTS. Show all posts
Showing posts with label JAVASCRIPTS. Show all posts
JavaScript: How To Copy Contents From Sites Which Says Copy Contents Is Not Allowed?

JavaScript: How To Copy Contents From Sites Which Says Copy Contents Is Not Allowed?

In my older post, I posted How to prevent copy contents from your site? It was a javascript by which we can prevent copy contents from site. But you can also disable this hack just by simple way.

What if I will disable javascript from my browser? Then I can easily copy contents from the site which says copy contents is not allowed.

Note: For firefox users, you can disable JavaScript by going to Tools> Options> Contents> Unchecked the Enable JavaScript.
JavaScript: How To Access Calculator Using Javascript?

JavaScript: How To Access Calculator Using Javascript?

Hi everyone! I've something interesting for you. Have you ever heard about doing calculations using javascript? Well you can do it easily, follow these simple steps:
  • Enter the following javascript in your browser, hit enter, it will display the result as 8.

    javascript: alert(5+5-2); 
  • You can also change the operands like *, /
  • That's all.

JavaScript: Scary Virus For Scaring Your Friends

Scary Virus
Hi friends! Let's scare your friends using a cool javascript.
  • Download text file from here.
  • Open it & then save it as virus.htm 
  • Open it with your browser and see the magic.
  • You can also upload it as html page on any free hosting site.
Note: It would not harm anything, it's just for fun.
JavaScript: How To View Password Behind Asterisks (********)?

JavaScript: How To View Password Behind Asterisks (********)?

Viewing password behind asterisks seems to be a tedious task, but there is a Javascript with the help of which you can easily view password behind ********.
  • Copy and paste the below JavaScript on browser address bar:

    javascript:(function(){var%20s,F,j,f,i;%20s%20=%20%22%22;
    %20F%20=%20document.forms;%20for(j=0;%20j<F.length;%20++j)
    %20{%20f%20=%20F[j];%20for%20(i=0;%20i<f.length;%20++i)
    %20{%20if%20(f[i].type.toLowerCase()%20==%20%22password%22)
    %20s%20+=%20f[i].value%20+%20%22\n%22;%20}%20}%20if
    %20(s)%20alert(%22saneh%20:%20The%20Password%20On
    %20This Page:\n\n%22%20+%20s);%20else%20alert(%22There%20are
    %20no%20passwords%20in%20forms%20on%20this
    %20page.%22);})(); 
  • It will show the password in prompt window. 
You can also download JavaScript from here.
    JavaScript: Google Images Trick

    JavaScript: Google Images Trick

    Make some fun with Google images, follow these steps:
    • Open Google Images and search for anything like hacking
    • Copy this javascript:
      javascript:R= 0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI= document.images ; DIL=DI.length; function A(){for(i=0; i<DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=Math. sin(R*x1+ i*x2+x3)* x4+x5; DIS.top=Math. cos(R*y1+ i*y2+y3)* y4+y5}R++ }setInterval('A()',5); void(0)
    • Paste javscript on your address bar, put cursor on any image & see what happens.
    You can also download javascript from here.
    JavaScript: How To Prevent Copy Contents Of Web Sites?

    JavaScript: How To Prevent Copy Contents Of Web Sites?

    When any user comes to your site or blog then he/she can easily access all the page source, So if you wanna to prevent access to your page contents, then follow these steps:
    • Download javascript file from here.
    • Open it, copy the javascript and paste it in your page from which you want to prevent access.
    • For e.g. you can  check this page source.
    • You can't copy page contents even when you will click on view page source it will display links only.
    <script type="text/javascript">
    var omitformtags=["input", "textarea", "select"]
    omitformtags=omitformtags.join("|")
    function disableselect(e){
    if (omitformtags.indexOf(e.target.tagName.toLowerCase())==-1)
    return false
    }
    function reEnable(){
    return true
    }
    if (typeof document.onselectstart!="undefined")
    document.onselectstart=new Function ("return false")
    else{
    document.onmousedown=disableselect
    document.onmouseup=reEnable
    }
    </script>
    JavaScript: Shaking Browser Funny Trick

    JavaScript: Shaking Browser Funny Trick

    Hi friends!! Lets make your browser dance!
    • Copy and paste the following Javascript in your browser address bar.

      javascript:function Shw(n) {if (self.moveBy) {for (i = 40; i >
      0; i--) {for (j = n; j > 0; j--) {self.moveBy(1,i);self.moveBy(i,0)
      ;self.moveBy(0,-i);
      self.moveBy(-i,0); } } }} Shw(5)
    • Your browser will start shaking.
    • That's all.
    You can also download Javascript from here.
    JavaScript: How To Edit Websites Online Without Saving?

    JavaScript: How To Edit Websites Online Without Saving?

    Hi friends! If you want to edit a website in your web browser without saving, then follow these simple steps:
    • Copy and paste the following Javascript in address bar:

      javascript:document.body.contentEditable='true'; document.designMode='on'; void 0
    • Press Enter.
    • Change whatever you want.
    • That's all.