Skip to content

Commit

Permalink
make toolbar remember it's location
Browse files Browse the repository at this point in the history
  • Loading branch information
4nkitd committed Apr 1, 2021
1 parent bc0a802 commit a754b19
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion injection/dragable.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function dragElement(elmnt) {
document.getElementById("h4c3r_header").onmousedown = dragMouseDown;
} else {
// otherwise, move the DIV from anywhere inside the DIV:
elmnt.onmousedown = dragMouseDown;
// elmnt.onmousedown = dragMouseDown;
}

function dragMouseDown(e) {
Expand All @@ -33,6 +33,8 @@ function dragElement(elmnt) {
// set the element's new position:
elmnt.style.top = (elmnt.offsetTop - pos2) + "px";
elmnt.style.left = (elmnt.offsetLeft - pos1) + "px";
localStorage.setItem('h4ck3r_position_top', elmnt.style.top)
localStorage.setItem('h4ck3r_position_bottom', elmnt.style.left)
}

function closeDragElement() {
Expand Down

0 comments on commit a754b19

Please sign in to comment.