mirror of
https://github.com/stedolan/jq.git
synced 2024-05-11 05:55:39 +00:00
Copy over changes made to gh-pages directly
This includes the following commits from the gh-pages branch: -63e80b8
-d24a397
-9796cd6
-ee21707
-ccb0f1d
-200e6b3
-64134c0
-57152d2
-8ffbfa3
This commit is contained in:
2
docs/templates/index.liquid
vendored
2
docs/templates/index.liquid
vendored
@@ -27,7 +27,7 @@
|
||||
|
||||
<div class="btn-group" style="float:right">
|
||||
<a class="btn btn-primary" href="http://jqplay.org">
|
||||
Try online!
|
||||
Try online at jqplay.org!
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
11
docs/templates/manual.liquid
vendored
11
docs/templates/manual.liquid
vendored
@@ -35,6 +35,17 @@
|
||||
}
|
||||
});
|
||||
});
|
||||
// add "Run" button to execute examples on jqplay.org
|
||||
$(function() {
|
||||
$.each($('table.manual-example'), function(index, value) {
|
||||
$value = $(value)
|
||||
var j = $value.find('tr:nth-child(2) td:first').text();
|
||||
var q = $value.find('.jqprogram').text().replace(/^jq /, '').replace(/^'(.+)'$/, '$1');
|
||||
var url = 'https://jqplay.org/jq?q=' + encodeURIComponent(q) +'&j=' + encodeURIComponent(j)
|
||||
var $last_tr = $value.find('tr:last');
|
||||
$last_tr.after('<tr><th><a href="' + url + '" class="btn btn-primary btn-small">Run</a></th><th></th></tr><tr><th></th><th></th></tr>');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<input type="text"
|
||||
class="input-medium search-query"
|
||||
|
Reference in New Issue
Block a user