Advertisement
Guest User

nothingtoseehere.js

a guest
Jan 1st, 2016
1,419
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var g_strBuffer = '';
  2. var g_bCapture = false;
  3.  
  4. jQuery( document ).ready(function( $ )
  5. {
  6.  
  7.     $( document ).keypress(function(e)
  8.     {
  9.  
  10.         if( e.key == "Enter" || e.keyCode == 13)
  11.         {
  12.             if( g_strBuffer.trim().toUpperCase() == 'SEARCH' )
  13.             {
  14.                 g_strBuffer == '';
  15.                 var strPassword = prompt();
  16.                 if( !strPassword )
  17.                 {
  18.                     return;
  19.                 }
  20.  
  21.                 $J.ajax({
  22.                     url: "http:\/\/store.steampowered.com\/actions\/clues",
  23.                     dataType: "json",
  24.                     cache: false,
  25.                     data: {key: strPassword}
  26.                 }).done(function( result ) {
  27.                     if( result && result.url )
  28.                         window.location = result.url;
  29.                     else if( result.response )
  30.                         alert(result.response);
  31.                 });
  32.             }
  33.             g_strBuffer = '';
  34.         }
  35.  
  36.         if( e.key )
  37.             g_strBuffer += e.key;
  38.         else if( e.charCode )
  39.             g_strBuffer += String.fromCharCode(e.charCode);
  40.  
  41.  
  42.     });
  43. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement