Commit fff06cb4 by ramdayalmunda

extension overlapping on skikkum

parent 9302afe2
var getUserDetails = null
!function () {
var origin = "http://localhost:3039"
var origin = "https://begenieus.online"
var tutorShotId = null
var imageNumber = 0;
var recording = false;
......
......@@ -5,40 +5,27 @@ var loggedIn = false;
var floatingBar = null;
var startingOverlay = null;
var overlayInterval = null;
const origin = "http://localhost:3039"
const origin = "https://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_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 https://begenieus.online.",
"permissions": [
"activeTab",
"storage"
......
!function () {
const origin = "http://localhost:3039"
const origin = "https://begenieus.online"
const api = axios.create({
baseURL: `${origin}/api`, // the base URL for nodeserver is okay but NGINX is giving error
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment