We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e441a61 commit abb63acCopy full SHA for abb63ac
src/chrome/content/code/ApplicableList.js
@@ -214,12 +214,14 @@ ApplicableList.prototype = {
214
215
add_command: function(rule) {
216
// basic validation for data to be added to xul
217
- if(!String(rule.id).match(/^[a-zA-Z_0-9]+$/))
+ var ruleId = String(rule.id);
218
+ if (!ruleId.match(/^[a-zA-Z_0-9]+$/)) {
219
return;
220
+ }
221
222
var command = this.document.getElementById("https-everywhere-menuitem-rule-toggle-template").cloneNode();
- command.setAttribute('id', rule.id+'-command');
- command.setAttribute('data-id', rule.id);
223
+ command.setAttribute('id', ruleId+'-command');
224
+ command.setAttribute('data-id', ruleId);
225
command.setAttribute('label', rule.name);
226
this.commandset.appendChild(command);
227
},
0 commit comments