Changeset 10025
- Timestamp:
- 04/21/08 00:34:47 (5 years ago)
- Location:
- websites/idavailability
- Files:
-
- 3 modified
-
idavailability.js (modified) (5 diffs)
-
index.html (modified) (1 diff)
-
style.css (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
websites/idavailability/idavailability.js
r10005 r10025 6 6 var totalCount = 0; 7 7 var count = 0; 8 var id = ''; 8 9 9 10 var ITEMS_URL = 'http://wedata.net/databases/idAvailability/items.json?callback=?'; … … 40 41 } 41 42 42 Site.prototype.show = function() {43 debug(this.name);44 }45 43 46 44 /* … … 52 50 var url = this.data.urlToCheck + id; 53 51 var self = this; 52 self.div.style.backgroundColor = '#bbb'; 54 53 55 54 $.get(RETRIEVER, {'url':url}, function(html) { … … 101 100 function checkId() { 102 101 availableCount = 0; 102 count = 0; 103 103 104 varid = document.forms[0]['id'].value;105 debug('checking ' + id + ' ...');104 id = document.forms[0]['id'].value; 105 debug('checking ' + id + ' from ' + totalCount + ' sites...'); 106 106 107 107 for (var i=0; i<items.length; i++) { … … 113 113 114 114 function updateResult() { 115 result.innerHTML = availableCount + '/' + items.length;115 //result.innerHTML = availableCount + '/' + items.length; 116 116 if (totalCount == count) { 117 debug('done.'); 117 debug('done.<br /> <span class="id">' + id + ' </span> ' + 118 'is <span class="availability">' + parseInt(100 * availableCount / items.length) + '</span>% available.'); 118 119 } 119 120 } -
websites/idavailability/index.html
r10005 r10025 21 21 </div> 22 22 <div id="main"> 23 <p>Check the availability of your ID for various sites.</p> 24 <form onsubmit="return checkId();"> 25 <label>ID: </label> 26 <input type="text" name="id" /> 27 <input type="button" value="check !" onclick="return checkId();" /> 28 </form> 23 <div id="input"> 24 <p>Check the availability of your ID for various sites.</p> 25 <form onsubmit="return checkId();"> 26 <label>ID: </label> 27 <input type="text" name="id" /> 28 <input type="button" value="check !" onclick="return checkId();" /> 29 </form> 30 </div> 29 31 <div id="out"></div> 30 32 <div id="result_out"> 31 <p>Results:32 33 <span id="result"></span> 33 </p>34 34 </div> 35 <p>Sites:</p> 35 <h2>Sites:</h2> 36 <p><span style="color:green; background-color:green"> </span> is available, and 37 <span style="color:red; background-color:red"> </span> has that ID already.</p> 36 38 <div id="sites"></div> 37 39 </div> -
websites/idavailability/style.css
r10005 r10025 22 22 } 23 23 24 div#input { 25 border-bottom: #036 solid 1px; 26 } 27 24 28 div.site { 25 background-color: # 999;29 background-color: #bbb; 26 30 color: #036; 27 31 clear: left; … … 55 59 } 56 60 */ 61 62 span.id { 63 font-size: 1.6em; 64 } 65 66 span.availability { 67 font-size: 1.8em; 68 }
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)