Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 /** | |
|
lushnikov
2014/08/06 11:25:18
LICENSE is missing
semeny
2014/08/06 17:17:30
Done.
| |
| 2 * @constructor | |
| 3 */ | |
| 4 WebInspector.DocumentationURLFormer = function() {} | |
|
lushnikov
2014/08/06 11:25:18
DocumentationURLProvider?
semeny
2014/08/06 17:17:29
Done.
| |
| 5 | |
| 6 WebInspector.DocumentationURLFormer.prototype = { | |
| 7 /** | |
| 8 * @param {string} searchTerm | |
| 9 * @return {string} | |
| 10 */ | |
| 11 formItemPath: function(searchTerm) | |
| 12 { | |
| 13 for (var i = 0; i < this._Sources.length; i++) { | |
|
lushnikov
2014/08/06 11:25:17
Our codestyle requires ++i
semeny
2014/08/06 17:17:29
Done.
| |
| 14 var source = this._Sources[i].source; | |
| 15 var url = this._Sources[i].url; | |
| 16 if (source[searchTerm] instanceof Function) | |
| 17 return "http://docs.webplatform.org/w/api.php?action=query&title s=" + url | |
|
lushnikov
2014/08/06 11:25:18
use String.sprintf
semeny
2014/08/06 17:17:29
Done.
| |
| 18 + searchTerm + "&prop=revisions&rvprop=timestamp|content& format=json"; | |
| 19 } | |
| 20 return "NONE"; | |
|
lushnikov
2014/08/06 11:25:17
return null;
semeny
2014/08/06 17:17:29
Done.
| |
| 21 }, | |
| 22 | |
| 23 _Sources: [ | |
|
lushnikov
2014/08/06 11:25:17
This should be a field on WebInspector.Documentati
semeny
2014/08/06 17:17:30
Done.
| |
| 24 {source: window, url: "javascript/"}, | |
| 25 {source: window.Node.prototype, url: "dom/Node/"}, | |
| 26 {source: window.Object, url: "javascript/Object/"}, | |
| 27 {source: window.Math, url: "javascript/Math/"}, | |
| 28 {source: window.Array, url: "javascript/Array/"}, | |
| 29 {source: window.String, url: "javascript/String/"}, | |
| 30 {source: window.Date, url: "javascript/Date/"}, | |
| 31 {source: window.JSON, url: "javascript/JSON/"} | |
| 32 ] | |
| 33 } | |
| OLD | NEW |