diff --git a/chrome/content/modules/wzQuicktextGroup.jsm b/chrome/content/modules/wzQuicktextGroup.jsm
index 24dec31..bc37b3e 100644
--- a/chrome/content/modules/wzQuicktextGroup.jsm
+++ b/chrome/content/modules/wzQuicktextGroup.jsm
@@ -2,21 +2,20 @@ var EXPORTED_SYMBOLS = ["wzQuicktextGroup"];
const kDebug = true;
-function wzQuicktextGroup() {
- this.mName = "";
- this.mType = "";
-}
+class wzQuicktextGroup {
+ constructor() {
+ this.mName = "";
+ this.mType = "";
+ }
-wzQuicktextGroup.prototype = {
- get name() { return this.mName; },
+ get name() { return this.mName; }
set name(aName) { if (typeof aName != 'undefined') return this.mName = aName; }
-,
- get type() { return this.mType; },
+
+ get type() { return this.mType; }
set type(aType) { if (typeof aType != 'undefined') return this.mType = aType; }
-,
- clone: function()
- {
- var newGroup = new wzQuicktextGroup();
+
+ clone() {
+ let newGroup = new wzQuicktextGroup();
newGroup.name = this.mName;
newGroup.type = this.mType;
diff --git a/chrome/content/quicktext.js b/chrome/content/quicktext.js
index acf5a62..4066678 100644
--- a/chrome/content/quicktext.js
+++ b/chrome/content/quicktext.js
@@ -119,27 +119,14 @@ var quicktext = {
this.mKeywords = {};
// Update the toolbar
- var toolbar = document.getElementById("quicktext-toolbar");
+ var toolbar = document.getElementById("quicktext-templates-toolbar");
if (toolbar != null)
{
- //clear toolbar and store current "variables" and "other" menus (the two rightmost ones)
- var toolbarbuttonVar = null;
- var toolbarbuttonOther = null;
+ // Clear template toolbar.
var length = toolbar.children.length;
- for(var i = length-1; i >= 0; i--)
- {
- var element = toolbar.children[i];
- switch(element.getAttribute("id"))
- {
- case 'quicktext-variables':
- toolbarbuttonVar = element.cloneNode(true);
- break;
- case 'quicktext-other':
- toolbarbuttonOther = element.cloneNode(true);
- break;
- }
- toolbar.removeChild(element);
+ for(var i = length-1; i >= 0; i--) {
+ toolbar.removeChild(toolbar.children[i]);
}
//rebuild template groups (the leftmost entries)
@@ -211,16 +198,8 @@ var quicktext = {
}
}
- //add a flex spacer to push the VAR and OTHER elements to the right
- var spacer = document.createXULElement("spacer");
- spacer.setAttribute("flex", "1");
- toolbar.appendChild(spacer);
- toolbar.appendChild(toolbarbuttonVar);
- toolbar.appendChild(toolbarbuttonOther);
-
-
- // Update the toolbar inside the toolbarpalette and the drop-down menu - if used
- let optionalUI = ["button-quicktext", "quicktext-popup"];
+ // Update the template menu inside the context menu - if used.
+ let optionalUI = ["quicktext-popup"];
for (let a=0; a < optionalUI.length; a++) {
if (document.getElementById(optionalUI[a] + "-menupopup")) {
let rootElement = document.getElementById(optionalUI[a] + "-menupopup");
diff --git a/chrome/content/scripts/messengercompose.js b/chrome/content/scripts/messengercompose.js
index 028a910..7f29cb9 100644
--- a/chrome/content/scripts/messengercompose.js
+++ b/chrome/content/scripts/messengercompose.js
@@ -10,23 +10,28 @@ function onLoad(activatedWhileWindowOpen) {
WL.injectCSS("resource://quicktext/skin/quicktext.css");
WL.injectElements(`
-
-
-
-
+
+
+
+
-
+
+
+
+
- `,
+
+ `,
["chrome://quicktext/locale/quicktext.dtd"]);
window.quicktext.load();
diff --git a/chrome/skin/button.large.png b/chrome/skin/button.large.png
deleted file mode 100644
index bc2b2ef..0000000
Binary files a/chrome/skin/button.large.png and /dev/null differ
diff --git a/chrome/skin/button.small.png b/chrome/skin/button.small.png
deleted file mode 100644
index b359966..0000000
Binary files a/chrome/skin/button.small.png and /dev/null differ
diff --git a/chrome/skin/logo.png b/chrome/skin/logo.png
deleted file mode 100644
index ced65e5..0000000
Binary files a/chrome/skin/logo.png and /dev/null differ
diff --git a/chrome/skin/quicktext.css b/chrome/skin/quicktext.css
index 7174756..c581dd8 100644
--- a/chrome/skin/quicktext.css
+++ b/chrome/skin/quicktext.css
@@ -1,32 +1,5 @@
-#button-quicktext {
- list-style-image: url("resource://quicktext/skin/button.large.png");
- -moz-image-region: rect(0px 24px 24px 0px);
-}
-
-#button-quicktext:hover {
- -moz-image-region: rect(24px 24px 48px 0px);
-}
-
-#button-quicktext[disabled] {
- -moz-image-region: rect(48px 24px 72px 0px);
-}
-
-toolbar[iconsize="small"] #button-quicktext {
- list-style-image: url("resource://quicktext/skin/button.small.png");
- -moz-image-region: rect(0px 16px 16px 0px);
-}
-
-toolbar[iconsize="small"] #button-quicktext:hover {
- -moz-image-region: rect(16px 16px 32px 0px);
-}
-
-toolbar[iconsize="small"] #button-quicktext[disabled] {
- -moz-image-region: rect(32px 16px 48px 0px);
-}
-
.quicktext-icon {
- list-style-image: url("resource://quicktext/skin/button.small.png");
- -moz-image-region: rect(16px 16px 32px 0px);
+ list-style-image: url("resource://quicktext/skin/icon16.png");
}
dialog[OS=WINNT] legend.insideTab {