1
0
forked from GitHub/gf-core

Minibar: support for links to open a given grammar in the minibar

When you press the "i" or "More info" button for a grammar, the info now
includes a link that can be used by anyone to open this specific grammar in
the minibar.
This commit is contained in:
Thomas Hallgren
2019-08-21 14:27:56 +02:00
parent b77626b802
commit d1bb1de87f
2 changed files with 8 additions and 2 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ var minibar_options= {
try_google: true
}
if(/^\?\/tmp\//.test(location.search)) {
if(/^\?\/(tmp|grammars)\//.test(location.search)) {
var args=decodeURIComponent(location.search.substr(1)).split(" ")
if(args[0]) online_options.grammars_url=args[0];
if(args[1]) minibar_options.initial_grammar=args[1];