-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 50814e5
Showing
7 changed files
with
223 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"name": "BigBlueButton Echo Test Skipper", | ||
"version": "0.0.0.1", | ||
"manifest_version": 2, | ||
"description": "An extension to skip the echo test in BigBlueButton video conferences.", | ||
"content_scripts": [{ | ||
"matches": ["*://*.blindsidenetworks.com/*", "*://*.bigbluebutton.org/*"], | ||
"js": ["skipper.js"] | ||
}], | ||
"icons": { | ||
"128": "icon.png" | ||
}, | ||
"browser_action": { | ||
"default_popup": "popup.html" | ||
}, | ||
"permissions": [ | ||
"storage" | ||
] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8" /> | ||
<title>BBB Echo Skip</title> | ||
</head> | ||
|
||
<body> | ||
<div id="colorBar"> | ||
<h1 id="active">Echo Test Skipper is Always Enabled</h1> | ||
<button id="toggle">Toggle</button> | ||
</div> | ||
<h2>Stealth Mode:</h2> | ||
<button id="stealth"></button> | ||
<h2>Background Color:</h2> | ||
<input type="color" id="backgroundInput"> | ||
<style> | ||
body { | ||
min-width: 300px; | ||
text-align: center; | ||
margin: 0px; | ||
padding: 0px; | ||
} | ||
|
||
h2 { | ||
color: grey; | ||
margin: 0px; | ||
} | ||
|
||
#active { | ||
color: white; | ||
position: relative; | ||
top: 20px; | ||
} | ||
|
||
#colorBar { | ||
height: 35vh; | ||
margin-bottom: 20vh; | ||
} | ||
|
||
#toggle { | ||
border: solid 5px grey; | ||
width: 40vw; | ||
height: 40vw; | ||
border-radius: 25vw; | ||
position: absolute; | ||
left: 30vw; | ||
top: calc(35vh - 20vw); | ||
font-size: 18pt; | ||
} | ||
|
||
#stealth { | ||
margin: 5vw; | ||
border-radius: 5px; | ||
border: none; | ||
color: white; | ||
background: #333; | ||
padding: 5px; | ||
font-size: 18px; | ||
width: 90vw; | ||
} | ||
|
||
#backgroundInput { | ||
width: 90vw; | ||
background: #333; | ||
border: none; | ||
border-radius: 5px; | ||
margin: 5vw; | ||
} | ||
|
||
</style> | ||
<script src="popup.js"></script> | ||
</body> | ||
|
||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
var enabled; | ||
chrome.storage.local.get(['skipEnabled', 'stealthEnabled', 'background'], function (result) { | ||
console.log(result.skipEnabled); | ||
console.log(result.stealthEnabled); | ||
enabled = result.skipEnabled; | ||
stealth = result.stealthEnabled; | ||
document.getElementById("backgroundInput").value = result.background; | ||
if (enabled == true) { | ||
document.getElementById("active").innerText = "Echo Test Skip is Enabled"; | ||
document.getElementById("toggle").innerText = "Disable"; | ||
document.getElementById("toggle").style.background = "#cc2929"; | ||
document.getElementById("toggle").style.borderColor = "#a62323"; | ||
document.getElementById("colorBar").style.background = "#29cc41"; | ||
} else { | ||
document.getElementById("active").innerText = "Echo Test Skip is Disabled"; | ||
document.getElementById("toggle").innerText = "Enable"; | ||
document.getElementById("toggle").style.background = "#29cc41"; | ||
document.getElementById("toggle").style.borderColor = "#23a636"; | ||
document.getElementById("colorBar").style.background = "#cc2929"; | ||
} | ||
if(stealth){ | ||
document.getElementById("stealth").innerText = "Disable Stealth Mode"; | ||
} else { | ||
document.getElementById("stealth").innerText = "Enable Stealth Mode"; | ||
} | ||
}); | ||
|
||
document.getElementById("toggle").addEventListener("click", toggleActive); | ||
document.getElementById("stealth").addEventListener("click", stealthActive); | ||
document.getElementById("backgroundInput").addEventListener("input", updateBackground); | ||
|
||
function toggleActive() { | ||
if (enabled == true) { | ||
chrome.storage.local.set({ | ||
'skipEnabled': false | ||
}, function () { | ||
window.location.reload(); | ||
}); | ||
} else { | ||
chrome.storage.local.set({ | ||
'skipEnabled': true | ||
}, function () { | ||
window.location.reload(); | ||
}); | ||
} | ||
} | ||
|
||
function stealthActive() { | ||
if (stealth == true) { | ||
chrome.storage.local.set({ | ||
'stealthEnabled': false | ||
}, function () { | ||
window.location.reload(); | ||
}); | ||
} else { | ||
chrome.storage.local.set({ | ||
'stealthEnabled': true | ||
}, function () { | ||
window.location.reload(); | ||
}); | ||
} | ||
} | ||
|
||
function updateBackground(){ | ||
chrome.storage.local.set({'background': document.getElementById("backgroundInput").value}, function () {}); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
chrome.storage.local.get(['skipEnabled', 'stealthEnabled', 'background'], function (result) { | ||
console.log(result.skipEnabled); | ||
console.log(result.stealthEnabled); | ||
console.log(result.background); | ||
enabled = result.skipEnabled; | ||
stealth = result.stealthEnabled; | ||
background = result.background; | ||
if(result.background == undefined){ | ||
background = "#06172A"; | ||
} | ||
document.body.style.background = background; | ||
if (enabled == true) { | ||
if (!stealth) { | ||
var loadingScreen = document.createElement("div"); | ||
loadingScreen.innerHTML = "<div style='width: 100vw; height: 100vh; z-index=10000000000000000; background: " + background + "; text-align: center; position: fixed; top: 0vh; color: white;' id='skipper-loading-popup'><!--<h1>Skipping Echo Test. Please Wait...</h1>--><img style=' margin-top: 45vh' src='https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fgifimage.net%2Fwp-content%2Fuploads%2F2017%2F09%2Fajax-loading-gif-transparent-background-8.gif&f=1&nofb=1' width='50px'></div>"; | ||
document.body.appendChild(loadingScreen); | ||
document.getElementById("app").style.opacity = "0"; | ||
} | ||
|
||
function eventFire(el, etype) { | ||
if (el.fireEvent) { | ||
el.fireEvent('on' + etype); | ||
} else { | ||
var evObj = document.createEvent('Events'); | ||
evObj.initEvent(etype, true, false); | ||
el.dispatchEvent(evObj); | ||
} | ||
} | ||
|
||
var loadInterval = setInterval(isLoaded, 100); | ||
|
||
function isLoaded() { | ||
if (document.getElementsByClassName('jumbo--Z12Rgj4')[0] !== undefined) { /* The buttons have loaded, click them */ | ||
console.log("Loaded!"); | ||
eventFire(document.getElementsByClassName('jumbo--Z12Rgj4')[0], 'click'); | ||
if (!stealth) { | ||
document.getElementsByClassName("portal--27FHYi")[0].style.opacity = "0"; | ||
} | ||
clearInterval(loadInterval); | ||
setTimeout(function () { //Give the first prompt 500ms to close, then start checking the buttons again | ||
var loadInterval = setInterval(isEchoLoaded, 100); | ||
}, 500); | ||
} else { | ||
console.log("Not Loaded!") | ||
} | ||
} | ||
|
||
function isEchoLoaded() { | ||
if (document.getElementsByClassName('jumbo--Z12Rgj4')[0] !== undefined) { /* The buttons have loaded, click them */ | ||
eventFire(document.getElementsByClassName('jumbo--Z12Rgj4')[0], 'click'); | ||
if (!stealth) { | ||
document.getElementById('skipper-loading-popup').style.display = 'none'; | ||
document.getElementById("app").style.opacity = "1"; | ||
document.getElementsByClassName("portal--27FHYi")[0].style.opacity = "1"; | ||
} | ||
clearInterval(loadInterval); | ||
} | ||
} | ||
|
||
} | ||
}); |