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
a04c153d
Commit
a04c153d
authored
Jan 08, 2024
by
ramdayalmunda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stikkum issue
parent
d7330a80
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
3 deletions
+29
-3
content.js
content.js
+27
-1
manifest.json
manifest.json
+2
-2
No files found.
content.js
View file @
a04c153d
...
...
@@ -11,9 +11,35 @@ var btn = {};
var
tutorShotOid
=
null
;
var
containerDiv
;
var
sr
;
var
hitNumber
=
new
Date
().
getTime
()
var
webpageObserver
=
{
disconnect
(){}
}
!
(
async
function
()
{
if
(
window
.
origin
==
origin
)
login
()
if
(
window
.
origin
==
origin
){
login
()
}
else
{
webpageObserver
.
disconnect
()
let
body
=
document
.
querySelector
(
'body'
)
webpageObserver
=
new
MutationObserver
(
mutations
=>
{
mutations
.
forEach
(
async
(
mutation
)
=>
{
if
(
mutation
.
type
===
'childList'
&&
mutation
.
target
===
body
)
{
const
addedNodes
=
mutation
.
addedNodes
;
const
removedNodes
=
mutation
.
removedNodes
;
if
(
addedNodes
.
length
||
removedNodes
.
length
)
{
let
newHit
=
new
Date
().
getTime
()
if
(
newHit
-
hitNumber
>
800
){
let
data
=
await
getCaptureData
()
reRenderFloatingBar
(
data
)
hitNumber
=
newHit
}
}
}
});
});
const
config
=
{
childList
:
true
,
subtree
:
false
};
webpageObserver
.
observe
(
body
,
config
);
}
containerDiv
=
document
.
createElement
(
'div'
)
containerDiv
.
style
.
position
=
"fixed"
...
...
manifest.json
View file @
a04c153d
{
"manifest_version"
:
3
,
"name"
:
"Tutor Shot
Local
"
,
"version"
:
"1.
2
"
,
"name"
:
"Tutor Shot
Test
"
,
"version"
:
"1.
4
"
,
"description"
:
"Capture web-page screenshots instantly with a single click. They're saved to your account at http://localhost:3039."
,
"permissions"
:
[
"activeTab"
,
...
...
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