Skip to content

Commit 190a9a1

Browse files
Merge branch 'hotfix/3.12.15'
2 parents 14390ec + cd17c6b commit 190a9a1

File tree

11 files changed

+52
-69
lines changed

11 files changed

+52
-69
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "worldbrain-extension",
3-
"version": "3.12.14",
3+
"version": "3.12.15",
44
"homepage": "https://memex.garden",
55
"repository": "https://github.com/WorldBrain/Memex",
66
"scripts": {

src/common-ui/components/dropdown-menu-small.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,6 @@ export class DropdownMenuBtn extends React.PureComponent<Props, State> {
108108
// })
109109
// }
110110

111-
console.log('items', this.props.menuItems)
112-
113111
return (
114112
<MenuItemContainerUnfolded isOpen={this.state.isOpened}>
115113
{this.props.menuItems.map((item) => (

src/content-scripts/content_script/global.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,6 @@ export async function main(
717717
)
718718
await createPromise
719719
} else if (window.location.href.includes('youtube.com')) {
720-
console.log('commentText', commentText)
721720
await inPageUI.showSidebar({
722721
action: 'youtube_timestamp',
723722
commentText: commentText,

src/content-sharing/background/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ export default class ContentSharingBackground {
630630
return null
631631
}
632632

633-
return contents.remoteId
633+
return contents?.remoteId
634634
}
635635

636636
ensureRemotePageId: ContentSharingInterface['ensureRemotePageId'] = async (

src/dashboard-refactor/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ export class DashboardContainer extends StatefulUIElement<
187187
const listData = getListData(listsSidebar.selectedListId, {
188188
listsSidebar,
189189
})
190-
const remoteLink = listData.remoteId
190+
const remoteLink = listData?.remoteId
191191
? getListShareUrl({ remoteListId: listData.remoteId })
192192
: undefined // TODO: ensure this comes with key for collab'd lists
193193
const isOwnedList = listData.creator?.id === currentUser?.id

src/search-injection/content_script.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ export async function initSearchInjection({
4141
try {
4242
const query = utils.fetchQuery(url)
4343

44-
console.log('SearchInjection: Fetching search query', query)
45-
4644
await handleRenderSearchInjection(
4745
query,
4846
requestSearcher,

src/search-injection/searchInjection.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ export const handleRenderSearchInjection = async (
120120
// Calls renderComponent to render the react component
121121

122122
const renderComponent = async () => {
123-
console.log('redering search injection')
124123
// Accesses docs, totalCount from parent through closure
125124
// Gets position from settings
126125
// Renders React Component on the respective container
@@ -331,7 +330,6 @@ export const handleRenderSearchInjection = async (
331330
})
332331

333332
if (isTargetNodeAdded) {
334-
console.log('render2')
335333
renderComponent()
336334
}
337335
}
@@ -346,7 +344,6 @@ export const handleRenderSearchInjection = async (
346344
)
347345

348346
if (targetNode && !existingInjection) {
349-
console.log('render1')
350347
renderComponent()
351348
} else {
352349
// Configuration for the observer (which mutations to observe)

src/search-injection/youtubeInterface.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -273,13 +273,9 @@ export function injectYoutubeContextMenu(annotationsFunctions: any) {
273273
'ytp-popup ytp-contextmenu',
274274
)
275275
if (contextMenu.length > 0) {
276-
console.log('contextMenu', contextMenu)
277276
panel = contextMenu[0]?.querySelector('.ytp-panel-menu')
278-
279-
console.log('panel', panel)
280277
}
281278
if (panel) {
282-
console.log('panel', panel)
283279
renderYoutubeMenuButton(panel, annotationsFunctions, icon)
284280
return
285281
}
@@ -289,10 +285,8 @@ export function injectYoutubeContextMenu(annotationsFunctions: any) {
289285
const targetElement = targetObject.target as HTMLElement
290286
if (targetElement.classList.contains('ytp-contextmenu')) {
291287
const targetChildren = targetElement.children
292-
console.log('targetChildren', targetChildren)
293288

294289
for (let i = 0; i < targetChildren.length; i++) {
295-
console.log('targetChildren[i]', targetChildren[i])
296290
if (targetChildren[i].classList.contains('ytp-panel')) {
297291
const potentialPanel = targetChildren[i].querySelector(
298292
'.ytp-panel-menu',

src/sidebar/annotations-sidebar/components/AnnotationsSidebar.tsx

Lines changed: 46 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1895,40 +1895,40 @@ export class AnnotationsSidebar extends React.Component<
18951895
)
18961896
}
18971897

1898-
console.log('this.props.', this.props.hasKey)
1899-
19001898
return (
19011899
<AISidebarContainer>
1902-
{this.props.sidebarContext === 'in-page' && (
1903-
<SuggestionsListSwitcher>
1904-
<SuggestionsSwitcherButton
1905-
onClick={this.props.setActiveAITab('ThisPage')}
1906-
active={this.props.activeAITab === 'ThisPage'}
1907-
>
1908-
This Page
1909-
</SuggestionsSwitcherButton>
1910-
<SuggestionsSwitcherButton
1911-
onClick={this.props.setActiveAITab(
1912-
'ExistingKnowledge',
1913-
)}
1914-
active={
1915-
this.props.activeAITab === 'ExistingKnowledge'
1916-
}
1917-
>
1918-
Saved by me
1919-
</SuggestionsSwitcherButton>
1920-
<SuggestionsSwitcherButton
1921-
onClick={this.props.setActiveAITab(
1922-
'InFollowedFeeds',
1923-
)}
1924-
active={
1925-
this.props.activeAITab === 'InFollowedFeeds'
1926-
}
1927-
>
1928-
In Followed
1929-
</SuggestionsSwitcherButton>
1930-
</SuggestionsListSwitcher>
1931-
)}
1900+
{this.props.sidebarContext === 'in-page' &&
1901+
this.props.rabbitHoleBetaFeatureAccess === 'onboarded' && (
1902+
<SuggestionsListSwitcher>
1903+
<SuggestionsSwitcherButton
1904+
onClick={this.props.setActiveAITab('ThisPage')}
1905+
active={this.props.activeAITab === 'ThisPage'}
1906+
>
1907+
This Page
1908+
</SuggestionsSwitcherButton>
1909+
<SuggestionsSwitcherButton
1910+
onClick={this.props.setActiveAITab(
1911+
'ExistingKnowledge',
1912+
)}
1913+
active={
1914+
this.props.activeAITab ===
1915+
'ExistingKnowledge'
1916+
}
1917+
>
1918+
Saved by me
1919+
</SuggestionsSwitcherButton>
1920+
<SuggestionsSwitcherButton
1921+
onClick={this.props.setActiveAITab(
1922+
'InFollowedFeeds',
1923+
)}
1924+
active={
1925+
this.props.activeAITab === 'InFollowedFeeds'
1926+
}
1927+
>
1928+
In Followed
1929+
</SuggestionsSwitcherButton>
1930+
</SuggestionsListSwitcher>
1931+
)}
19321932
{this.props.showFeedSourcesMenu ? (
19331933
this.renderSourcesMenu(
19341934
this.props.activeAITab === 'ExistingKnowledge'
@@ -3816,18 +3816,20 @@ export class AnnotationsSidebar extends React.Component<
38163816
padding={'3px 6px'}
38173817
height={'30px'}
38183818
/>
3819-
{this.props.sidebarContext === 'in-page' && (
3820-
<PrimaryAction
3821-
onClick={this.props.setActiveTab('rabbitHole')}
3822-
label={'RabbitHole'}
3823-
active={this.props.activeTab === 'rabbitHole'}
3824-
type={'tertiary'}
3825-
size={'medium'}
3826-
iconPosition={'right'}
3827-
padding={'3px 6px'}
3828-
height={'30px'}
3829-
/>
3830-
)}
3819+
{this.props.sidebarContext === 'in-page' &&
3820+
this.props.rabbitHoleBetaFeatureAccess ===
3821+
'onboarded' && (
3822+
<PrimaryAction
3823+
onClick={this.props.setActiveTab('rabbitHole')}
3824+
label={'RabbitHole'}
3825+
active={this.props.activeTab === 'rabbitHole'}
3826+
type={'tertiary'}
3827+
size={'medium'}
3828+
iconPosition={'right'}
3829+
padding={'3px 6px'}
3830+
height={'30px'}
3831+
/>
3832+
)}
38313833
{/* <PrimaryAction
38323834
onClick={this.props.setActiveTab('spaces')}
38333835
label={'Spaces'}

src/sidebar/annotations-sidebar/containers/logic.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -857,16 +857,13 @@ export class SidebarContainerLogic extends UILogic<
857857
const openAIKey = await this.syncSettings.openAI.get('apiKey')
858858
const hasAPIKey = openAIKey && openAIKey.trim().startsWith('sk-')
859859

860-
console.log('openAIKey', '"', openAIKey.trim(), '"')
861860
this.emitMutation({
862861
hasKey: { $set: hasAPIKey },
863862
})
864863
const signupDate = new Date(
865864
await (await this.options.authBG.getCurrentUser()).creationTime,
866865
).getTime()
867866

868-
console.log('signupDate', signupDate)
869-
870867
this.emitMutation({
871868
signupDate: { $set: signupDate },
872869
isTrial: { $set: await enforceTrialPeriod30Days(signupDate) },
@@ -2568,7 +2565,7 @@ export class SidebarContainerLogic extends UILogic<
25682565
{
25692566
comment: existing.comment,
25702567
body: existing.body,
2571-
remoteId: sharingState.remoteId
2568+
remoteId: sharingState?.remoteId
25722569
? sharingState.remoteId.toString()
25732570
: existing.remoteId,
25742571
unifiedId: event.unifiedAnnotationId,
@@ -2947,8 +2944,6 @@ export class SidebarContainerLogic extends UILogic<
29472944
await this.updateSuggestionResults(results)
29482945
}
29492946

2950-
console.log('model', previousState.AImodel)
2951-
29522947
const response = await this.options.summarizeBG.startPageSummaryStream({
29532948
fullPageUrl:
29542949
isPagePDF || previousState.fetchLocalHTML
@@ -4722,7 +4717,7 @@ export class SidebarContainerLogic extends UILogic<
47224717
.filter((id) => !!id)
47234718

47244719
annotationsCache.updateAnnotation({
4725-
remoteId: sharingState.remoteId
4720+
remoteId: sharingState?.remoteId
47264721
? sharingState.remoteId.toString()
47274722
: undefined,
47284723
unifiedId: annotation.unifiedId,

0 commit comments

Comments
 (0)