|
| 1 | +<!DOCTYPE HTML> |
| 2 | +<HTML> |
| 3 | +<HEAD><TITLE>URL Regex Generator</TITLE> |
| 4 | + <link rel="stylesheet" type="text/css" href="style/style.css"> |
| 5 | + <script src="script/clipboard.min.js"></script> |
| 6 | + <script src="https://code.jquery.com/jquery-1.3.2.js"></script> |
| 7 | + <link rel="shortcut icon" type="image/x-icon" href="images/catchpoint.ico" /> |
| 8 | +</HEAD> |
| 9 | +<BODY> |
| 10 | +<script> |
| 11 | + var clipboard = new Clipboard('#copy'); |
| 12 | +
|
| 13 | + clipboard.on('success', function(e) { |
| 14 | + console.log(e); |
| 15 | + }); |
| 16 | +
|
| 17 | + clipboard.on('error', function(e) { |
| 18 | + console.log(e); |
| 19 | + }); |
| 20 | +
|
| 21 | + $(document).ready(function(){ |
| 22 | + var counter = 2; |
| 23 | + |
| 24 | + $("#addButton").click(function () { |
| 25 | + if(counter>10){ |
| 26 | + alert("Only 10 textboxes allow"); |
| 27 | + return false; |
| 28 | + } |
| 29 | + var newTextBoxDiv = $(document.createElement('p')) |
| 30 | + .attr("id", 'TextBoxDiv' + counter); |
| 31 | + newTextBoxDiv.after().html('<input type="text" name="conStrInp' + counter + |
| 32 | + '" id="conversionString' + counter + '" value="" class="match_font" style="font-size: 12pt; height: 25px; width:800px;" >'); |
| 33 | + newTextBoxDiv.appendTo("#conStringDiv"); |
| 34 | + counter++; |
| 35 | + }); |
| 36 | +
|
| 37 | + $("#removeButton").click(function () { |
| 38 | + if(counter==1){ |
| 39 | + alert("No more textbox to remove"); |
| 40 | + return false; |
| 41 | + } |
| 42 | + counter--; |
| 43 | + $("#TextBoxDiv" + counter).remove(); |
| 44 | + }); |
| 45 | + }); |
| 46 | +</script> |
| 47 | +
|
| 48 | +<div id="topNav"> |
| 49 | + <img alt="logo" src="images/logo.png" height="34px" id="logo"> |
| 50 | +</div> |
| 51 | +<div> |
| 52 | + <div class="bittonCate"> |
| 53 | + Choose an option</br> |
| 54 | + <select name="matchPtn" id="matchPattern" class="ui dropdown"> |
| 55 | + <option value="nofilt">No filter selected</option> |
| 56 | + <option value="subdmn">Match any sub-domains</option> |
| 57 | + <option value="anypth">Match any path</option> |
| 58 | + <option value="subdmnpth">Match any sub-domain and path</option> |
| 59 | + <option value="host">Match this host</option> |
| 60 | + </select> |
| 61 | +
|
| 62 | + </div> |
| 63 | + </div> |
| 64 | + <div class="bittonCate"> |
| 65 | + <input type='checkbox' id='inverse' name='check' value='inverse' />Inverse the match |
| 66 | + </div> |
| 67 | + <div class="bittonCate"> |
| 68 | + Add textbox <input type='button' value='+' id='addButton' class='btnFormat' style="width:30px; height:30px;"> |
| 69 | + Remove textbox <input type='button' value='-' id='removeButton' class='btnFormat' style="width:30px; height:30px;"> |
| 70 | + </div> |
| 71 | + <div class="bittonCate"> |
| 72 | + <div id="conStringDiv"> |
| 73 | + <p id="conString"> |
| 74 | + <input type="text" id="conversionString" name="conStrInp" class="match_font" style="font-size: 12pt; height: 25px; width:800px;" /> |
| 75 | + <br> |
| 76 | + |
| 77 | + |
| 78 | + </p> |
| 79 | + </div> |
| 80 | + <p id="radioHolder"></p> |
| 81 | + |
| 82 | + <input type='submit' id ='convert' class='btnFormat' value='Convert' style="height: 40px" /> |
| 83 | + <input type='submit' id ='clear' class='btnFormat' value='Clear' style="height: 40px" /> |
| 84 | + </div> |
| 85 | + <div class="bittonCate" id="resultArea"> |
| 86 | +
|
| 87 | + <p id='resultString' class="resultStr"><label>Press convert to get the regular expression</label></p> |
| 88 | + <input type='submit' id ='copy' class='btnFormat' value='Copy to Clipboard' data-clipboard-action="copy" data-clipboard-target="label" /> |
| 89 | + |
| 90 | + </div> |
| 91 | +</div> |
| 92 | +<div> |
| 93 | +</div> |
| 94 | +
|
| 95 | +<script type="text/javascript" src="script/script.js"></script> |
| 96 | +<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> |
| 97 | +
|
| 98 | +</BODY> |
| 99 | +</HTML> |
0 commit comments