Skip to content

Commit

Permalink
clipper(web): save height/width with clipped data
Browse files Browse the repository at this point in the history
  • Loading branch information
thecodrr committed Dec 5, 2022
1 parent c5faf62 commit c1674b6
Show file tree
Hide file tree
Showing 11 changed files with 1,852 additions and 1,513 deletions.
4 changes: 3 additions & 1 deletion apps/web/src/utils/web-extension-relay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {
Server,
Clip,
WEB_EXTENSION_CHANNEL_EVENTS
} from "@notesnook/web-clipper/src/common/bridge";
} from "@notesnook/web-clipper/dist/common/bridge";
import { isUserPremium } from "../hooks/use-is-user-premium";
import { store as themestore } from "../stores/theme-store";
import { store as appstore } from "../stores/app-store";
Expand Down Expand Up @@ -133,6 +133,8 @@ class WebExtensionServer implements Server {
"data-mime": attachment.type,
src: clip.url,
title: clip.pageTitle || clip.title,
width: clip.width ? `${clip.width}` : undefined,
height: clip.height ? `${clip.height}` : undefined,
class: "web-clip"
}).outerHTML;
}
Expand Down
7 changes: 4 additions & 3 deletions extensions/web-clipper/build-utils/manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ const common = {
"tabs",
"storage",
"contextMenus",
"notifications"
"notifications",
"<all_urls>"
],
content_scripts: [
{
Expand All @@ -51,14 +52,14 @@ const common = {
js: ["contentScript.bundle.js"],
matches: ["http://*/*", "https://*/*"],
exclude_matches: ["*://app.notesnook.com/*", "*://localhost/*"]
},
}
],
browser_specific_settings: {
gecko: {
strict_min_version: "105.0"
}
},
icons: ICONS,
icons: ICONS
};

const v2 = {
Expand Down
Loading

0 comments on commit c1674b6

Please sign in to comment.