]> jfr.im git - irc/quakenet/qwebirc.git/blobdiff - js/ui/menuitems.js
iframes should not have borders -- breaks page layout
[irc/quakenet/qwebirc.git] / js / ui / menuitems.js
index 6ff3182b958231642390758a6615518df315ef45..cafd7a4651877da48c69f6f27db93c6a03a1e6db 100644 (file)
@@ -1,9 +1,10 @@
-qwebirc.ui.UI_COMMANDS = [
+qwebirc.ui.UI_COMMANDS_P1 = [
   ["Options", "options"],
-  ["Add webchat to your site", "embedded"],
-  ["Privacy policy", "privacy"],
+  ["Add webchat to your site", "embedded"]
+];
+
+qwebirc.ui.UI_COMMANDS_P2 = [
   ["Feedback", "feedback"],
-  ["Frequently asked questions", "faq"],
   ["About qwebirc", "about"]
 ];
 
@@ -32,6 +33,10 @@ qwebirc.ui.MENU_ITEMS = function() {
     return this.client.nickOnChanHasPrefix(nick, channel, "+");
   };
 
+  var isIgnored = function(nick) {
+    return this.client.isIgnored(nick);
+  };
+
   var invert = qwebirc.util.invertFn, compose = qwebirc.util.composeAnd;
   
   var command = function(cmd) {
@@ -78,6 +83,16 @@ qwebirc.ui.MENU_ITEMS = function() {
       text: "devoice",
       fn: command("devoice"),
       predicate: compose(isOpped, targetVoiced)
+    },
+    {
+      text: "ignore",
+      fn: command("ignore"),
+      predicate: invert(isIgnored)
+    },
+    {
+      text: "unignore",
+      fn: command("unignore"),
+      predicate: isIgnored
     }
   ];
 }();