fix reloading plugin pages

This commit is contained in:
Luke Pulverenti 2016-03-18 02:52:47 -04:00
parent 5f9f5f3ccf
commit 37927a9a1a

View File

@ -102,8 +102,16 @@ define([], function () {
}
}
function replaceAll(str, find, replace) {
return str.split(find).join(replace);
}
function parseHtml(html) {
html = replaceAll(html, '<!--<script', '<script');
html = replaceAll(html, '</script>-->', '</script>');
var wrapper = document.createElement('div');
wrapper.innerHTML = html;
return wrapper.querySelector('div[data-role="page"]');