discourse/app/assets/javascripts/admin/components/disable-custom-stylesheets.js.es6

15 lines
342 B
Plaintext
Raw Normal View History

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