We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8f7fc8f commit 56f705fCopy full SHA for 56f705f
scripts/appicon.js
@@ -41,17 +41,16 @@ GetOption( {
41
return;
42
}
43
44
- /** @type {HTMLLinkElement} */
45
- const metaImage = document.querySelector( 'link[rel="image_src"]' );
+ const applicationConfigElement = document.getElementById( 'application_config' );
46
47
- if( !metaImage )
+ if( !applicationConfigElement )
48
{
49
50
51
52
- const url = new URL( metaImage.href );
+ const applicationConfig = JSON.parse( applicationConfigElement.dataset.config );
53
54
- icon.src = src.replace( '%CDN_HOST_MEDIA_SSL%', url.host );
+ icon.src = src.replace( 'https://%CDN_HOST_MEDIA_SSL%/', applicationConfig.MEDIA_CDN_URL );
55
} );
56
57
0 commit comments