plugins update, added explore plugins

This commit is contained in:
booploops 2022-03-08 17:10:36 -08:00
parent a492209256
commit ae4dbb4a9a
8 changed files with 140 additions and 20 deletions

View file

@ -10,6 +10,22 @@ const CiderFrontAPI = {
AddMenuEntry(entry) {
app.pluginMenuEntries.push(entry)
app.pluginInstalled = true
},
StyleSheets: {
Add(href) {
console.log("Adding stylesheet: " + href)
let id = uuidv4()
let link = document.createElement("link")
link.rel = "stylesheet/less"
link.type = "text/css"
link.href = href
link.setAttribute("css-id", id)
// insert the link before document.querySelector("#userTheme") in head
document.querySelector("head").insertBefore(link, document.querySelector("#userTheme"))
less.registerStylesheetsImmediately()
less.refresh(true, true, true)
return link
}
}
}