diff --git a/frontend/api.js b/frontend/api.js
index 9e9efa2fcd9c0dc56932f19e99b520d89ac52473..dc868cc775f8a7441a959e656d8feb996ef6e128 100644
--- a/frontend/api.js
+++ b/frontend/api.js
@@ -16,6 +16,7 @@ var old_libs = null;
var old_include_builtins = -1;
var old_include_core = -1;
var old_include_apps = -1;
+var unfold_more_information = false;
// https://stackoverflow.com/a/4812022/1544337
Element.prototype.getCaretPosition = function() {
@@ -752,6 +753,13 @@ function getResults(str, libs, include_builtins, include_core, include_apps, pag
responsedata['suggestions'].length > 0) {
par.insertBefore(makeSuggestions(responsedata['suggestions']), par.firstChild);
}
+
+ if (unfold_more_information) {
+ var togglers = elem.getElementsByClassName('toggler');
+ for (var i=0; i' +
- 'Cloogle does not accept spaces in the input. ' +
- 'Did you mean to search for ' +
- '' + sug[0][1] + '
or ' +
- '' + sug[1][1] + '
?
';
- return;
+ unfold_more_information = true;
}
var libs = getLibs();
diff --git a/frontend/api.php b/frontend/api.php
index fec4a9b6148b276fde830466fdff4dcffa3f1a24..04b3c55c03816ca3a9ad3d2cf6f3370c01cf33aa 100644
--- a/frontend/api.php
+++ b/frontend/api.php
@@ -195,6 +195,8 @@ if ($_SERVER['REQUEST_METHOD'] !== 'GET'){
}
} elseif (substr($name, 0, 6) == 'class ') {
$command['className'] = substr($name, 6);
+ } elseif (substr($name, 0, 9) == 'instance ') {
+ $command['className'] = substr($name, 9);
} elseif (substr($name, 0, 5) == 'type ') {
$command['typeName'] = substr($name, 5);
} elseif ($name != '') {
diff --git a/frontend/common.js b/frontend/common.js
index 013ca01c8197e7329f9849edbd00dca5645dca4a..ed9e16f5267f4ada37f5b9af5116e08f201b63c4 100644
--- a/frontend/common.js
+++ b/frontend/common.js
@@ -91,9 +91,9 @@ function highlightCallback(span, cls, str) {
function highlightQuery(query) {
var highlighter = highlightClean;
- if (query == 'class' || query == 'type' || query == 'using') {
+ if (query == 'class' || query == 'instance' || query == 'type' || query == 'using') {
return '' + query + '';
- } else if (query.match(/^class\s/)) {
+ } else if (query.match(/^class\s/) || query.match(/^instance\s/)) {
highlighter = highlightClean;
} else if (query.match(/^type\s/)) {
highlighter = function(q) {
diff --git a/frontend/index.php b/frontend/index.php
index 0f6213e1b1e2fd865bc2aa6cf217383f75751dc6..b3407e32074a7ebcb71e2451a1a5dc5ee6af7301 100644
--- a/frontend/index.php
+++ b/frontend/index.php
@@ -107,11 +107,11 @@
type Maybe |
- The type definition of Maybe x |
+ Types with the exact name Maybe |
class Text |
- The class definition of Text |
+ Classes with the exact name Text |
Besides this web app, there are other frontends available.