Skip to content

Commit ffe57a1

Browse files
author
Rustem Mussabekov
committed
Change hotkeys, now they work on every browser:
- Open extension popup (mac: ⌃R, win+linx: Alt+R) - Save/highlight on Chrome (mac: ⌘⇧S, win+linx: Ctrl+Shift+S) - Save/highlight other browser (mac: ⌃X, win+linx: Alt+X) - Open sidebar (mac: ⌘., win+linx: Ctrl+.)
1 parent 0e09ee3 commit ffe57a1

File tree

12 files changed

+62
-76
lines changed

12 files changed

+62
-76
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ Be sure to run `npm i` before calling any commands below
1111
| web | `npm run build` |
1212
| electron | `npm run build:electron` |
1313
| chrome | `npm run build:extension:chrome` |
14-
| firefox | `npm run build:extension:firefox` | Saved to `dist/firefox/prod`
14+
| edge | `npm run build:extension:edge` |
15+
| firefox | `npm run build:extension:firefox` | Saved to `dist/firefox/prod`
1516
| opera | `npm run build:extension:opera` |
1617
| safari | `npm run build:extension:safari` | Then open **build/xcode** project
1718

build/extension.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ module.exports = (env={}, args={}) => {
1414

1515
switch(env.vendor) {
1616
case 'chrome': env.sentry = { urlPrefix: 'chrome-extension://ldgfbffkinooeloadekpmfoklnobpien/' }; break
17+
case 'edge': env.sentry = { urlPrefix: 'chrome-extension://lpngnnjemnkjmgpoolldhiejhkmmgfge/' }; break
1718
case 'firefox': env.sentry = { disabled: true }; break //ignored, because reviewers complain
1819
case 'opera': env.sentry = { urlPrefix: 'chrome-extension://omkjjddnkfagilfgmbmeeffkljlpaglj/' }; break
1920
case 'safari': env.sentry = { urlPrefix: 'safari-web-extension://F54B64D3-0D2D-4C9C-BDF5-8671C44683E7/' }; break

build/xcode/Save to Raindrop.io/App/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<key>CFBundlePackageType</key>
1818
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>5.6.41</string>
20+
<string>5.6.50</string>
2121
<key>CFBundleURLTypes</key>
2222
<array>
2323
<dict>
@@ -32,7 +32,7 @@
3232
</dict>
3333
</array>
3434
<key>CFBundleVersion</key>
35-
<string>354</string>
35+
<string>360</string>
3636
<key>LSApplicationCategoryType</key>
3737
<string>public.app-category.productivity</string>
3838
<key>LSMinimumSystemVersion</key>

build/xcode/Save to Raindrop.io/Extension/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
<key>CFBundlePackageType</key>
1818
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>5.6.41</string>
20+
<string>5.6.50</string>
2121
<key>CFBundleVersion</key>
22-
<string>354</string>
22+
<string>360</string>
2323
<key>LSMinimumSystemVersion</key>
2424
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
2525
<key>NSExtension</key>

build/xcode/Save to Raindrop.io/Save to Raindrop.io.xcodeproj/project.pbxproj

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@
441441
CODE_SIGN_ENTITLEMENTS = Extension/Extension.entitlements;
442442
CODE_SIGN_IDENTITY = "Apple Development";
443443
CODE_SIGN_STYLE = Automatic;
444-
CURRENT_PROJECT_VERSION = 354;
444+
CURRENT_PROJECT_VERSION = 360;
445445
DEAD_CODE_STRIPPING = YES;
446446
DEVELOPMENT_TEAM = 7459JWM5TY;
447447
ENABLE_HARDENED_RUNTIME = YES;
@@ -452,7 +452,7 @@
452452
"@executable_path/../../../../Frameworks",
453453
);
454454
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
455-
MARKETING_VERSION = 5.6.41;
455+
MARKETING_VERSION = 5.6.50;
456456
PRODUCT_BUNDLE_IDENTIFIER = io.raindrop.safari.extension;
457457
PRODUCT_NAME = "$(TARGET_NAME)";
458458
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -467,7 +467,7 @@
467467
CODE_SIGN_ENTITLEMENTS = Extension/Extension.entitlements;
468468
CODE_SIGN_IDENTITY = "Apple Development";
469469
CODE_SIGN_STYLE = Automatic;
470-
CURRENT_PROJECT_VERSION = 354;
470+
CURRENT_PROJECT_VERSION = 360;
471471
DEAD_CODE_STRIPPING = YES;
472472
DEVELOPMENT_TEAM = 7459JWM5TY;
473473
ENABLE_HARDENED_RUNTIME = YES;
@@ -478,7 +478,7 @@
478478
"@executable_path/../../../../Frameworks",
479479
);
480480
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
481-
MARKETING_VERSION = 5.6.41;
481+
MARKETING_VERSION = 5.6.50;
482482
PRODUCT_BUNDLE_IDENTIFIER = io.raindrop.safari.extension;
483483
PRODUCT_NAME = "$(TARGET_NAME)";
484484
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -497,7 +497,7 @@
497497
CODE_SIGN_IDENTITY = "Apple Development";
498498
CODE_SIGN_STYLE = Automatic;
499499
COMBINE_HIDPI_IMAGES = YES;
500-
CURRENT_PROJECT_VERSION = 354;
500+
CURRENT_PROJECT_VERSION = 360;
501501
DEAD_CODE_STRIPPING = YES;
502502
DEVELOPMENT_TEAM = 7459JWM5TY;
503503
ENABLE_HARDENED_RUNTIME = YES;
@@ -508,7 +508,7 @@
508508
"@executable_path/../Frameworks",
509509
);
510510
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
511-
MARKETING_VERSION = 5.6.41;
511+
MARKETING_VERSION = 5.6.50;
512512
PRODUCT_BUNDLE_IDENTIFIER = io.raindrop.safari;
513513
PRODUCT_NAME = "$(TARGET_NAME)";
514514
SWIFT_VERSION = 5.0;
@@ -525,7 +525,7 @@
525525
CODE_SIGN_IDENTITY = "Apple Development";
526526
CODE_SIGN_STYLE = Automatic;
527527
COMBINE_HIDPI_IMAGES = YES;
528-
CURRENT_PROJECT_VERSION = 354;
528+
CURRENT_PROJECT_VERSION = 360;
529529
DEAD_CODE_STRIPPING = YES;
530530
DEVELOPMENT_TEAM = 7459JWM5TY;
531531
ENABLE_HARDENED_RUNTIME = YES;
@@ -536,7 +536,7 @@
536536
"@executable_path/../Frameworks",
537537
);
538538
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
539-
MARKETING_VERSION = 5.6.41;
539+
MARKETING_VERSION = 5.6.50;
540540
PRODUCT_BUNDLE_IDENTIFIER = io.raindrop.safari;
541541
PRODUCT_NAME = "$(TARGET_NAME)";
542542
SWIFT_VERSION = 5.0;

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "app",
3-
"version": "5.6.46",
3+
"version": "5.6.50",
44
"description": "All-in-one bookmark manager",
55
"author": "Rustem Mussabekov",
66
"license": "MIT",
@@ -15,6 +15,7 @@
1515
"build": "webpack --config build/web.js --env production",
1616
"build:extension": "npm run build:extension:chrome && npm run build:extension:firefox && npm run build:extension:opera && npm run build:extension:safari && npm run build:extension:safari-ios",
1717
"build:extension:chrome": "webpack --config build/extension.js --env production --env vendor=chrome",
18+
"build:extension:edge": "webpack --config build/extension.js --env production --env vendor=edge",
1819
"build:extension:firefox": "webpack --config build/extension.js --env production --env vendor=firefox",
1920
"build:extension:opera": "webpack --config build/extension.js --env production --env vendor=opera",
2021
"build:extension:safari": "webpack --config build/extension.js --env production --env vendor=safari && cd 'build/xcode/Save to Raindrop.io' && ./version.sh",

src/assets/target/extension/welcome/index.html

Lines changed: 22 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,10 @@ <h2>Collect & organize web pages</h2>
4343

4444
<a href="#pin" class="button size-regular variant-primary">Pin in Toolbar</a>
4545
<span class="or-text">or press</span>
46-
<span data-system-show="macos">
47-
<button class="button size-regular variant-secondary only-icon" disabled></button>
48-
<button data-browser-hide="firefox" class="button size-regular variant-secondary only-icon" disabled></button>
49-
<button data-browser-show="firefox" class="button size-regular variant-secondary only-icon" disabled></button>
50-
<button class="button size-regular variant-secondary only-icon" disabled>S</button>
51-
</span>
52-
<span data-system-show="windows linux">
53-
<button class="button size-regular variant-secondary" disabled>
54-
<span data-browser-hide="firefox">Ctrl</span><span data-browser-show="firefox">Alt</span>
55-
+Shift+S
56-
</button>
57-
</span>
46+
47+
<button data-system-show="macos" class="button size-regular variant-secondary only-icon" disabled></button>
48+
<button data-system-hide="macos" class="button size-regular variant-secondary" disabled>Alt</button>
49+
<button class="button size-regular variant-secondary only-icon" disabled>R</button>
5850
</div>
5951
</div>
6052

@@ -96,16 +88,9 @@ <h2>Collection always at hand</h2>
9688

9789
<span class="or-text">or press</span>
9890

99-
<span data-system-show="macos">
100-
<button class="button size-regular variant-secondary only-icon" disabled></button>
101-
<button class="button size-regular variant-secondary only-icon" disabled></button>
102-
<button class="button size-regular variant-secondary only-icon" disabled>B</button>
103-
</span>
104-
<span data-system-show="windows linux">
105-
<button class="button size-regular variant-secondary" disabled>
106-
Alt+Shift+B
107-
</button>
108-
</span>
91+
<button data-system-show="macos" class="button size-regular variant-secondary only-icon" disabled></button>
92+
<button data-system-hide="macos" class="button size-regular variant-secondary" disabled>Ctrl</button>
93+
<button class="button size-regular variant-secondary only-icon" disabled>.</button>
10994
</div>
11095
</div>
11196

@@ -121,16 +106,9 @@ <h3>Open Raindrop.io Sidebar</h3>
121106
<p>
122107
Or press
123108

124-
<span data-system-show="macos">
125-
<button class="button size-regular variant-secondary only-icon" disabled></button>
126-
<button class="button size-regular variant-secondary only-icon" disabled></button>
127-
<button class="button size-regular variant-secondary only-icon" disabled>B</button>
128-
</span>
129-
<span data-system-show="windows linux">
130-
<button class="button size-regular variant-secondary" disabled>
131-
Alt+Shift+B
132-
</button>
133-
</span>
109+
<button data-system-show="macos" class="button size-regular variant-secondary only-icon" disabled></button>
110+
<button data-system-hide="macos" class="button size-regular variant-secondary" disabled>Ctrl</button>
111+
<button class="button size-regular variant-secondary only-icon" disabled>.</button>
134112
</p>
135113
<hr class="blue-green-gradient" />
136114
<p>In sidebar you can browse your collection, search and add new items.</p>
@@ -168,7 +146,7 @@ <h3>Address Bar Integration</h3>
168146
</div>
169147
</div>
170148

171-
<!-- Multiplayer -->
149+
<!-- Highlights -->
172150
<div class="slide columns right" id="highlights" data-is-intersecting="false">
173151
<div class="image-column">
174152
<img src="screen-highlights.webp" />
@@ -181,17 +159,19 @@ <h2>Save important passages</h2>
181159

182160
<button class="button size-regular variant-secondary" disabled>Select text</button>
183161
<span class="or-text">and press</span>
184-
<span data-system-show="macos">
185-
<button class="button size-regular variant-secondary only-icon" disabled></button>
186-
<button data-browser-hide="firefox" class="button size-regular variant-secondary only-icon" disabled></button>
187-
<button data-browser-show="firefox" class="button size-regular variant-secondary only-icon" disabled></button>
162+
163+
<span data-browser-show="chrome">
164+
<button data-system-show="macos" class="button size-regular variant-secondary only-icon" disabled></button>
165+
<button data-system-hide="macos" class="button size-regular variant-secondary" disabled>Ctrl</button>
166+
<button data-system-show="macos" class="button size-regular variant-secondary only-icon" disabled></button>
167+
<button data-system-hide="macos" class="button size-regular variant-secondary" disabled>Shift</button>
188168
<button class="button size-regular variant-secondary only-icon" disabled>S</button>
189169
</span>
190-
<span data-system-show="windows linux">
191-
<button class="button size-regular variant-secondary" disabled>
192-
<span data-browser-hide="firefox">Ctrl</span><span data-browser-show="firefox">Alt</span>
193-
+Shift+S
194-
</button>
170+
171+
<span data-browser-hide="chrome">
172+
<button data-system-show="macos" class="button size-regular variant-secondary only-icon" disabled></button>
173+
<button data-system-hide="macos" class="button size-regular variant-secondary" disabled>Alt</button>
174+
<button class="button size-regular variant-secondary only-icon" disabled>X</button>
195175
</span>
196176
</div>
197177
</div>

src/target/extension/background/commands.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ async function onCommand(command, tab) {
3232
active: true
3333
})
3434

35-
case 'open_app':
36-
return open('/', { width: 1280, height: 800 })
37-
3835
case 'execute_side_panel': {
3936
const { windowId } = tab
4037
return browser.sidePanel.open({ windowId })

src/target/extension/hotkeys.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export const hotkeys = {
44
async getAll() {
55
try{
66
const commands = await browser.commands.getAll()
7-
if (Array.isArray(commands) && commands.length)
7+
if (commands?.[0]?.name)
88
return commands
99
} catch(e){
1010
console.log(e)
@@ -17,11 +17,11 @@ export const hotkeys = {
1717
const { os } = await browser.runtime.getPlatformInfo()
1818

1919
return Object.entries(commands)
20-
.map(([name, { suggested_key, description }])=>{
21-
var shortcut = suggested_key ? (suggested_key[os] || suggested_key.default || '') : ''
20+
.map(([name, { suggested_key={}, description='' }])=>{
21+
var shortcut = suggested_key?.[os] || suggested_key?.default || ''
2222

2323
if (os == 'mac')
24-
shortcut = shortcut.replace(/^Ctrl/, '⌘')
24+
shortcut = shortcut.replace(/^Ctrl/, '⌘').replace(/^MacCtrl/, '⌃')
2525

2626
return {
2727
name,
@@ -48,6 +48,7 @@ export const hotkeys = {
4848
return 'https://support.mozilla.org/en-US/kb/manage-extension-shortcuts-firefox'
4949

5050
case 'chrome':
51+
case 'edge':
5152
case 'opera':
5253
return 'chrome://extensions/shortcuts'
5354
}

0 commit comments

Comments
 (0)