Skip to content

Commit

Permalink
- New better highlighting
Browse files Browse the repository at this point in the history
- Strip size
  • Loading branch information
Rustem Mussabekov committed Jun 9, 2024
1 parent 56daf50 commit 09f663c
Show file tree
Hide file tree
Showing 9 changed files with 481 additions and 16 deletions.
7 changes: 6 additions & 1 deletion build/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,12 @@ module.exports = ({ production, filename='[name].[contenthash]', sentry={} }, {
minimizer: [
new TerserJSPlugin({
parallel: true,
extractComments: false
extractComments: false,
terserOptions: {
output: {
comments: false
}
}
}),
new CssMinimizerPlugin({
minimizerOptions: {
Expand Down
4 changes: 2 additions & 2 deletions build/xcode/Save to Raindrop.io/App/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>5.6.32</string>
<string>5.6.33</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
Expand All @@ -32,7 +32,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>343</string>
<string>344</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.productivity</string>
<key>LSMinimumSystemVersion</key>
Expand Down
4 changes: 2 additions & 2 deletions build/xcode/Save to Raindrop.io/Extension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>5.6.32</string>
<string>5.6.33</string>
<key>CFBundleVersion</key>
<string>343</string>
<string>344</string>
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>NSExtension</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@
CODE_SIGN_ENTITLEMENTS = Extension/Extension.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 343;
CURRENT_PROJECT_VERSION = 344;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = 7459JWM5TY;
ENABLE_HARDENED_RUNTIME = YES;
Expand All @@ -450,7 +450,7 @@
"@executable_path/../../../../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
MARKETING_VERSION = 5.6.32;
MARKETING_VERSION = 5.6.33;
PRODUCT_BUNDLE_IDENTIFIER = io.raindrop.safari.extension;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -465,7 +465,7 @@
CODE_SIGN_ENTITLEMENTS = Extension/Extension.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 343;
CURRENT_PROJECT_VERSION = 344;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = 7459JWM5TY;
ENABLE_HARDENED_RUNTIME = YES;
Expand All @@ -476,7 +476,7 @@
"@executable_path/../../../../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
MARKETING_VERSION = 5.6.32;
MARKETING_VERSION = 5.6.33;
PRODUCT_BUNDLE_IDENTIFIER = io.raindrop.safari.extension;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -495,7 +495,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 343;
CURRENT_PROJECT_VERSION = 344;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = 7459JWM5TY;
ENABLE_HARDENED_RUNTIME = YES;
Expand All @@ -506,7 +506,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
MARKETING_VERSION = 5.6.32;
MARKETING_VERSION = 5.6.33;
PRODUCT_BUNDLE_IDENTIFIER = io.raindrop.safari;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
Expand All @@ -523,7 +523,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 343;
CURRENT_PROJECT_VERSION = 344;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = 7459JWM5TY;
ENABLE_HARDENED_RUNTIME = YES;
Expand All @@ -534,7 +534,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
MARKETING_VERSION = 5.6.32;
MARKETING_VERSION = 5.6.33;
PRODUCT_BUNDLE_IDENTIFIER = io.raindrop.safari;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "app",
"version": "5.6.32",
"version": "5.6.34",
"description": "",
"author": "",
"license": "ISC",
Expand Down
455 changes: 454 additions & 1 deletion src/target/extension/background/highlights/highlight.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/target/extension/background/highlights/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ async function onMessage({ type, payload }, sender) {
//Reload highlights when tab url change
async function onTabActivated({ tabId }) {
if (!tabId) return

const tab = await browser.tabs.get(tabId)

if (!tab || !tab.url || !tab.active || tab.status != 'complete')
return

Expand Down
6 changes: 6 additions & 0 deletions src/target/extension/background/highlights/logic.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,12 @@ async function send(tab, type, payload) {

//is injected
async function isInjected(tab) {
if (!await browser.permissions.contains({
permissions: ['scripting'],
origins: [tab.url]
}))
return false

const [res] = await browser.scripting.executeScript({
target: { tabId: tab.id },
func: function() { return window.__hi },
Expand Down

0 comments on commit 09f663c

Please sign in to comment.