This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/views/html_view.js

16 lines
357 B
JavaScript

Discourse.HtmlView = Ember.View.extend({
render: function(buffer) {
var key = this.get("key"),
noscript = $("noscript").text();
if (noscript.length) {
var regexp = new RegExp("<!-- " + key + ": -->((?:.|[\\n\\r])*)<!-- :" + key + " -->"),
content = noscript.match(regexp)[1];
buffer.push(content);
}
}
});