Fonts are not visible for my custom script chrome extension.
Folder structure:
assets
-fonts
content-app
manifest.json
manifest.json:
(...)
"content_scripts": [
{
"all_frames": false,
"js": ["/content-app/runtime.js", "/content-app/polyfills.js", "/content-app/styles.js", "/content-app/main.js"],
"matches": ["https://*/*"],
"match_about_blank": true,
"run_at": "document_idle"
}
],
"web_accessible_resources": [
"assets/fonts/icons.ttf",
"assets/fonts/icons.eot",
"assets/fonts/icons.svg",
"assets/fonts/icons.woff"
],
scss:
$icomoon-font-family: 'icons' !default;
$icon-equalizer: '\e912';
#font-face {
font-family: '#{$icomoon-font-family}';
src: url('chrome-extension://__MSG_##extension_id__/assets/fonts/#{$icomoon-font-family}.eot?64agaf');
src: url('chrome-extension://__MSG_##extension_id__/assets/fonts/#{$icomoon-font-family}.eot?64agaf#iefix') format('embedded-opentype'),
url('chrome-extension://__MSG_##extension_id__/assets/fonts/#{$icomoon-font-family}.ttf?64agaf') format('truetype'),
url('chrome-extension://__MSG_##extension_id__/assets/fonts/#{$icomoon-font-family}.woff') format('woff'),
url('chrome-extension://__MSG_##extension_id__/assets/fonts/#{$icomoon-font-family}.svg?64agaf##{$icomoon-font-family}') format('svg')
format('svg');
font-weight: normal;
font-style: normal;
font-display: block;
}
[class^='icon-'],
[class*=' icon-'] {
font-family: '#{$icomoon-font-family}' !important;
speak: never;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-equalizer {
&:before {
content: $icon-equalizer;
}
}
If I open chrome url with: chrome-extension://xxxxx/assets/fonts/icons.ttf, the file will be downloaded properly so it seems ok, but when I add some code to my content script like:
<span class="icon-equalizer"></span>
then nothing happens (I can see '' only). Any idea?
Because of many reasons I use shadow-root, and you can find the code from that element:
#shadow-root
<style>
#font-face{font-family:"icons";src:url("chrome-extension://__MSG_##extension_id__/assets/fonts/icons.eot?64agaf");src:url("chrome-extension://__MSG_##extension_id__/assets/fonts/icons.eot?64agaf#iefix") format("embedded-opentype"),url("chrome-extension://__MSG_##extension_id__/assets/fonts/icons.ttf?64agaf") format("truetype"),url("chrome-extension://__MSG_##extension_id__/assets/fonts/icons.woff") format("woff"),url("chrome-extension://__MSG_##extension_id__/assets/fonts/icons.svg?64agaf#icons") format("svg") format("svg");font-weight:normal;font-style:normal;font-display:block}[class^='icon-'],[class*=' icon-']{font-family:"icons" !important;speak:never;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-equalizer:before{content:""}
(...)
</style>
Related
I am using Parcel to pack SCSS into using postCSS.
My postCSS config has only autoprefixer and tailwind.
My scss file has this:
#font-face {
font-family: NBE;
src: url('../fonts/NBE-Regular.eot');
src: url('../fonts/NBE-Regular.eot#iefix') format('embedded-opentype'),
url('../fonts/NBE-Regular.woff2') format('woff2'),
url('../fonts/NBE-Regular.woff') format('woff');
font-weight: normal;
font-style: normal;
}
but it outputs
#font-face {
font-family: NBE;
src: url("/NBE-Regular.f90b15ca.eot");
src: url("/NBE-Regular.f90b15ca.eot#iefix") format("embedded-opentype"),
url("/NBE-Regular.6b2ab3ea.woff2") format("woff2"),
url("/NBE-Regular.2ec20d61.woff") format("woff");
font-weight: normal;
font-style: normal;
}
Note the location under url(), so get a 404 for the font file.
I don't know what this hash or version thing is
And why does it change the URL like that?
UPDATE:
I noticed that all those files are copied to dist folder, however that folder is not the root, so URL is still wrong..
Using java SAP Cloud SDK version 3.9.0
We have a code snippet for reading Outbound Delivery Items from S/4 while looks like this:
List<OutbDeliveryItem> items = new DefaultOutboundDeliveryV2Service()
.getAllOutbDeliveryItem()
.filter(OutbDeliveryItem.DELIVERY_DOCUMENT.eq("someDocument"))
.execute(someDestination);
The code executes successfully and is able to read the items from S/4. But below exception always gets logged:
ERROR com.sap.cloud.sdk.odatav2.connectivity.cache.metadata.GuavaMetadataCache - Error occurred while populating metadata:
com.sap.cloud.sdk.datamodel.odata.helper.ODataVdmErrorResultHandler$ErpODataException: The endpoint responded with HTTP error code 401.
Logon failed. 401 Not authorized.
Full error message:
<html><head><meta http-equiv="content-type" content="text/html; charset=windows-1252"><title>Logon failed</title><style>body { background: #ffffff; text-align:
center; width:100%; height:100%; overflow:hidden; }.content { display: table; position:absolute; width:100%; height:80%; }.valigned { display: table-cell; vertical-align: middle; }.lowerCenter { display: table-
cell; vertical-align: bottom; }.footer { position: absolute; bottom: 0; left: 0; width: 100%; z-index: -1; }.footerLeft { float: left; margin-left: 20px; }.footerRight { float: right; margin-right: 20px; positio
n: absolute; bottom: 0px; right: 0px; }.centerText { font-style: normal; font-family: Arial; font-size: 26px; color: #444444; z-index: 1; }.errorTextHeader { font-style: normal; font-family: Arial; font-size: 40
px; color: #444444; }.bottomText { align: center; font-style: normal; font-family: Arial; font-size: 14px; color: #444444; }.biggerBottomText { align: center; font-style: normal; font-family: Arial; font-size: 1
6px; color: #444444; }.detailTable { align: bottom; vertical-align: middle; margin-left:auto; margin-right:auto; font-style: normal; font-family: Arial; font-size: 16px; color: #444444; }</style></head><body><di
v class="content"><div class="valigned"><p class="centerText"><span class="errorTextHeader"> 401 Not authorized </span></p></div></div><div class="footer"><div class="footerLeft"><img width='150' height='80' tit
le='' alt='SAP logo'src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAABQCAYAAAGMt7zdAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAFhpJREFUeNpiZEAAJiBmZCAd/IdhmGYWhu0ffzNQAjz5mVigTGa291/JNudXlBQHA5K3
2P////8DWQHv9LsMnzOVGWTm3mf4+OsfmI0sBwNfslQ4gdRPkDeZkA24/OoHg1DHFTCGaX6SrMjA+vE7mA0SBwEQH4SRDUI2h120+sx/GDh67xOYhokhy8H4QD0cuCKMfcXJl/8lCo7+xwYevf0BpkHyIIzPIFiYYQDp9AP/Vx17jsLHZxBMkE02cc9PQrH2eL4L1jBCN4wZaiMzDlv
/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E5zNydT6uBn/vh5e9fiN01c0we8s1fLxHLJhaKws0xj2Lu4WH8ghYz67Ic7sAFhqKEiarYeHk/hDcu4fXLqzBdoN01U0dY50BQaKOiSSAZqddg7vr
Jnrl/JAu1JazNVBpaO04bVD1j8awL6lbAiUJLPUX5z1SWS1hSn/4VjMEurIhjanl0yOJ1+WUXRJ+CsRAPdi/pFsDJempsF0IAykcXfxmgv3zrEu1uCHpOCGLigiCFYQ3rDNtuZhzZBESIprY1Bdq6g8s9QugJIJFQ+TTvTpAhQzJajlKa8nOMFg04apMG1CHPvMroCSBhcQw81a/2KU
uZNsZPS5YGjsuzAb9kzDwGfYfF6J1Sqqa4EKpEWJGhNrW99xPftDcHlgZwSHvYbUNqMPL/BIoSTGWp6rXespKqswwfU2BW9teTZ2ENfQ8Yak5dzhl6JBZzbVL7+6as9ufgZLisZiBiX/hN5E2r/DeJDXMiVHj91LtRGEdrM66CTGjQiF1AXkdalRRmHQIcrYvd16HbZ+O9UxvcgyFVJ
MNqMy5sgDKXY+FXyMTTgv+Eg2BhoYj/BrWUQm9pLIRGpopIv3D7mzIQ9XsmScroIQ8FgOuv1phHgfvwjvW32/BjZRqvwIKlQDfK0+g+MByLAepYl3OMKAYB1D74mQNFBtYXF7KpakUsFxiqOqseAUokcG7q+qIAtYjD1W3VP9HXCbwp0/JCiiSGMv5b9r/u4MQqP/qk/RZ8zKd4GGDS
XZA8cXPctPHYgiW8+lIcaWhyxIoIARArop+fNKJXJCxLZetj1c0SMVBJkabU9ZBg6KaLH6IZET+rYDlwfX9GSyp68rC/gcKtRRHC4+EWgAAAABJRU5ErkJggg=='></div><div class="footerRight"><p class="bottomText"><span class="biggerBottomText">&c
opy;</span>2020 SAP SE, All rights reserved.</p></div></div></body></html>
at com.sap.cloud.sdk.datamodel.odata.helper.ODataVdmErrorResultHandler.createException(ODataVdmErrorResultHandler.java:117)
at com.sap.cloud.sdk.datamodel.odata.helper.ODataVdmErrorResultHandler.createError(ODataVdmErrorResultHandler.java:97)
at com.sap.cloud.sdk.datamodel.odata.helper.ODataVdmErrorResultHandler.createError(ODataVdmErrorResultHandler.java:33)
at com.sap.cloud.sdk.odatav2.connectivity.internal.ODataConnectivityUtil.checkHttpStatus(ODataConnectivityUtil.java:219)
at com.sap.cloud.sdk.odatav2.connectivity.cache.metadata.GuavaMetadataCache.getEdm(GuavaMetadataCache.java:239)
at com.sap.cloud.sdk.odatav2.connectivity.cache.metadata.GuavaMetadataCache.getEdm(GuavaMetadataCache.java:156)
at com.sap.cloud.sdk.odatav2.connectivity.ODataQuery.loadMetadata(ODataQuery.java:379)
at com.sap.cloud.sdk.odatav2.connectivity.ODataQuery.loadEntriesFromDestination(ODataQuery.java:310)
at com.sap.cloud.sdk.odatav2.connectivity.ODataQuery.internalExecute(ODataQuery.java:253)
at com.sap.cloud.sdk.odatav2.connectivity.ODataQuery.execute(ODataQuery.java:151)
at com.sap.cloud.sdk.odatav2.connectivity.ODataQuery.execute(ODataQuery.java:135)
at com.sap.cloud.sdk.datamodel.odata.helper.FluentHelperRead.execute(FluentHelperRead.java:250)
I examined our destination setup on Cloud Foundry and the setup on cloud connector as well. The setup is correct. If it was a problem with the setup, then the code would not have been able to read the items from S/4.
Upon debugging the sdk code a bit, I found a method com.sap.cloud.sdk.odatav2.connectivity.OdataQuery.execute() while tries to execute the read request 2 times. First time the read fails as the code is not able to fetch metadata and throws the exception that I've mentioned earlier in my question. Second time the read is successful (Code is able to read the metadata). I could have pasted the code snippet from sdk here but I am not sure if it is appropriate to do so.
I have following questions:
Is something wrong with my code? (I suppose not since it is able to read the items from S/4) If something is wrong, then what is it?
Is this a bug in sdk? If yes then when will it be fixed?
If this is something internal to sdk, which I shouldn't be worried about then how can I stop this exception from being logged? I have to get rid of the error log since it will generate false alerts in our production system.
Please let me know if you require any more info.
P.S.: I have seen a lot of comments on this blog from people facing the same problem.
This issue is solved as of SAP Cloud SDK version 3.11.0.
For the life of me, I cannot get my Chrome extension to display an iframe with a remote URL.
I see the following message in the console -
Refused to frame 'https://www.example.com/' because it violates the following Content Security Policy directive: "child-src 'self'". Note that 'frame-src' was not explicitly set, so 'child-src' is used as a fallback.
I found a solution on here (Injecting iframe into page with restrictive Content Security Policy), which requires injecting a local iframe which then comatins another iframe that references the remote url. This is supposed to bypass the sontent security policy. But for some reason, it does not seem to work in my case. Am I missing something or has the chrome security policy changed?
Below are portions of my extension that pertain to this issue. Note - this code is not the prettiest as I've been hacking around trying to get this to work.
The way this works right now is background.js sends a message to inject.js. inject.js inserts the first iframe, referencing the local file infobar.html. This page is our main user interface, we want the remote html page displayed in an iframe as part of this page. Then infobar.js inserts an iframe referencing the local file frame.html. Finally, frame.html has an iframe hard coded to our remote url.
Based on the previous answer, only the first iframe should have been subject to the content security policy. However, that doesn't seem to be the case here, as the one referencing example.com is actually 3 iframes deep.
manifest.json
{
...
"content_security_policy": "script-src 'self'; object-src 'self'; frame-src https://www.example.com; child-src https://www.example.com",
"background": {
"scripts": [
"js/jquery/jquery.min.js",
"src/bg/background.min.js"
],
"persistent": true
},
...
"content_scripts": [
{
...
"css": [
...
"src/inject/inject.min.css"
],
"js": [
...
"src/inject/inject.min.js"
]
}
],
"externally_connectable": {
"matches": [
"*://localhost/*",
"*://*.example.com/*
]
},
"web_accessible_resources": [
"src/inject/inject.html",
"src/inject/infobar.html",
"src/inject/infobar.min.js",
"src/inject/frame.html"
],
"sandbox": {
"pages": [
"src/inject/infobar.html",
"src/inject/frame.html"
]
}
}
inject.js
var iframe = document.createElement("iframe");
iframe.scrolling = "no";
iframe.style.cssText = "display:none;";
...
$(iframe).load(function () {
var message = {
command: "render-frame",
context: data,
frameUrl: chrome.runtime.getURL("src/inject/frame.html")
};
iframe.contentWindow.postMessage(message, '*');
iframe.style.cssText = "border: 0px; overflow: visible; padding: 0px; right: auto; width: 100%; height: " + toolbarHeight + "px; top: 0px; left: 0px; z-index: 2147483647; box-shadow: rgba(0, 0, 0, 0.498039) 0px 3px 10px; position: fixed; display: none;";
});
...
iframe.src = chrome.runtime.getURL("src/inject/infobar.html");
...
document.documentElement.appendChild(iframe);
infobar.html
Simple HTML page. Nothing pertinent in there. References infobar.js.
infobar.js
window.addEventListener("message", function (event) {
var command = event.data.command;
switch (command) {
case "render-frame":
var frame = document.createElement("iframe");
frame.scrolling = "no";
frame.src = event.data.frameUrl;
document.getElementById("content").appendChild(frame);
...
break;
}
});
frame.html
<html>
<head>
<style>
html, body, iframe, h2 {
margin: 0;
border: 0;
padding: 0;
display: block;
width: 100vw;
height: 100vh;
background: white;
color: black;
}
</style>
</head>
<body>
<iframe src="https://www.example.com/page.html"></iframe>
</body>
</html>
The proper way is to use the chrome.webRequest API in your background script and intercept HTTP responses.
You can then override response headers to modify Content-Security-Policy header. You can also modify X-Frame-Options header (if required).
Documentation: chrome.webRequest
#font-face {
font-family: 'Futura Std';
src: url('../fonts/FuturaStd-Light.eot');
src: url('../fonts/FuturaStd-Light.eot?#iefix') format('embedded-opentype'),
url('../fonts/FuturaStd-Light.woff') format('woff'),
url('../fonts/FuturaStd-Light.ttf') format('truetype');
font-weight: 300;
font-style: normal;
}
List item
Am getting issue to loading fonts. My path is fine but still not loading
fonts in IE all versions
I downloaded two font kits from Font Squirrel, and they work everywhere except on iphone/ipad. This makes me think there is a problem with the svg file.
I have another font downloaded from font squirrel on a separate site (through the same host) that is working great on my mobile devices, and I cannot see what the difference is between them that would make the font work on one site but not another.
My host recognizes svg (says so here: http://wiki.dreamhost.com/MIME_Types), so i don't think it is a problem with the MIME type. i don't know much about this though and might be missing something.
I have also checked the id in my svg files, and they match the #id in my #font-face declarations:
#font-face {
font-family: 'BebasNeueRegular';
src: url('BebasNeue-webfont.eot');
src: url('BebasNeue-webfont.eot?#iefix') format('embedded-opentype'),
url('BebasNeue-webfont.woff') format('woff'),
url('BebasNeue-webfont.ttf') format('truetype'),
url('BebasNeue-webfont.svg#BebasNeueRegular') format('svg');
font-weight: normal;
font-style: normal;
}
#font-face {
font-family: 'OswaldStencilRegular';
src: url('Oswald-Stencil-webfont.eot');
src: url('Oswald-Stencil-webfont.eot?#iefix') format('embedded-opentype'),
url('Oswald-Stencil-webfont.woff') format('woff'),
url('Oswald-Stencil-webfont.ttf') format('truetype'),
url('Oswald-Stencil-webfont.svg#OswaldStencilRegular') format('svg');
font-weight: normal;
font-style: normal;
}
Does anyone know what the problem could be here?