This commit is contained in:
Zack Rauen 2020-05-25 19:56:19 -04:00
parent 67e2023ce2
commit 4e4ea15742
5 changed files with 29 additions and 6 deletions

File diff suppressed because one or more lines are too long

2
js/main.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -306,6 +306,13 @@ export default new class V2_SettingsPanel {
render() {return this.props.children;}
}
const originalRender = ContentList.prototype.render;
Object.defineProperty(ContentList.prototype, "render", {
enumerable: false,
configurable: false,
set: function() {console.warn("Addon policy for plugins #5 https://github.com/rauenzi/BetterDiscordApp/wiki/Addon-Policies#plugins");},
get: () => originalRender
});
const list = type === "plugins" ? Object.values(bdplugins) : Object.values(bdthemes);
return BDV2.reactDom.render(BDV2.react.createElement(ContentList, {type, onChange: this.sideBarOnClick}, BDV2.react.createElement(CardList, {type, list})), this.root);
}

View File

@ -175,4 +175,12 @@ export default class CardList extends BDV2.reactComponent {
<Tools key="tools" />
</Scroller>;
}
}
}
const originalRender = CardList.prototype.render;
Object.defineProperty(CardList.prototype, "render", {
enumerable: false,
configurable: false,
set: function() {console.warn("Addon policy for plugins #5 https://github.com/rauenzi/BetterDiscordApp/wiki/Addon-Policies#plugins");},
get: () => originalRender
});

View File

@ -14,4 +14,12 @@ export default class BDErrorBoundary extends BDV2.reactComponent {
if (this.state.hasError) return BDV2.react.createElement("div", {className: "react-error"}, "Component Error");
return this.props.children;
}
}
}
const originalRender = BDErrorBoundary.prototype.render;
Object.defineProperty(BDErrorBoundary.prototype, "render", {
enumerable: false,
configurable: false,
set: function() {console.warn("Addon policy for plugins #5 https://github.com/rauenzi/BetterDiscordApp/wiki/Addon-Policies#plugins");},
get: () => originalRender
});