Commit 9433f84
authored
Code now reflects newer versions of browser.menus API (#523)
* Extension now is up-to-date with the Menus API
In the previous version of this extension, the author used a comment to
explain that the `browser.menus.onClicked.addListener` event listener
doesn't pass the current check state of a checkbox menu.
To solve this, an additional variable checkedState was used to keep
track of the current value of the context menu.
But now, this function is supported by the menus API in Firefox.
I changed the code to reflect how you would use it with the recent
versions, making it easier for new developers to learn this
functionality.
* Comment now reflects new function body1 parent a2da599 commit 9433f84
File tree
1 file changed
+4
-12
lines changed1 file changed
+4
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
81 | | - | |
82 | 80 | | |
83 | 81 | | |
84 | 82 | | |
85 | 83 | | |
86 | 84 | | |
87 | | - | |
| 85 | + | |
88 | 86 | | |
89 | 87 | | |
90 | 88 | | |
| |||
116 | 114 | | |
117 | 115 | | |
118 | 116 | | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
| 117 | + | |
125 | 118 | | |
126 | | - | |
127 | | - | |
| 119 | + | |
128 | 120 | | |
129 | 121 | | |
130 | 122 | | |
| |||
156 | 148 | | |
157 | 149 | | |
158 | 150 | | |
159 | | - | |
| 151 | + | |
160 | 152 | | |
161 | 153 | | |
162 | 154 | | |
| |||
0 commit comments