Skip to content

Commit 94ddbb1

Browse files
committed
Adds handling of ?dev=1 in URL for testing
1 parent 4803fde commit 94ddbb1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/mermaid.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
function create()
1111
{
1212
var value = document.getElementById('textarea').value;
13-
var link = 'https://www.draw.io/?create=' + encodeURIComponent(JSON.stringify({type: 'mermaid', data: value}));
13+
var prefix = (window.location.search == '?dev=1') ? 'https://test.draw.io/?dev=1&' : 'https://www.draw.io/?';
14+
var link = prefix + 'create=' + encodeURIComponent(JSON.stringify({type: 'mermaid', data: value}));
1415
document.getElementById('link').innerHTML = '<a href="' + link + '" target="_blank">Link</a>';
1516
window.open(link);
1617
};

0 commit comments

Comments
 (0)