add close button to sticky mode on desktop, make it disable sticky mode
This commit is contained in:
1 parent
faf34d7472
commit
f85d4b2fdc
1 file changed
+17
+17
@@ -635,6 +635,16 @@ function build_div_inner(text, result, moreText, index, first_of_many = false)
|
|||||||
close_button.style.padding = "initial";
|
close_button.style.padding = "initial";
|
||||||
buttons.appendChild(close_button);
|
buttons.appendChild(close_button);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
let close_button = document.createElement("img");
|
||||||
|
close_button.src = browser.extension.getURL("img/closebutton24.png");
|
||||||
|
close_button.onclick = manual_disable_sticky;
|
||||||
|
close_button.style.marginTop = "-3px";
|
||||||
|
close_button.style.display = "inline";
|
||||||
|
close_button.style.padding = "initial";
|
||||||
|
buttons.appendChild(close_button);
|
||||||
|
}
|
||||||
buttons.style.float = "right";
|
buttons.style.float = "right";
|
||||||
original.appendChild(buttons);
|
original.appendChild(buttons);
|
||||||
}
|
}
|
||||||
@@ -1377,6 +1387,13 @@ function manual_close()
|
|||||||
last_manual_interaction = Date.now();
|
last_manual_interaction = Date.now();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function manual_disable_sticky()
|
||||||
|
{
|
||||||
|
settings.sticky = false;
|
||||||
|
browser.storage.local.set({"sticky":false});
|
||||||
|
delete_div();
|
||||||
|
}
|
||||||
|
|
||||||
function lookup_cancel_force()
|
function lookup_cancel_force()
|
||||||
{
|
{
|
||||||
delete_div();
|
delete_div();
|
||||||
|
|||||||
Reference in new issue
Block a user