igogiko

HF PM

May 21st, 2014
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 2.23 KB | None | 0 0
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4.   <meta charset="utf-8">
  5.  
  6.   <title>Hackforums PM Link Generator</title>
  7.   <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
  8.  
  9.   <!-- JavaScript -->
  10.   <script>
  11.   $(document).ready(function() {
  12.     // Init
  13.     $("#link").val("http://www.hackforums.net/private.php?action=send&uid=&subject=&message=");
  14.  
  15.     $("#userid, #subject, #message").on("input", function() {
  16.       var userid = encodeURIComponent($("#userid").val().trim());
  17.       var subject = encodeURIComponent($("#subject").val());
  18.       var message = encodeURIComponent($("#message").val());
  19.      
  20.       var url = "http://www.hackforums.net/private.php?action=send&uid=" + userid + "&subject=" + subject + "&message=" + message;
  21.       $("#link").val(url);
  22.     });
  23.  
  24.     // Highlight text when hovered, thx MineSQL
  25.     $("#link").mouseover(function() {
  26.       $(this).select();
  27.     });
  28.   });
  29.   </script>
  30.  
  31.   <!-- Style -->
  32.   <style type="text/css">
  33.   body {
  34.     background: #222;
  35.     font-family: "Lucida Grande", Tahoma, Arial, Verdana, sans-serif;
  36.     font-size: 13px;
  37.   }
  38.  
  39.   h2 {
  40.         clear:left;
  41.     font-size:160%;
  42.     font-weight:400;
  43.     margin:0 0 3px;
  44.   }
  45.  
  46.   hr {
  47.     border: none;
  48.     border-bottom: 1px dotted #ccc;
  49.     margin-top: 10px;
  50.     margin-bottom: 10px;
  51.   }
  52.  
  53.   textarea {
  54.     width: 400px;
  55.     height: 120px;
  56.   }
  57.  
  58.   #container {
  59.     background: #fff;
  60.     border-top: 40px solid #444;
  61.     margin-left: auto;
  62.     margin-right: auto;
  63.     margin-top: 20px;
  64.     padding: 20px;
  65.     width: 600px;
  66.   }
  67.  
  68.   #controls {
  69.     padding: 5px;
  70.   }
  71.  
  72.   #link {
  73.     height: 30px;
  74.     text-align: center;
  75.     width: 100%;
  76.   }
  77.   </style>
  78.  
  79. </head>
  80. <body>
  81.  
  82. <div id="container">
  83.   <h2>Hackforums PM Link Generator</h2>
  84.   A web based HackForums PM Link Generator.
  85.  
  86.   <hr>
  87.  
  88.   <div id="controls">
  89.   <b>Hackforums UserID</b><br>
  90.     <input type="text" id="userid"></input><br><br>
  91.    
  92.     <b>Subject</b><br>
  93.     <input type="text" id="subject"></input><br><br>
  94.    
  95.     <b>Message</b><br>
  96.     <textarea id="message"></textarea>
  97.    
  98.     <hr>
  99.    
  100.     <input type="text" id="link" readonly>
  101.   </div>
  102. </div>
  103.  
  104. </body>
  105. </html>
Advertisement
Add Comment
Please, Sign In to add comment