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
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
29 deletions
+20
-29
background.js
background.js
+1
-1
content.js
content.js
+16
-25
manifest.json
manifest.json
+2
-2
popup.js
popup.js
+1
-1
No files found.
background.js
View file @
fff06cb4
var
getUserDetails
=
null
var
getUserDetails
=
null
!
function
()
{
!
function
()
{
var
origin
=
"http
://localhost:3039
"
var
origin
=
"http
s://begenieus.online
"
var
tutorShotId
=
null
var
tutorShotId
=
null
var
imageNumber
=
0
;
var
imageNumber
=
0
;
var
recording
=
false
;
var
recording
=
false
;
...
...
content.js
View file @
fff06cb4
...
@@ -5,40 +5,27 @@ var loggedIn = false;
...
@@ -5,40 +5,27 @@ var loggedIn = false;
var
floatingBar
=
null
;
var
floatingBar
=
null
;
var
startingOverlay
=
null
;
var
startingOverlay
=
null
;
var
overlayInterval
=
null
;
var
overlayInterval
=
null
;
const
origin
=
"http
://localhost:3039
"
const
origin
=
"http
s://begenieus.online
"
var
userDetails
=
{};
var
userDetails
=
{};
var
btn
=
{};
var
btn
=
{};
var
tutorShotOid
=
null
;
var
tutorShotOid
=
null
;
var
containerDiv
;
var
containerDiv
;
var
sr
;
var
sr
;
var
hitNumber
=
new
Date
().
getTime
()
var
webpageObserver
=
{
disconnect
(){}
}
var
webpageObserver
=
{
disconnect
(){}
}
!
(
async
function
()
{
!
(
async
function
()
{
if
(
window
.
origin
==
origin
){
login
()
}
if
(
window
.
origin
==
origin
){
login
()
}
else
{
else
{
window
.
clearInterval
(
window
.
tutorShotInterval
)
webpageObserver
.
disconnect
()
let
body
=
document
.
querySelector
(
'body'
)
window
.
tutorShotInterval
=
setInterval
(
async
()
=>
{
webpageObserver
=
new
MutationObserver
(
mutations
=>
{
try
{
mutations
.
forEach
(
async
(
mutation
)
=>
{
let
data
=
await
getCaptureData
()
if
(
mutation
.
type
===
'childList'
&&
mutation
.
target
===
body
)
{
reRenderFloatingBar
(
data
)
const
addedNodes
=
mutation
.
addedNodes
;
}
catch
(
err
){
const
removedNodes
=
mutation
.
removedNodes
;
console
.
log
(
err
)
}
if
(
addedNodes
.
length
||
removedNodes
.
length
)
{
},
1000
)
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
=
document
.
createElement
(
'div'
)
...
@@ -412,7 +399,11 @@ chrome.runtime.onMessage.addListener(async function (message, sender, sendRespon
...
@@ -412,7 +399,11 @@ chrome.runtime.onMessage.addListener(async function (message, sender, sendRespon
reRenderFloatingBar
(
data
)
reRenderFloatingBar
(
data
)
}
}
else
if
(
message
.
message
==
'recordingStopped'
)
{
else
if
(
message
.
message
==
'recordingStopped'
)
{
window
.
open
(
`
${
origin
}
/tutor-shot-list`
)
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
,
"manifest_version"
:
3
,
"name"
:
"Tutor Shot Local"
,
"name"
:
"Tutor Shot Local"
,
"version"
:
"1.
4
"
,
"version"
:
"1.
7
"
,
"description"
:
"Capture web-page screenshots instantly with a single click. They're saved to your account at http
://localhost:3039
."
,
"description"
:
"Capture web-page screenshots instantly with a single click. They're saved to your account at http
s://begenieus.online
."
,
"permissions"
:
[
"permissions"
:
[
"activeTab"
,
"activeTab"
,
"storage"
"storage"
...
...
popup.js
View file @
fff06cb4
!
function
()
{
!
function
()
{
const
origin
=
"http
://localhost:3039
"
const
origin
=
"http
s://begenieus.online
"
const
api
=
axios
.
create
({
const
api
=
axios
.
create
({
baseURL
:
`
${
origin
}
/api`
,
// the base URL for nodeserver is okay but NGINX is giving error
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