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
fff06cb4
Commit
fff06cb4
authored
Feb 15, 2024
by
ramdayalmunda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
extension overlapping on skikkum
parent
9302afe2
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
24 deletions
+15
-24
background.js
background.js
+1
-1
content.js
content.js
+11
-20
manifest.json
manifest.json
+2
-2
popup.js
popup.js
+1
-1
No files found.
background.js
View file @
fff06cb4
var
getUserDetails
=
null
!
function
()
{
var
origin
=
"http
://localhost:3039
"
var
origin
=
"http
s://begenieus.online
"
var
tutorShotId
=
null
var
imageNumber
=
0
;
var
recording
=
false
;
...
...
content.js
View file @
fff06cb4
...
...
@@ -5,40 +5,27 @@ var loggedIn = false;
var
floatingBar
=
null
;
var
startingOverlay
=
null
;
var
overlayInterval
=
null
;
const
origin
=
"http
://localhost:3039
"
const
origin
=
"http
s://begenieus.online
"
var
userDetails
=
{};
var
btn
=
{};
var
tutorShotOid
=
null
;
var
containerDiv
;
var
sr
;
var
hitNumber
=
new
Date
().
getTime
()
var
webpageObserver
=
{
disconnect
(){}
}
!
(
async
function
()
{
if
(
window
.
origin
==
origin
){
login
()
}
else
{
window
.
clearInterval
(
window
.
tutorShotInterval
)
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
){
window
.
tutorShotInterval
=
setInterval
(
async
()
=>
{
try
{
let
data
=
await
getCaptureData
()
reRenderFloatingBar
(
data
)
hitNumber
=
newHit
}
}
}
catch
(
err
){
console
.
log
(
err
)
}
});
});
const
config
=
{
childList
:
true
,
subtree
:
false
};
webpageObserver
.
observe
(
body
,
config
);
},
1000
)
}
containerDiv
=
document
.
createElement
(
'div'
)
...
...
@@ -412,8 +399,12 @@ chrome.runtime.onMessage.addListener(async function (message, sender, sendRespon
reRenderFloatingBar
(
data
)
}
else
if
(
message
.
message
==
'recordingStopped'
)
{
if
(
window
.
location
.
href
==
`
${
origin
}
/tutor-shot-list`
){
window
.
location
.
reload
()
}
else
{
window
.
open
(
`
${
origin
}
/tutor-shot-list`
)
}
}
});
...
...
manifest.json
View file @
fff06cb4
{
"manifest_version"
:
3
,
"name"
:
"Tutor Shot Local"
,
"version"
:
"1.
4
"
,
"description"
:
"Capture web-page screenshots instantly with a single click. They're saved to your account at http
://localhost:3039
."
,
"version"
:
"1.
7
"
,
"description"
:
"Capture web-page screenshots instantly with a single click. They're saved to your account at http
s://begenieus.online
."
,
"permissions"
:
[
"activeTab"
,
"storage"
...
...
popup.js
View file @
fff06cb4
!
function
()
{
const
origin
=
"http
://localhost:3039
"
const
origin
=
"http
s://begenieus.online
"
const
api
=
axios
.
create
({
baseURL
:
`
${
origin
}
/api`
,
// the base URL for nodeserver is okay but NGINX is giving error
...
...
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