discourse/app/assets/javascripts/admin/views/admin.js.es6

13 lines
386 B
Plaintext
Raw Normal View History

2015-02-21 01:21:19 +08:00
export default Discourse.View.extend({
_disableCustomStylesheets: function() {
if (this.session.get("disableCustomCSS")) {
$("link.custom-css").attr("rel", "");
this.session.set("disableCustomCSS", false);
}
2015-02-21 01:21:19 +08:00
}.on("willInsertElement"),
2015-02-21 01:18:25 +08:00
2015-02-21 01:21:19 +08:00
_enableCustomStylesheets: function() {
$("link.custom-css").attr("rel", "stylesheet");
}.on("willDestroyElement")
2015-02-21 01:18:25 +08:00
});