Skip to content

Commit

Permalink
fix rise and shine, minor ui tweaks
Browse files Browse the repository at this point in the history
rohanb10 committed Oct 15, 2020
1 parent 8997d93 commit 766ca39
Showing 7 changed files with 18 additions and 14 deletions.
4 changes: 2 additions & 2 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -13,10 +13,10 @@ PRs and other ideas welcome.
## Changes ##

**October 2020**
#### 2.1.3
#### 2.2.0
- Keyboard Shortcuts
- Add setting to change default time for [monday, weekend, next-week, next-month] from morning to evening
- Bug fixes
- Bug fixes, minor UI adjustments

#### 2.1.2
- Change the Snoozz logo font (Slightly modified version of Bungee by [David Jonathan Ross](https://djr.com/))
6 changes: 3 additions & 3 deletions html/settings.html
Original file line number Diff line number Diff line change
@@ -136,9 +136,9 @@ <h4>Keyboard Shortcuts</h4>
</div>
<div class="input-container large">
<div>
<h4>Enable Snoozz in the right-click (context) menu</h4>
<p>The menu will only appear when click on a valid link.</p>
<p>You can select up to five choices</p>
<h4>Snoozz tabs using the right-click (context) menu</h4>
<p>The option will only appear when you click on a valid link/tab.</p>
<p>You may select up to five choices.</p>
</div>
<div id="contextMenu" class="choice-list">
<div><input type="checkbox" id="today-morning"><label for="today-morning">This Morning</label></div>
6 changes: 3 additions & 3 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
"name": "Snoozz - Snooze Tabs & Windows for later",
"short_name": "Snoozz",
"description": "Declutter your browser by snoozing tabs and windows for later, and have them automatically wake up when you actually need them.",
"version": "2.1.3",
"version": "2.2.0",

"icons": {
"128": "icons/ext-icon-128.png",
@@ -46,10 +46,10 @@
"monday": {
"description": "Snooze till next Monday"
},
"next-week": {
"week": {
"description": "Snooze till one week from now"
},
"next-month": {
"month": {
"description": "Snooze till one month from now"
}
}
4 changes: 2 additions & 2 deletions scripts/background.js
Original file line number Diff line number Diff line change
@@ -93,14 +93,14 @@ async function snoozeInBackground(item, tab) {

var snoozeTime = c && c.time;
if (!snoozeTime || c.disabled || dayjs().isAfter(dayjs(snoozeTime))) {
return createNotification(null, `Can't snoozz that :(`, 'icons/main-icon.png', 'The time you selected is invalid.');
return createNotification(null, `Can't snoozz that :(`, 'icons/main-icon.png', 'The time you have selected is invalid.');
}

var title = !isHref ? tab.title : item.linkText;
var icon = !isHref ? tab.favIconUrl : undefined;
var isPinned = !isHref && tab.pinned ? tab.pinned : undefined;
await snoozeTab(snoozeTime.valueOf(), Object.assign(item, {url: url, title: title, favIconUrl: icon, pinned: isPinned}));
var msg = `${getHostname(url)} will wake up at ${snoozeTime.format('h:mm a [on] ddd, D MMM')}.`
var msg = `${!isHref ? tab.title : getHostname(url)} will wake up at ${snoozeTime.format('h:mm a [on] ddd, D MMM')}.`
createNotification(snoozeTab.id, 'A new tab is now napping :)', 'icons/main-icon.png', msg, 'html/dashboard.html');
if (!isHref) chrome.tabs.remove(tab.id);
chrome.runtime.sendMessage({updateDash: true});
2 changes: 1 addition & 1 deletion scripts/rise.js
Original file line number Diff line number Diff line change
@@ -41,7 +41,7 @@ async function mapTabs() {
top.style.cursor = 'pointer';
top.addEventListener('click', _ => {
chrome.tabs.update(found.id, {active: true});
if (thisTab.id) chrome.runtime.sendMessage({closeTabInBg:true, tabId: thisTab.id});
if (thisTab.id) chrome.runtime.sendMessage({close: true, tabId: thisTab.id});
}, {once: true});
});
}
7 changes: 5 additions & 2 deletions styles/common.css
Original file line number Diff line number Diff line change
@@ -63,7 +63,9 @@ a {
color: #000;
}
a:hover {
border-bottom: 1px solid black;
background: linear-gradient(0deg, rgba(223,78,118,1) 0%, rgba(243,184,69,1) 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}

.settings, .dashboard {
@@ -98,7 +100,8 @@ a:hover {
opacity: 1;
}
.settings img:hover {
background-color: #000;
filter: grayscale(0);
background: linear-gradient(-90deg, rgba(223,78,118,1) 0%, rgba(243,184,69,1) 100%);
animation: spin 2.5s linear infinite;
}

3 changes: 2 additions & 1 deletion styles/settings.css
Original file line number Diff line number Diff line change
@@ -52,7 +52,7 @@ select {
appearance: none;
-moz-appearance: none;
-webkit-appearance: none;
background-image: url("data:image/svg+xml;utf8,<svg fill='black' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
background-repeat: no-repeat;
background-position-x: 100%;
background-position-y: center;
@@ -130,6 +130,7 @@ code {
background-color: #ddd;
border-radius: .25em;
padding: .1em .2em;
user-select: none;
}
.copied {
position: fixed;

0 comments on commit 766ca39

Please sign in to comment.