diff --git a/internals/buildversion.txt b/internals/buildversion.txt index 7c2b018..8db1e5f 100644 --- a/internals/buildversion.txt +++ b/internals/buildversion.txt @@ -1 +1 @@ -521 \ No newline at end of file +522 \ No newline at end of file diff --git a/internals/manifest.js b/internals/manifest.js index 6d4b59b..56b3f06 100644 --- a/internals/manifest.js +++ b/internals/manifest.js @@ -91,14 +91,25 @@ var m = { let temp = [...value] //Firefox do not support 'activeTab' as expected - //if (global.platform == "firefox") - // temp = temp.map(v=>v=='activeTab' ? 'tabs' : v) + if (global.platform == "firefox") + temp = temp.map(v=>v=='activeTab' ? 'tabs' : v) // maybe need also: // "*://*/*", // "" + return temp + }, + + optional_permissions: function(value) { + let temp = [...value] + + //Firefox do not support 'activeTab' as expected + //so keep `tabs` in permissions, not in optional_permissions + if (global.platform == 'firefox') + temp = [] + return temp } } @@ -119,6 +130,7 @@ module.exports = { case "browser_action": value = m.browserAction(value); break; case "commands": value = m.commands(value); break; case "permissions": value = m.permissions(value); break; + case "optional_permissions": value = m.optional_permissions(value); break; } return value; @@ -180,6 +192,7 @@ module.exports = { remove: keyVal(t('remove')), edit: keyVal(t('edit')), + clickToEdit: keyVal(t('alreadyInCollectionD')), restore: keyVal(t('restore')), inCollection: keyVal(_.capitalize(t('inCollection'))), unsorted: keyVal(t("defaultCollection--1")), diff --git a/package.json b/package.json index 1788d3a..2995875 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "webpack": "^1.14.0", "webpack-bundle-analyzer": "3.x", "webpack-core": "^0.6.9", - "webpack-dev-server": "3.x", + "webpack-dev-server": "1.x", "webpack-split-by-path": "0.0.10", "write-file-webpack-plugin": "3.x", "zip-webpack-plugin": "^0.3.0" diff --git a/pages/mini/index.ejs b/pages/mini/index.ejs index 0ad2945..f5573e1 100644 --- a/pages/mini/index.ejs +++ b/pages/mini/index.ejs @@ -17,7 +17,11 @@ - + +
+ 1 +
+ diff --git a/pages/mini/index.js b/pages/mini/index.js index 908461a..debb77e 100644 --- a/pages/mini/index.js +++ b/pages/mini/index.js @@ -41,4 +41,17 @@ var onMessage = function(e) { } window.removeEventListener("message", onMessage, false); -window.addEventListener("message", onMessage, false); \ No newline at end of file +window.addEventListener("message", onMessage, false); + + +//tabs permission +window.onload = function() { + webextension.permissions.contains({permissions: ['tabs']}, function(result) { + if (result){ + localStorage.setItem('tabs-permissions-ignore', '1') + } else { + if (localStorage.getItem('tabs-permissions-ignore')!='1') + document.querySelector('#settings').classList.add('show-badge') + } + }) +} \ No newline at end of file diff --git a/pages/mini/mini.css b/pages/mini/mini.css index 0b7c072..691222d 100644 --- a/pages/mini/mini.css +++ b/pages/mini/mini.css @@ -34,6 +34,7 @@ svg { } #actions a { + position: relative; padding: 5px; color: rgba(0,0,0,.6); } @@ -49,6 +50,27 @@ svg { background: white; } +#actions a .badge { + display: none; + position: absolute; + right: 0;top:0; + width: 16px;height: 16px; + background: red; + color: white; + border-radius: 8px; + text-align: center; + font-size: 12px; + font-weight: bold; +} + +#actions a.show-badge > span { + box-shadow: 0 0 0 1px red, 0 0 0 3px rgba(255,0,0,.3); +} + +#actions a.show-badge .badge { + display: block +} + #actions a:hover > span { color: white; background: #1988E0; diff --git a/pages/ready/page.jsx b/pages/ready/page.jsx index 1c468f8..8d2bd17 100644 --- a/pages/ready/page.jsx +++ b/pages/ready/page.jsx @@ -99,9 +99,9 @@ export default class Page extends React.Component{

When you find something interesting on the web, just click to add bookmark

-
+ {/*

Drag image or link from page and drop it into appeared ☁️️ in the right corner

-
+
*/}