mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-11-25 18:30:18 -06:00
more ssf name-space updates (#79)
This commit is contained in:
parent
19afba5928
commit
92822fec3f
@ -25,6 +25,7 @@
|
|||||||
"es6": true
|
"es6": true
|
||||||
},
|
},
|
||||||
"globals": {
|
"globals": {
|
||||||
"SYM_API": true
|
"SYM_API": true,
|
||||||
|
"ssf": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,7 @@
|
|||||||
|
|
||||||
num++;
|
num++;
|
||||||
|
|
||||||
var notf = new SYM_API.Notification(title, {
|
var notf = new ssf.Notification(title, {
|
||||||
body: (body + ' num=' + num + ' tag=' + tag),
|
body: (body + ' num=' + num + ' tag=' + tag),
|
||||||
image: imageUrl,
|
image: imageUrl,
|
||||||
flash: shouldFlash,
|
flash: shouldFlash,
|
||||||
@ -109,18 +109,18 @@
|
|||||||
var incBadgeEl = document.getElementById('inc-badge');
|
var incBadgeEl = document.getElementById('inc-badge');
|
||||||
incBadgeEl.addEventListener('click', function() {
|
incBadgeEl.addEventListener('click', function() {
|
||||||
badgeCount++;
|
badgeCount++;
|
||||||
SYM_API.setBadgeCount(badgeCount);
|
ssf.setBadgeCount(badgeCount);
|
||||||
});
|
});
|
||||||
|
|
||||||
var incBadgeEl = document.getElementById('clear-badge');
|
var incBadgeEl = document.getElementById('clear-badge');
|
||||||
incBadgeEl.addEventListener('click', function() {
|
incBadgeEl.addEventListener('click', function() {
|
||||||
badgeCount = 0;
|
badgeCount = 0;
|
||||||
SYM_API.setBadgeCount(0);
|
ssf.setBadgeCount(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
var snippetButton = document.getElementById('snippet');
|
var snippetButton = document.getElementById('snippet');
|
||||||
snippetButton.addEventListener('click', function() {
|
snippetButton.addEventListener('click', function() {
|
||||||
let snippet = new SYM_API.ScreenSnippet();
|
let snippet = new ssf.ScreenSnippet();
|
||||||
|
|
||||||
snippet
|
snippet
|
||||||
.capture()
|
.capture()
|
||||||
@ -149,11 +149,11 @@
|
|||||||
|
|
||||||
var front = document.getElementById('bring-to-front');
|
var front = document.getElementById('bring-to-front');
|
||||||
front.addEventListener('click', function() {
|
front.addEventListener('click', function() {
|
||||||
window.SYM_API.activate(win.name);
|
window.ssf.activate(win.name);
|
||||||
});
|
});
|
||||||
|
|
||||||
// register callback to be notified when size/position changes for win.
|
// register callback to be notified when size/position changes for win.
|
||||||
SYM_API.registerBoundsChange(onBoundsChange);
|
ssf.registerBoundsChange(onBoundsChange);
|
||||||
|
|
||||||
function onBoundsChange(arg) {
|
function onBoundsChange(arg) {
|
||||||
console.log('bounds changed for=', arg)
|
console.log('bounds changed for=', arg)
|
||||||
@ -161,7 +161,7 @@
|
|||||||
|
|
||||||
var getSources = document.getElementById('get-sources');
|
var getSources = document.getElementById('get-sources');
|
||||||
getSources.addEventListener('click', function() {
|
getSources.addEventListener('click', function() {
|
||||||
SYM_API.getMediaSources({types: ['window', 'screen']}, function(error, sources) {
|
ssf.getMediaSources({types: ['window', 'screen']}, function(error, sources) {
|
||||||
if (error) throw error
|
if (error) throw error
|
||||||
navigator.webkitGetUserMedia({
|
navigator.webkitGetUserMedia({
|
||||||
audio: false,
|
audio: false,
|
||||||
|
Loading…
Reference in New Issue
Block a user