Skip to content

Commit

Permalink
removed cpu info helper
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Zlygin committed Nov 8, 2021
1 parent 3802419 commit 8b28a25
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 54 deletions.
13 changes: 0 additions & 13 deletions contentScript.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
window.addEventListener('message', e => {
if (e.data === 'requestCpuInfo') {
chrome.runtime.sendMessage(
'requestCpuInfo',
cpuInfo => window.postMessage({ cpuInfo }, '*')
)
}
});

const script = document.createElement('script');
script.src = chrome.runtime.getURL('initCpuInfo.js');
document.documentElement.appendChild(script);

const commandButtons = {
toggleMute: 'button[data-at=muteAudioBtn]',
toggleCamera: 'button[data-at=muteVideoBtn]',
Expand Down
20 changes: 0 additions & 20 deletions initCpuInfo.js

This file was deleted.

8 changes: 1 addition & 7 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"background": {
"service_worker": "serviceWorker.js"
},
"permissions": ["scripting", "tabs", "system.cpu"],
"permissions": ["tabs"],
"action": {
"default_popup": "popup.html",
"default_icon": {
Expand Down Expand Up @@ -61,11 +61,5 @@
"matches": ["https://v.ringcentral.com/*"],
"js": ["contentScript.js"]
}
],
"web_accessible_resources": [
{
"matches": ["https://v.ringcentral.com/*"],
"resources": ["initCpuInfo.js"]
}
]
}
3 changes: 1 addition & 2 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
# RC Video Companion

Source for RC Video Companion - chrome extension that simplifies work with RingCentral Video service from a browser.
Source for RC Video Companion - Chrome extension that simplifies work with RingCentral Video service from a browser.

Features:
* Fast switch to RCV tab from anywhere button/hotkey (in meeting tab is preferred)
* Mute/unmute button/hotkey (within Chrome by default, can be set to global OS hotkey)
* Camera on/off button/hotkey (the same as previous)
* Start/stop screen sharing button/hotkey (the same as previous)
* Hotkeys customization
* CPU load provisioning (to allow client to minimize power consumption)


## Installation
Expand Down
12 changes: 0 additions & 12 deletions serviceWorker.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
self.importScripts('commands.js');

chrome.runtime.onMessage.addListener(
function(request, sender, sendResponse) {
if (chrome?.system?.cpu?.getInfo) {
chrome.system.cpu.getInfo(sendResponse);
} else {
sendResponse('unavailable');
}

return true;
}
);

chrome.commands.onCommand.addListener(function(command) {
if (command in commands) {
commands[command]?.();
Expand Down

0 comments on commit 8b28a25

Please sign in to comment.