Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 4 additions & 13 deletions src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "Pin tabs - Tab Manager",
"short_name": "Keep tabs history",
"version": "1.3.1",
"version": "1.3.3",
"description": "Pin Tabs allows the user to pin one or more tabs for short periods, keep track of the expired tabs in the history and save energy",
"browser_action": {
"default_title": "Show the list of pinned tabs",
Expand All @@ -16,23 +16,14 @@
{
"matches": ["<all_urls>"],
"js": ["pages/index.js"],
"run_at": "document_end",
"exclude_matches": ["https://www.youtube.com/*"]
"run_at": "document_end"
}
],
"permissions": [
"tabs",
"activeTab",
"http://*/*",
"https://*/*",
"storage",
"alarms"
],
"permissions": ["activeTab", "alarms"],
"minimum_chrome_version": "60",
"icons": {
"16": "assets/list.png",
"48": "assets/list.png",
"128": "assets/list128.png"
},
"content_security_policy": "script-src 'self' https://ssl.google-analytics.com; object-src 'self'"
}
}
2 changes: 1 addition & 1 deletion src/pages/content/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
border-radius: 100%;
background-color: #33c3f0;
cursor: pointer;
z-index: 99999;
z-index: 9999999;
}

.hidden {
Expand Down
31 changes: 14 additions & 17 deletions src/pages/popup/Dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
deleteAllBookmark,
deleteOneBookmark,
addBookmark,
addFromButton
addFromButton,
} from "../background/actions";
import "./dashboard.css";
import ListView from "./ListView.js";
Expand All @@ -21,10 +21,10 @@ class Dashboard extends React.Component {

saveBookmark() {
return new Promise((resolved, rejected) => {
chrome.tabs.query({ active: true, lastFocusedWindow: true }, data => {
chrome.tabs.query({ active: true, lastFocusedWindow: true }, (data) => {
resolved(data);
});
}).then(link => {
}).then((link) => {
if (!link[0].favIconUrl) link[0].favIconUrl = "../assets/nothing.png";
if (link[0].title.length > 10)
link[0].title = truncate(link[0].title.toString(), 50);
Expand All @@ -50,15 +50,15 @@ class Dashboard extends React.Component {
this.props.deleteAll();
}

deleteTab = url => {
deleteTab = (url) => {
this.props.deleteOne(url);
return data;
};

componentDidMount() {
// VERSION 1.0.2 Double check if the link has expireDate

this.props.bookmark.tabs.map(tab => {
this.props.bookmark.tabs.map((tab) => {
if (tab.expiry >= this.props.settings.expireDate + Date.now()) {
store.dispatch({ type: "EXPIRY", url: tab.tab[0].url });
}
Expand Down Expand Up @@ -126,7 +126,7 @@ class Dashboard extends React.Component {
<div className="footer__github">
<a
className="footer__link"
href="https://paypal.me/pierrobertolucisano"
href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YD9DV8CBL3LRA&source=url"
target="_blank"
>
❤️ Donate
Expand All @@ -150,21 +150,18 @@ class Dashboard extends React.Component {
}
}

const mapStateToProps = state => ({
const mapStateToProps = (state) => ({
bookmark: state.bookmark,
settings: state.settings,
animation: state.animation
animation: state.animation,
});

const mapDispatchToProps = dispatch => ({
add: url => dispatch(addBookmark(url)),
refresh: data => dispatch(refreshBookmark(data)),
const mapDispatchToProps = (dispatch) => ({
add: (url) => dispatch(addBookmark(url)),
refresh: (data) => dispatch(refreshBookmark(data)),
deleteAll: () => dispatch(deleteAllBookmark()),
deleteOne: url => dispatch(deleteOneBookmark(url)),
addThroughButton: flag => dispatch(addFromButton(flag))
deleteOne: (url) => dispatch(deleteOneBookmark(url)),
addThroughButton: (flag) => dispatch(addFromButton(flag)),
});

export default connect(
mapStateToProps,
mapDispatchToProps
)(Dashboard);
export default connect(mapStateToProps, mapDispatchToProps)(Dashboard);