~ubuntu-branches/debian/stretch/requestpolicy/stretch

« back to all changes in this revision

Viewing changes to content/ui/menu.js

  • Committer: Package Import Robot
  • Author(s): David Prévot, Martin Kimmerle, moshpirit, David Prévot
  • Date: 2016-06-27 08:31:55 UTC
  • mfrom: (1.2.6)
  • Revision ID: package-import@ubuntu.com-20160627083155-tql0njr1honmdz97
Tags: 1.0.0~beta12.2+dfsg-1
* Team upload

[ Martin Kimmerle ]
* [release] set version to 1.0.beta12.2

[ moshpirit ]
* Created Spanish translations (Spain)

[ David Prévot ]
* Update Standards-Version to 3.9.8
* Update copyright (years)

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
  const {utils: Cu} = Components;
29
29
 
30
30
  let {Services} = Cu.import("resource://gre/modules/Services.jsm", {});
31
 
  let {console} = Cu.import("resource://gre/modules/devtools/Console.jsm", {});
32
31
 
33
32
  let {ScriptLoader: {importModule}} = Cu.import(
34
33
      "chrome://rpcontinued/content/lib/script-loader.jsm", {});
35
34
 
 
35
  let {RPService2: {console}} = importModule("main/rp-service-2");
36
36
  let {Environment} = importModule("lib/environment");
37
37
  let {Logger} = importModule("lib/logger");
38
38
  let {Prefs} = importModule("models/prefs");
1070
1070
    return item;
1071
1071
  };
1072
1072
 
1073
 
  self._ruleDataPartToDisplayString = function(ruleDataPart) {
1074
 
    var str = "";
1075
 
    if (ruleDataPart.s) {
1076
 
      str += ruleDataPart.s + "://";
1077
 
    }
1078
 
    str += ruleDataPart.h || "*";
1079
 
    if (ruleDataPart.port) {
1080
 
      str += ":" + ruleDataPart.port;
1081
 
    }
1082
 
    // TODO: path
1083
 
    return str;
1084
 
  };
1085
 
 
1086
 
  self._ruleDataToFormatVariables = function(rawRule) {
1087
 
    var fmtVars = [];
1088
 
    if (rawRule.o) {
1089
 
      fmtVars.push(self._ruleDataPartToDisplayString(rawRule.o));
1090
 
    }
1091
 
    if (rawRule.d) {
1092
 
      fmtVars.push(self._ruleDataPartToDisplayString(rawRule.d));
1093
 
    }
1094
 
    return fmtVars;
1095
 
  };
1096
 
 
1097
1073
  self._addMenuItemRemoveAllowRule = function(list, rawRule,
1098
1074
      subscriptionOverride) {
1099
1075
    if (rawRule.o && rawRule.d) {