Skip to content

Commit a754b19

Browse files
committed
make toolbar remember it's location
1 parent bc0a802 commit a754b19

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

injection/dragable.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function dragElement(elmnt) {
88
document.getElementById("h4c3r_header").onmousedown = dragMouseDown;
99
} else {
1010
// otherwise, move the DIV from anywhere inside the DIV:
11-
elmnt.onmousedown = dragMouseDown;
11+
// elmnt.onmousedown = dragMouseDown;
1212
}
1313

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

3840
function closeDragElement() {

0 commit comments

Comments
 (0)