Skip to content

Commit

Permalink
Use new silent API for error interception (#22)
Browse files Browse the repository at this point in the history
catch_alert message was replaced by silent parameter at [1]

This change fixes issue #19.

[1]: tyrasd/overpass-turbo@bd304a6
  • Loading branch information
irnc authored Sep 19, 2019
1 parent 884ff12 commit 34e352d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion themes/src/layouts/exercise/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ <h2>
</div>
</div>
<div class="docs-repl-result output">
<iframe src="http://overpass-turbo.eu/master/map.html" seamless="seamless" frameBorder="0">
<iframe src="http://overpass-turbo.eu/master/map.html?silent" seamless="seamless" frameBorder="0">
</iframe>
<textarea></textarea>
<a class="docs-repl-change-output button" href="#">Data</a>
Expand Down
4 changes: 2 additions & 2 deletions themes/src/layouts/shortcodes/docs_repl.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

<div class="docs-repl-result">
{{ if eq "=" (substr .Inner 0 1) }}
<iframe src="http://overpass-turbo.eu/master/map.html"
<iframe src="http://overpass-turbo.eu/master/map.html?silent"
{{ else }}
<iframe src="http://overpass-turbo.eu/master/map.html?Q={{ .Inner }}"
<iframe src="http://overpass-turbo.eu/master/map.html?silent&Q={{ .Inner }}"
{{ end }}
seamless="seamless"
frameBorder="0"
Expand Down
6 changes: 0 additions & 6 deletions themes/src/scripts/components/docs-repl.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,6 @@ module.exports = function(opts) {
//cache queries
iframe.onload = function() {
if(typeof(opts.onload) === "function") opts.onload();
window.setTimeout(function(){
postTo(iframe, 'catch_alert');
}, 100);

// set codemirror to default text
cm.setValue(code_sample['default']);
Expand All @@ -102,9 +99,6 @@ module.exports = function(opts) {
} else {
iframe.onload = function(){
if(typeof(opts.onload) === "function") opts.onload();
window.setTimeout(function(){
postTo(iframe, 'catch_alert');
}, 1000);
};
}

Expand Down

0 comments on commit 34e352d

Please sign in to comment.