mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Remove scroll fixing from ui preview
This commit is contained in:
parent
a0a676c3e2
commit
cd21a4b699
@ -14,25 +14,7 @@
|
|||||||
<link rel="stylesheet" type="text/css" href="./app/css/debug.css">
|
<link rel="stylesheet" type="text/css" href="./app/css/debug.css">
|
||||||
<div id="design-container">
|
<div id="design-container">
|
||||||
<img id="design-img" src="./design/metamask_wfs_jan_13.png">
|
<img id="design-img" src="./design/metamask_wfs_jan_13.png">
|
||||||
<!-- persist scroll position on refresh -->
|
|
||||||
<script type="text/javascript">
|
|
||||||
var scrollElement = document.getElementById('design-container')
|
|
||||||
function getScrollPosition () {
|
|
||||||
var scrollTop = scrollElement.scrollTop, scrollLeft = scrollElement.scrollLeft
|
|
||||||
window.location.hash = 'scrollTop='+scrollTop+'&scrollLeft='+scrollLeft
|
|
||||||
}
|
|
||||||
window.onload = function () {
|
|
||||||
setInterval(getScrollPosition, 1000)
|
|
||||||
var hashLocation = window.location.hash.split('#')[1]
|
|
||||||
if (!hashLocation) return
|
|
||||||
var sections = hashLocation.split('&')
|
|
||||||
var scrollTop = sections[0].split('=')[1]
|
|
||||||
var scrollLeft = sections[1].split('=')[1]
|
|
||||||
scrollElement.scrollTop = scrollTop
|
|
||||||
scrollElement.scrollLeft = scrollLeft
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
Reference in New Issue
Block a user