mirror of
https://github.com/scratchfoundation/scratchjr.git
synced 2025-03-14 06:59:49 -04:00
Fix #433
This commit is contained in:
parent
f517e0488a
commit
3df01316de
2 changed files with 6 additions and 1 deletions
|
@ -385,6 +385,7 @@ body {
|
|||
|
||||
#paint-key {
|
||||
width: ${css_vh(36.35)};
|
||||
height: ${css_vh(72.53)};
|
||||
float: left;
|
||||
margin-left: ${css_vh(9.05)};
|
||||
background-image: url("../images/keybackground.png");
|
||||
|
|
|
@ -64,8 +64,12 @@ export function preprocessAndLoad (url) {
|
|||
*/
|
||||
export function preprocessAndLoadCss (baseUrl, url) {
|
||||
var cssData = preprocessAndLoad(url);
|
||||
// search for url("../images") pattern
|
||||
cssData = cssData.replace(/url\("/g, 'url(\"' + baseUrl + '/');
|
||||
// search for url('../images') pattern
|
||||
cssData = cssData.replace(/url\('/g, 'url(\'' + baseUrl + '/');
|
||||
cssData = cssData.replace(/url\(([^'])/g, 'url(' + baseUrl + '/$1');
|
||||
// search for url(../images) pattern
|
||||
cssData = cssData.replace(/url\(([^'"])/g, 'url(' + baseUrl + '/$1');
|
||||
|
||||
const head = document.head;
|
||||
let style = document.createElement('style');
|
||||
|
|
Loading…
Reference in a new issue