Created
June 28, 2022 06:54
-
-
Save arcolife/4d2c5a557549a7e9066eebb8c5ceabec to your computer and use it in GitHub Desktop.
PSI browser extension V3 new modified
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ports = {}; | |
var listeners = { | |
}; | |
var contextMenuID = '4353455656'; | |
var currentPort; | |
chrome.contextMenus.create({ | |
title: 'Share window,tab or desktop', | |
id: contextMenuID | |
}, function () { | |
chrome.contextMenus.onClicked.addListener(captureDesktop); | |
chrome.action.onClicked.addListener(captureDesktop); | |
}); | |
function captureDesktop(portId) { | |
currentPort = portId; | |
chrome.tabs.query({ active: true }, function (t) { | |
chrome.desktopCapture.chooseDesktopMedia(["screen"], t[0], onApproved); | |
}); | |
} | |
function onApproved(desktopId) { | |
if (!desktopId) { | |
return; | |
} | |
if (listeners.hasOwnProperty("postDesktopId")) | |
listeners["postDesktopId"](desktopId); | |
} | |
chrome.runtime.onConnectExternal.addListener(function (port) { | |
var portId_ = port.portId_; | |
ports[portId_] = port; | |
port.onDisconnect.addListener(function () { | |
delete ports[portId_]; | |
}); | |
port.onMessage.addListener(function (message, sender) { | |
captureDesktop(); | |
listeners["postDesktopId"] = function (a) { | |
ports[port.portId_].postMessage({ desktopId: a }); | |
}; | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"background": { | |
"service_worker": "main.js" | |
}, | |
"description": "Video/Audio screen sharing extension for InnovativeExams.com", | |
"externally_connectable": { | |
"matches": [ "*://localhost:*/*", "*://*.innexam.com/*", "*://*.xamhub.com/*", "*://*.exambooth.com/*", "*://*.examslocal.com/*" ] | |
}, | |
"icons": { | |
"128": "img/icon-128.png" | |
}, | |
"manifest_version": 3, | |
"name": "ExamsLocal modified", | |
"permissions": [ "tabs", "desktopCapture", "contextMenus" ], | |
"version": "2.0", | |
"key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAhw7L48HJnEKX34vO/5rTOeJaga8al5aGP9624rvMGYrQ6vbUjPO+dsONrcw6yIT+nGznSQixDiKyq90inPpO/hu1+TyqvIKcXCuul1hv3G85l4RSzm04KaJUY2gjUx0HbN8WpTZAts2bTLfJ7XQj0sYbME53LHHUHStHXv88/K8jrmcDFvJtk6flpTYyWPckLY1uSxxP3H/JAVPsllXKqOqTfhFB5IG9Q75hcYO3qCH0Ke9XPm729t1UK8RwE7AuZTdt1/OLFTW0cdn84KBC7i3gWcfFe3R9vuGV2G6s/qTasoFF661iW6J284QljjYiYWTOV7DHGpS85u245SazlQIDAQAB", | |
"web_accessible_resources": [{ | |
"resources":[ "img/icon-64.png", "img/icon-16.png", "img/video.png" ], | |
"matches": [ "*://localhost:*/*", "*://*.innexam.com/*", "*://*.xamhub.com/*", "*://*.exambooth.com/*", "*://*.examslocal.com/*" ] | |
}] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
dir tree