AnsweredAssumed Answered

Embedding Remind Widget into Canvas Page

Question asked by Christopher Baker on Sep 3, 2016
Latest reply on Jan 19, 2018 by Stefanie Sanders

I am trying to embed a Remind (formally Remind101) widget into a Canvas page. The HTML provided for the widget is:<script src="https://widgets.remind.com/iframe.js?token=692e4b9054320134651a0242ac110004"></script>

 

Apparently Canvas does not allow scripts. Last year I came to this community and found the following solution:

Embedding Remind Widget into Course Page

 

However, it does not work. It appears that the "old" Remind URL from last year is quite different from the "new" URL from today. Here is what I get when I follow that thread's instructions:

 

 

 

var iframe = document.createElement('iframe'),

  url = window.location.href.split('?')[0];

 

iframe.setAttribute('src', 'https://widgets.remind.com/692e4b9054320134651a0242ac110004?url=' + url);

iframe.setAttribute('id', 'remind101-widget-0');

iframe.setAttribute('class', 'remind101-messages');

iframe.setAttribute('scrolling', 'no');

iframe.setAttribute('frameBorder', '0');

iframe.setAttribute('allowtransparency', 'true');

iframe.style.cssText = 'border: 0;';

iframe.setAttribute('style', 'border: 0;');

iframe.setAttribute('title', 'Remind messages widget');

iframe.setAttribute('width', '100%');

iframe.setAttribute('height', '326px');

 

var scriptTags = document.getElementsByTagName('script');

 

for (var i = 0; i < scriptTags.length; i++) {

  var scriptTag = scriptTags[i],

  src = scriptTag.getAttribute('src');

 

  if (/token=692e4b9054320134651a0242ac110004/.test(src)) {

  scriptTag.parentNode.insertBefore(iframe, scriptTag);

  }

}

 

 

I would appreciate any help you could provide.

Thanks!

 

Chris Baker (Twitter @bakerhhhs)

Outcomes