From 77a07b7f2b8d36fca5cb0ff10f1fbd1e2bce1e39 Mon Sep 17 00:00:00 2001 From: tophf Date: Sun, 26 Nov 2017 20:25:25 +0300 Subject: [PATCH] open editor on clicking anywhere in the cell; add hover effect --- manage/manage.css | 17 +++++++++++++++++ manage/manage.js | 4 ++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/manage/manage.css b/manage/manage.css index 1cc3087a..417aa588 100644 --- a/manage/manage.css +++ b/manage/manage.css @@ -262,6 +262,23 @@ summary { text-indent: -2em; padding-left: 3em; padding-right: 40px; + position: relative; + cursor: pointer; +} + +.newUI .entry .style-name:hover::before { + content: ""; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: linear-gradient(to right, hsla(180, 50%, 30%, 0.2), hsla(180, 20%, 10%, 0.05) 50%, transparent); + pointer-events: none; +} + +.newUI .style-name:hover .style-name-link { + color: hsla(180, 100%, 15%, 1); } .newUI .homepage .svg-icon { diff --git a/manage/manage.js b/manage/manage.js index 38f2092c..4165aa11 100644 --- a/manage/manage.js +++ b/manage/manage.js @@ -278,7 +278,7 @@ Object.assign(handleEvent, { ENTRY_ROUTES: { '.checker, .enable, .disable': 'toggle', - '.style-name-link': 'edit', + '.style-name': 'edit', '.homepage': 'external', '.check-update': 'check', '.update': 'update', @@ -331,7 +331,7 @@ Object.assign(handleEvent, { const openWindow = left && shift && !ctrl; const openBackgroundTab = (middle && !shift) || (left && ctrl && !shift); const openForegroundTab = (middle && shift) || (left && ctrl && shift); - const url = event.target.closest('[href]').href; + const url = $('[href]', event.target.closest('.entry')).href; if (openWindow || openBackgroundTab || openForegroundTab) { if (chrome.windows && openWindow) { chrome.windows.create(Object.assign(prefs.get('windowPosition'), {url}));