Merge branch 'pr/volatile-static/19' into bootstrap
This commit is contained in:
commit
b0b15adc2b
3
addon/chrome/content/zoteroPane.css
Normal file
3
addon/chrome/content/zoteroPane.css
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
.makeItRed {
|
||||||
|
background-color: tomato;
|
||||||
|
}
|
20
src/views.ts
20
src/views.ts
@ -19,10 +19,22 @@ class AddonViews extends AddonModule {
|
|||||||
// You can init the UI elements that
|
// You can init the UI elements that
|
||||||
// cannot be initialized with overlay.xul
|
// cannot be initialized with overlay.xul
|
||||||
this._Addon.toolkit.Tool.log("Initializing UI");
|
this._Addon.toolkit.Tool.log("Initializing UI");
|
||||||
/**
|
|
||||||
* Example: menu items starts
|
// register style sheet
|
||||||
*/
|
const styles = this._Addon.toolkit.UI.creatElementsFromJSON(document, {
|
||||||
const menuIcon = "chrome://addontemplate/content/icons/favicon@0.5x.png";
|
tag: "link",
|
||||||
|
directAttributes: {
|
||||||
|
type: "text/css",
|
||||||
|
rel: "stylesheet",
|
||||||
|
href: `chrome://${config.addonRef}/content/zoteroPane.css`,
|
||||||
|
},
|
||||||
|
}) as HTMLLinkElement;
|
||||||
|
document.documentElement.appendChild(styles);
|
||||||
|
document
|
||||||
|
.getElementById("zotero-item-pane-content")
|
||||||
|
?.classList.add("makeItRed");
|
||||||
|
|
||||||
|
const menuIcon = `chrome://${config.addonRef}/content/icons/favicon@0.5x.png`;
|
||||||
// item menuitem with icon
|
// item menuitem with icon
|
||||||
this._Addon.toolkit.UI.insertMenuItem("item", {
|
this._Addon.toolkit.UI.insertMenuItem("item", {
|
||||||
tag: "menuitem",
|
tag: "menuitem",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user