diff --git a/css/app.css b/css/app.css index 6a05e4c..c3fba43 100644 --- a/css/app.css +++ b/css/app.css @@ -3,15 +3,15 @@ body { background-position: center; background-repeat: no-repeat; background-size: cover; + background-attachment: fixed; font: 1.0em Arial, sans-serif; padding: 0; margin: 0; } .app-container { - padding: 0; + padding: 0 0 20px; transition: margin 500ms, padding 500ms; - height: 100vh; } ::-webkit-scrollbar { diff --git a/css/content.css b/css/content.css index 7fb72a2..3406768 100644 --- a/css/content.css +++ b/css/content.css @@ -47,11 +47,11 @@ border: 1px solid #fff; box-sizing: border-box; filter: drop-shadow(0px 0px 1px #000); - animation: 0.5s ease 0s normal forwards 1 fadein; + animation: 0.1s ease 0s normal forwards 1 fadein; } .grid-item:hover .grid-item-inside-add-img{ - animation: 0.5s ease 0s normal forwards 1 fadein; + animation: 0.1s ease 0s normal forwards 1 fadein; opacity: 1; } diff --git a/js/app.js b/js/app.js index bdefd7e..71abc73 100644 --- a/js/app.js +++ b/js/app.js @@ -33,6 +33,10 @@ document.addEventListener("DOMContentLoaded", () => { initClock() }) +document.addEventListener('scroll', function (event) { + hideAllRightClick() +}, true) + window.addEventListener('resize', () => { beautyfyView() }) @@ -45,6 +49,7 @@ $(document).on('keyup',function(e) { if(e.key === "Escape") { closeSettings() deleteEditPopup() + hideAllRightClick() deleteRootElementTree() } if ($('#edit_popup').attr('data-status') === 'closed'){ diff --git a/js/links-func.js b/js/links-func.js index 759fad3..534acbb 100644 --- a/js/links-func.js +++ b/js/links-func.js @@ -31,6 +31,7 @@ function getOpenLink(link) { } function openLink(open_link, newtab='auto') { + hideAllRightClick() open_link = getOpenLink(open_link) if (varDefined(open_link)) { if (newtab === 'auto') diff --git a/js/right-click-menu.js b/js/right-click-menu.js index e9df95c..f1302da 100644 --- a/js/right-click-menu.js +++ b/js/right-click-menu.js @@ -17,7 +17,7 @@ function LinkRightClick(what_to_attach) { e.stopPropagation() hideAllRightClick() let link = $(this).attr('link').toString() - $('#click-menu-bottom-menu').css({top: e.pageY + 'px', left: e.pageX + 'px'}).show(100) + $('#click-menu-bottom-menu').css({top: e.clientY + 'px', left: e.clientX + 'px'}).show(100) $('.click-menu-row').off('click').on('click', {param1: 'link'}, function (e) { e.stopPropagation() hideAllRightClick() @@ -39,10 +39,10 @@ function gridItemRightClick() { let link = $(this).find('.grid-item-inside').attr('link').toString() if($(this).find('.empty-icon').length !== 0){ - $('#click-menu-grid-item-edit').css({top: e.pageY + 'px', left: e.pageX + 'px'}).show(100) + $('#click-menu-grid-item-edit').css({top: e.clientY + 'px', left: e.clientX + 'px'}).show(100) } else { - $('#click-menu-grid-item').css({top: e.pageY + 'px', left: e.pageX + 'px'}).show(100) + $('#click-menu-grid-item').css({top: e.clientY + 'px', left: e.clientX + 'px'}).show(100) } $('.click-menu-row').off('click').on('click', {param1: 'link', param2:'id'}, function (e) { diff --git a/manifest.json b/manifest.json index f3084e8..59d35fb 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "name": "Pulchra bookmarks", "description": "Pulchra bookmarks extension", - "version": "0.8.5", + "version": "0.9.0", "manifest_version": 3, "minimum_chrome_version": "96", "chrome_url_overrides": {