mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-03 12:06:31 +02:00
Added button to open options page from pageAction popup
This commit is contained in:
parent
e9fe20d966
commit
a85ea32a74
6 changed files with 137 additions and 10 deletions
|
@ -36,7 +36,7 @@
|
|||
}();
|
||||
|
||||
|
||||
scope.createActionButtons = function createActionButtons(container, actions, data){
|
||||
scope.createActionButtons = function createActionButtons(container, actions, data, horizontal){
|
||||
actions.forEach(function(action, i){
|
||||
var button = document.createElement("button");
|
||||
button.className = action.name + " action";
|
||||
|
@ -52,7 +52,7 @@
|
|||
}
|
||||
button.addEventListener("click", action.callback.bind(undefined, data));
|
||||
container.appendChild(button);
|
||||
if (i % 3 === 2){
|
||||
if (horizontal || i % 3 === 2){
|
||||
container.appendChild(document.createElement("br"));
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue