generated from nhcarrigan/template
chore: backup configs
This commit is contained in:
@ -0,0 +1,17 @@
|
||||
import { apiInitializer } from "discourse/lib/api";
|
||||
|
||||
export default apiInitializer((api) => {
|
||||
const interval = setInterval(() => {
|
||||
const tree = document.querySelector("#tree-nation-offset-website");
|
||||
if (!tree) {
|
||||
console.log("DOM has not hydrated yet, cannot load TreeNation badge.");
|
||||
return;
|
||||
}
|
||||
TreeNationOffsetWebsite({
|
||||
code: "a17464e0cd351220",
|
||||
lang: "en",
|
||||
theme: "dark",
|
||||
}).render("#tree-nation-offset-website");
|
||||
clearInterval(interval);
|
||||
}, 1000);
|
||||
});
|
Reference in New Issue
Block a user