plugins update, added explore plugins
This commit is contained in:
parent
a492209256
commit
ae4dbb4a9a
8 changed files with 140 additions and 20 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue