We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9ee6c9d commit 43abeebCopy full SHA for 43abeeb
static/index.js
@@ -12,7 +12,8 @@ function selectText(containerid) {
12
}
13
14
$(function() {
15
- var FORCE_HTTPS = true;
+ var FORCE_HTTPS = false;
16
+ var FORCE_PROTOCOL_RELATIVE = true;
17
var widgetURL = p5Widget.url;
18
var simplifyHtml = function(html) {
19
// This will convert e.g. data-autoplay="", which is how browsers
@@ -23,6 +24,8 @@ $(function() {
23
24
25
if (FORCE_HTTPS) {
26
widgetURL = widgetURL.replace('http:', 'https:');
27
+ } else if (FORCE_PROTOCOL_RELATIVE) {
28
+ widgetURL = widgetURL.replace(/^https?:/, '');
29
30
31
$("#script-tag-example").text('<script src="' + widgetURL + '"></script>');
0 commit comments