Skip to content

Commit

Permalink
* (stephanritscher ) Added dynamic web manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanBluefox committed Nov 6, 2023
1 parent 9dde19f commit cbfc7d8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ Notice that these settings are valid only for reconnection and not for the first
* (agav99) added the new binding operation for getting property of JSON or object
* (agav99) Checked the initialization of the `local_` variables
* (agav99) fixed subscribeOidAtRuntime
* (stephanritscher ) Added dynamic web manifest

### 1.5.1 (2023-11-06)
* (bluefox) Changed License: it is now MIT, and the license check was removed
Expand Down
34 changes: 17 additions & 17 deletions www/js/vis.js
Original file line number Diff line number Diff line change
Expand Up @@ -3443,27 +3443,27 @@ function main($, onReady) {
};

// Dynamic webmanifest
var webmanifest = {
"name": "ioBroker vis",
"short_name": "vis",
"start_url": ".#" + vis.projectPrefix,
"display": "standalone",
"background_color" : "#ffffff" ,
"description": "WEB visualisation for ioBroker platform",
"icons": [{
"src": "img/vis.png",
"sizes": "192x192",
"type": "image/png"
}]
}
const webmanifest = {
name: 'ioBroker vis',
short_name: 'vis',
start_url: `.#${vis.projectPrefix}`,
display: 'standalone',
background_color : '#ffffff',
description: 'WEB visualisation for ioBroker platform',
icons: [{
src: 'img/vis.png',
sizes: '192x192',
type: 'image/png'
}],
};
const manifestString = JSON.stringify(webmanifest);
const manifestBlob = new Blob([manifestString], {type: 'application/json'});
const manifestURL = URL.createObjectURL(manifestBlob);
document.querySelector('#webmanifest').setAttribute('href', manifestURL);

var manifestLink = document.createElement('Link');
manifestLink.rel = "manifest";
manifestLink.setAttribute('href', 'data:application/json;charset=8' + manifestString)
const manifestLink = document.createElement('Link');
manifestLink.rel = 'manifest';
manifestLink.setAttribute('href', `data:application/json;charset=8${manifestString}`)
}

// für iOS Safari - wirklich notwendig?
Expand All @@ -3484,7 +3484,7 @@ function main($, onReady) {

$('.vis-version').html(vis.version);

vis.showWaitScreen(true, null, _('Connecting to Server...') + '<br/>', 0);
vis.showWaitScreen(true, null, `${_('Connecting to Server...')}<br/>`, 0);

function compareVersion(instVersion, availVersion) {
var instVersionArr = instVersion.replace(/beta/, '.').split('.');
Expand Down

0 comments on commit cbfc7d8

Please sign in to comment.