Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tutor-shot-extension
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ramdayal Munda
tutor-shot-extension
Commits
d7330a80
Commit
d7330a80
authored
Jan 08, 2024
by
ramdayalmunda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
flikering after turor shot is active and switched to new pages
parent
f73b468d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
16 deletions
+4
-16
content.js
content.js
+4
-16
No files found.
content.js
View file @
d7330a80
...
...
@@ -22,20 +22,6 @@ var sr;
containerDiv
.
style
.
width
=
"0px"
containerDiv
.
style
.
height
=
"0px"
containerDiv
.
style
.
zIndex
=
"9999"
document
.
body
.
append
(
containerDiv
)
const
observer
=
new
MutationObserver
(
async
function
(
mutationsList
,
observer
)
{
for
(
let
mutation
of
mutationsList
)
{
if
(
mutation
.
type
===
'childList'
&&
mutation
.
removedNodes
.
length
>
0
)
{
if
([...
mutation
.
removedNodes
].
includes
(
containerDiv
))
{
console
.
log
(
'The target node has been removed from the DOM.'
);
let
data
=
await
getCaptureData
()
reRenderFloatingBar
(
data
)
}
}
}
});
observer
.
observe
(
document
.
body
,
{
childList
:
true
})
sr
=
containerDiv
.
attachShadow
({
mode
:
'open'
});
...
...
@@ -343,11 +329,13 @@ window.addEventListener('mousedown', async function (e) {
width
:
document
.
body
.
clientWidth
,
},
tagName
:
e
.
target
.
tagName
,
outerText
:
e
.
target
.
outerText
,
interText
:
e
.
target
.
interText
,
text
:
e
.
target
.
innerText
,
url
:
location
.
href
,
origin
:
location
.
origin
,
}
let
newLineBreakIndex
=
captureInfo
.
text
.
search
(
'
\
n'
)
if
(
newLineBreakIndex
!=-
1
)
captureInfo
.
text
=
captureInfo
.
text
.
slice
(
0
,
newLineBreakIndex
)
// console.log('sending capture info', captureInfo)
chrome
.
runtime
.
sendMessage
({
action
:
"captureSS"
,
captureInfo
})
let
data
=
await
getCaptureData
()
reRenderFloatingBar
(
data
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment