initial upload to git

This commit is contained in:
2021-04-14 17:42:07 +02:00
commit 9b6605fb69
20 changed files with 2398 additions and 0 deletions
Binary file not shown.
+13
View File
@@ -0,0 +1,13 @@
MIT License
Copyright 2018 Simon Lorenz
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+150
View File
@@ -0,0 +1,150 @@
{
"appName": {
"message": "JWConf Signal",
"description": "Der angezeigte Titel der Applikation im web store."
},
"appDesc": {
"message": "Weckt die Aufmerksamkeit des Anlangenbedieners: die Farbe eines Großteiles der Seite wird verändert wenn sich ein Teilnehmer meldet.",
"description":"Die angezeigte Beschreibung der Applikation im web store."
},
"de_headlineToAttach": {
"message": "Live",
"description":"Überschrift an die die weiteren UI Elemente eingefügt werden. Live Monitor"
},
"en_headlineToAttach": {
"message": "Live",
"description":"Headline to which additional UI elements get attached. Live Monitor"
},
"fr_headlineToAttach": {
"message": "Interface Live",
"description":"Titre auquel les éléments d'interface utilisateur supplémentaires sont attachés. Interface Live"
},
"gr_headlineToAttach": {
"message": "Live",
"description":"Επικεφαλίδα στην οποία επισυνάπτονται πρόσθετα στοιχεία UI. Live Monitor"
},
"it_headlineToAttach": {
"message": "Live",
"description":"Titolo a cui aggiungere elementi di interfaccia utente aggiuntivi. Live Monitor"
},
"de_configMenu_Language": {
"message": "Sprache:",
"description":""
},
"en_configMenu_Language": {
"message": "Language:",
"description":""
},
"fr_configMenu_Language": {
"message": "La langue:",
"description":""
},
"gr_configMenu_Language": {
"message": "Γλώσσα:",
"description":""
},
"it_configMenu_Language": {
"message": "Linguaggio:",
"description":""
},
"de_configMenu_ChooseBackgroundColor": {
"message": "Bitte wähle die Hintergrundfarbe aus:",
"description":""
},
"en_configMenu_ChooseBackgroundColor": {
"message": "Please choose the background color:",
"description":""
},
"fr_configMenu_ChooseBackgroundColor": {
"message": "S'il vous plaît choisir la couleur de fond:",
"description":""
},
"gr_configMenu_ChooseBackgroundColor": {
"message": "Επιλέξτε το χρώμα φόντου:",
"description":""
},
"it_configMenu_ChooseBackgroundColor": {
"message": "LanguaPer favore, scegli il colore di sfondo:",
"description":""
},
"de_configMenu_ColorChange": {
"message": "Ändern",
"description":""
},
"en_configMenu_ColorChange": {
"message": "Change",
"description":""
},
"fr_configMenu_ColorChange": {
"message": "Changement",
"description":""
},
"gr_configMenu_ColorChange": {
"message": "Αλλαγή",
"description":""
},
"it_configMenu_ColorChange": {
"message": "Modificare",
"description":""
},
"de_configMenu_FlashBackground": {
"message": "Hintergrund blinkend",
"description":""
},
"en_configMenu_FlashBackground": {
"message": "Flash Background",
"description":""
},
"fr_configMenu_FlashBackground": {
"message": "Fond Flash",
"description":""
},
"gr_configMenu_FlashBackground": {
"message": "Λάμψη Ιστορικό",
"description":""
},
"it_configMenu_FlashBackground": {
"message": "Sfondo flash",
"description":""
},
"de_configMenu_Test": {
"message": "Testen",
"description":""
},
"en_configMenu_Test": {
"message": "Test",
"description":""
},
"fr_configMenu_Test": {
"message": "Tester",
"description":""
},
"gr_configMenu_Test": {
"message": "Δοκιμή",
"description":""
},
"it_configMenu_Test": {
"message": "Test",
"description":""
},
"de_configMenu_Close": {
"message": "Schliessen",
"description":""
},
"en_configMenu_Close": {
"message": "Close",
"description":""
},
"fr_configMenu_Close": {
"message": "Fermer",
"description":""
},
"gr_configMenu_Close": {
"message": "Κοντά",
"description":""
},
"it_configMenu_Close": {
"message": "Vicino",
"description":""
}
}
+10
View File
@@ -0,0 +1,10 @@
{
"appName": {
"message": "JWConf Signal",
"description": "The title of the application, displayed in the web store."
},
"appDesc": {
"message": "This app does something awesome.",
"description":"The description of the application, displayed in the web store."
}
}
+11
View File
@@ -0,0 +1,11 @@
chrome.runtime.onMessage.addListener(
function(request, sender, sendResponse) {
console.log(sender.tab ?
"from a content script:" + sender.tab.url :
"from the extension");
if (request.greeting == "raise")
// send message to native messaging host
//actually its a fake message, it only opens the ZoomRaiseHand Script
chrome.runtime.sendNativeMessage('de.joelbaldauf.jwconfzoomhand', { text: 'raisehand' });
});
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

+29
View File
@@ -0,0 +1,29 @@
/*
JWConf Signal
Increase signal visibility of telco attendees asking to give a comment
2018.04.29
(c) 2018 - Simon Lorenz - werbung@lorenzweb.net
https://github.com/...
*/
function injectJsCode(link) {
var scr = document.createElement("script");
scr.type="text/javascript";
scr.src=link;
(document.head || document.body || document.documentElement).appendChild(scr);
}
function pageLoaded() {
var colorPickerElement = document.getElementById("signalColorPickerDiv");
if (typeof(colorPickerElement) !== "undefined" && colorPickerElement !== null) {
injectJsCode(chrome.extension.getURL("/jscolor.js"));
} else {
setTimeout(function () {
pageLoaded();
}, 1000);
}
}
document.onload = pageLoaded();
Binary file not shown.
+9
View File
@@ -0,0 +1,9 @@
{
"name": "de.joelbaldauf.jwconfzoomhand",
"description": "Display raised hand from JWConf on Zoom",
"path": "run-host.bat",
"type": "stdio",
"allowed_origins": [
"chrome-extension://hhcadpapjmemfpokloljohmahipbjhmb/"
]
}
+1
View File
@@ -0,0 +1 @@
REG ADD "HKCU\Software\Google\Chrome\NativeMessagingHosts\de.joelbaldauf.jwconfzoomhand" /ve /t REG_SZ /d "%~dp0nativehost.json" /f
+2
View File
@@ -0,0 +1,2 @@
@echo off
start "" ZoomRaiseHand.exe
+1
View File
@@ -0,0 +1 @@
REG DELETE "HKCU\Software\Google\Chrome\NativeMessagingHosts\de.joelbaldauf.jwconfzoomhand" /f
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

+4
View File
File diff suppressed because one or more lines are too long
+1855
View File
File diff suppressed because it is too large Load Diff
+277
View File
@@ -0,0 +1,277 @@
/*
JWConfZoomHand
2020.08.04
Based on JWConf Signal 2018.04.29
(c) 2018 - Simon Lorenz - werbung@lorenzweb.net
*/
(function() {
// used locale
var requestedLocale = "de";
// switch enabled
var signalEnabled = true;
// remember testActive
var testActive = false;
// remember if zoom hand raised
var ZoomHandRaised = false;
var JWConfRaisings = 0;
// loop through table of attendees and call for observer subscription
function subscribeNewAttendees() {
if (signalEnabled === false) {
return;
}
var tableAttendees = document.getElementById("confroom");
if (typeof(tableAttendees) !== "undefined" && tableAttendees !== null) {
for (var i = 0, row; row = tableAttendees.rows[i]; i++) {
if (row.parentNode.localName !== "thead")
addObserver(row);
}
}
}
function updateJWConfRaisings() {
JWConfRaisings = document.evaluate('count(//table[@class="monitorTbl"]//tr[@class="detected meldung-blue" or @class="detected meldungActive"])', document, null, XPathResult.ANY_TYPE, null ).numberValue;
}
function subscribeAttList() {
var x = new MutationObserver(function (e) {
if (e[0].removedNodes) {
updateJWConfRaisings();
decideZoomHand(false);
}
});
x.observe(document.getElementById('confroom'), { childList: true, subtree: true});
}
// add observer for any new attendee
function addObserver(addToElement) {
if (!addToElement.classList.contains('detected')) {
addToElement.classList.add('detected');
var observer = new MutationObserver(function(mutations) {
if (signalEnabled === false) {
return;
}
mutations.forEach(function(mutation) {
if (mutation.attributeName === "class") {
var attributeValue = $(mutation.target).prop(mutation.attributeName);
console.log("Class attribute", addToElement.children[0].innerText, "changed to:", attributeValue);
if (attributeValue === "detected meldung-blue") {
decideZoomHand(true);
} else if (attributeValue === "detected") {
updateJWConfRaisings();
decideZoomHand(false);
}
}
});
});
observer.observe(addToElement, {
attributes: true
});
}
}
// send message to background script to raise hand in zoom if raised hand is active, else send message to lower hand
function decideZoomHand(actionRaise) {
contentElement = document.getElementById("content");
if (typeof(contentElement) !== "undefined" && contentElement !== null) {
if (actionRaise === true) {
if (ZoomHandRaised === false) {
//send message to background script which opens the ZoomRaiseHand Script
chrome.runtime.sendMessage({greeting: "raise"});
ZoomHandRaised = true;
}
} else {
// check if any other is still raising else all good, lower hand
if (JWConfRaisings > 0) {
console.log("There are some other raisings")
return;
}
if (ZoomHandRaised === true ) {
chrome.runtime.sendMessage({greeting: "raise"});
ZoomHandRaised = false;
}
}
}
}
// add on/off selector to "Live Monitor" headline
function addSelectorToMonitorHeadline() {
var headlineToFind = getMessage("headlineToAttach");
var h4Elements = document.getElementsByTagName("h4");
if (typeof(h4Elements) !== "undefined" && h4Elements !== null) {
for (var i=0, h4Element; h4Element = h4Elements[i]; i++) {
if (typeof(h4Element.childNodes) !== "undefined" && h4Element.childNodes !== null) {
for (var ii=0, childNode; childNode = h4Element.childNodes[ii]; ii++) {
if (typeof(childNode.nodeValue) !== "undefined" && childNode.nodeValue !== null) {
if (childNode.nodeValue.startsWith(headlineToFind) || childNode.nodeValue.startsWith("Live") || childNode.nodeValue.startsWith("Interface Live")) {
// add selector
var selectorElem = document.createElement("div");
selectorElem.style = "display: inline-block; margin-left: 10px;height: 22px;background-color: #c60f13;width: 49px;";
selectorElem.innerHTML = '<div id="switchSignalSelector" style="background-color: white; width: 18px; height: 14px; margin-top: 4px; margin-left: 27px;"></div>'
selectorElem.id = 'signalSelector';
selectorElem.addEventListener("click", function( e ) {
toggleSelectorSignal();
});
selectorElem.addEventListener("contextmenu", function( e ) {
openTestMenu();
e.preventDefault();
}, false);
h4Element.insertBefore(selectorElem, h4Element.childNodes[ii+1]);
// add test menu (originally color picker)
var testMenuElem = document.createElement("div");
testMenuElem.style = "position: absolute; top: 100px; left: 50px; display: none; background-color: #0a0a0a; color: #dadada; padding: 10px; font-size: 1rem; min-width:250px; min-height:170px; border: 2px solid #cacaca; -webkit-box-shadow: 10px 10px 20px 0px rgba(0,0,0,0.75); -moz-box-shadow: 10px 10px 20px 0px rgba(0,0,0,0.75); box-shadow: 10px 10px 20px 0px rgba(0,0,0,0.75); z-index: 1;";
testMenuElem.innerHTML = /*getMessage("configMenu_Language") + '&nbsp;&nbsp;<select id="languageSel" name="language" size="1" style="height: 1.5rem; font-size: 1.0rem; padding: .1rem .1rem .1rem .5rem; width: 150px;"><option>English</option><option>Deutsch</option><option>Ελληνική</option><option>Italiano</option><option>Français</option></select><br>' + */ '<input type="submit" id="btnTestJWConfSignal" style="color: black; float: left;"; value="' + getMessage("configMenu_Test") + '"/><input type="submit" id="btnCloseJWConfSignal" style="color: black; float: right;"; value="' + getMessage("configMenu_Close") + '"/>'
testMenuElem.id = 'testMenuDiv';
h4Element.insertBefore(testMenuElem, h4Element.childNodes[ii+2]);
// handle test
$('#btnTestJWConfSignal').click(function() {
if (testActive !== true) {
startTest();
}
});
// handle close
$('#btnCloseJWConfSignal').click(function() {
stopTest();
closeTestMenu();
});
return;
}
}
}
}
}
}
}
//open test menu
function openTestMenu() {
var testMenuDivElem = document.getElementById("testMenuDiv");
if (typeof(testMenuDivElem) !== "undefined" && testMenuDivElem !== null) {
testMenuDivElem.style.display = "block";
}
}
//close test menu
function closeTestMenu() {
var testMenuDivElem = document.getElementById("testMenuDiv");
if (typeof(testMenuDivElem) !== "undefined" && testMenuDivElem !== null) {
testMenuDivElem.style.display = "none";
}
}
function startTest() {
testActive = true;
decideZoomHand(true);
}
function stopTest() {
testActive = false;
decideZoomHand(false);
}
function setSubscriptions() {
subscribeNewAttendees();
}
function toggleSelectorSignal() {
if (signalEnabled === true) {
var signalElem = document.getElementById("signalSelector");
if (typeof(signalElem) !== "undefined" && signalElem !== null) {
signalElem.style.background = "#cacaca";
}
signalElem = document.getElementById("switchSignalSelector");
if (typeof(signalElem) !== "undefined" && signalElem !== null) {
signalElem.style.marginLeft = "5px";
}
signalEnabled = false;
} else {
var signalElem = document.getElementById("signalSelector");
if (typeof(signalElem) !== "undefined" && signalElem !== null) {
signalElem.style.background = "#c60f13";
}
signalElem = document.getElementById("switchSignalSelector");
if (typeof(signalElem) !== "undefined" && signalElem !== null) {
signalElem.style.marginLeft = "27px";
}
signalEnabled = true;
setSubscriptions();
}
}
function getMessage(msgName) {
var localMsg = requestedLocale+"_"+msgName;
return chrome.i18n.getMessage(localMsg);
}
function startNewAttendeesDetection() {
// check for new attendees every 15 sec
window.setInterval(function() {
subscribeNewAttendees();
}, 15000);
}
function detectedLiveMonitorHeadlineElement() {
var h4Elements = document.getElementsByTagName("h4");
if (typeof(h4Elements) !== "undefined" && h4Elements !== null) {
for (var i=0, h4Element; h4Element = h4Elements[i]; i++) {
if (typeof(h4Element.childNodes) !== "undefined" && h4Element.childNodes !== null) {
for (var ii=0, childNode; childNode = h4Element.childNodes[ii]; ii++) {
if (typeof(childNode.nodeValue) !== "undefined" && childNode.nodeValue !== null) {
if (childNode.nodeValue.startsWith(getMessage("headlineToAttach")) || childNode.nodeValue.startsWith("Live") || childNode.nodeValue.startsWith("Interface Live")) {
return true
}
}
}
}
}
}
return false;
}
function waitForTelcoElements() {
if (detectedLiveMonitorHeadlineElement() === false) {
setTimeout(function () {
waitForTelcoElements();
}, 1000);
} else {
addSelectorToMonitorHeadline();
startNewAttendeesDetection();
subscribeAttList();
//folgende Zeile auskommentieren, wenn die Konferenz nicht automatisch verbunden werden solls
//document.evaluate('//*[@id="hall"]/div[2]/div[2]/div/div/div[1]/div/a', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null ).singleNodeValue.click()
}
}
function startup() {
// runs ones when page is loaded, but telco attendees are added dynamically
waitForTelcoElements();
}
startup();
})();
+36
View File
@@ -0,0 +1,36 @@
{
// Extension ID: hhcadpapjmemfpokloljohmahipbjhmb
"key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtXRV6Vq2HTR6M1ryxP+8c4EvfCNo1K7SY8rkpBAdvZfDuxPB89Tkkm282/pkyl0ppmTyCpYO3bIXPKuDSg5TZfAItfXF2VgoMVUjXwiWy6qSiAkdaoHyNLuQqCcexqNvvqnKgfvkiZBK3HPNJzZFpx9BMFvSoG4RQz7GjYGjqzu95LW6tmI0HAMDKzHihdZ6d6oCgov/yJXIYyUBUSz+uVYpLM2xHRaOxU76AS896RzUNZEV5CUvioclqrmqQDp4gB7NJ2tDODil11T2yE4cVuIz9z/X3eZ7Y1mBmfHK1WnnFb+N5PMu/n1fA6re0bqAg6rT8gZNdeXlcAlytts4nwIDAQAB",
"name":"jwconfzoomhand",
"short_name":"JWConfZoomHand",
"version":"2021.01.10",
"manifest_version":2,
"default_locale": "de",
"description":"-",
"web_accessible_resources" : ["/jscolor.js", "/checkMark.png"],
"icons": {
"128": "icon_128px.png",
"48": "icon_48px.png"
},
"background": {
"scripts": ["background.js"],
"persistent": true
},
"browser_action": {
"default_icon": "icon_48px.png"
},
"content_scripts": [
{
"matches": ["*://jwconf.org/*"],
"js": ["/jquery.min.js", "content.js", "/jwconfsignal.js"],
"run_at": "document_end"
}
],
"permissions":[
"activeTab",
"nativeMessaging"
],
"homepage_url": "http://test.local"
}