Spaces:
Running
Running
Ron Au
commited on
Commit
•
9b7fc50
1
Parent(s):
120da3b
WIP: Safari bugs
Browse files- static/js/dom-manipulation.js +12 -3
- static/style.css +1 -1
static/js/dom-manipulation.js
CHANGED
@@ -108,10 +108,10 @@ const setOutput = (mode, state) => {
|
|
108 |
const screenshotCard = async () => {
|
109 |
const card = document.querySelector('.pokecard');
|
110 |
console.log({ card });
|
111 |
-
console.log('card .img.picture:');
|
112 |
console.log(card.querySelector('img.picture'));
|
|
|
113 |
|
114 |
-
|
115 |
width: 400,
|
116 |
height: 558,
|
117 |
backgroundColor: 'transparent',
|
@@ -120,7 +120,16 @@ const screenshotCard = async () => {
|
|
120 |
},
|
121 |
});
|
122 |
|
123 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
|
125 |
return imageUrl;
|
126 |
};
|
|
|
108 |
const screenshotCard = async () => {
|
109 |
const card = document.querySelector('.pokecard');
|
110 |
console.log({ card });
|
|
|
111 |
console.log(card.querySelector('img.picture'));
|
112 |
+
console.log(card.querySelector('img.picture').src);
|
113 |
|
114 |
+
let imageUrl = await toPng(card, {
|
115 |
width: 400,
|
116 |
height: 558,
|
117 |
backgroundColor: 'transparent',
|
|
|
120 |
},
|
121 |
});
|
122 |
|
123 |
+
imageUrl = await toPng(card, {
|
124 |
+
width: 400,
|
125 |
+
height: 558,
|
126 |
+
backgroundColor: 'transparent',
|
127 |
+
style: {
|
128 |
+
transform: 'none',
|
129 |
+
},
|
130 |
+
});
|
131 |
+
|
132 |
+
console.log(imageUrl);
|
133 |
|
134 |
return imageUrl;
|
135 |
};
|
static/style.css
CHANGED
@@ -729,7 +729,7 @@ img.hf-logo {
|
|
729 |
border-radius: 50%;
|
730 |
background-color: hsl(0 0% 100% / 15%);
|
731 |
font-size: 0.8em;
|
732 |
-
filter: contrast(100) grayscale(1) drop-shadow(0 0 0.1rem
|
733 |
}
|
734 |
|
735 |
.darkness {
|
|
|
729 |
border-radius: 50%;
|
730 |
background-color: hsl(0 0% 100% / 15%);
|
731 |
font-size: 0.8em;
|
732 |
+
filter: contrast(100) grayscale(1) drop-shadow(0 0 0.1rem hsl(0 0% 60%));
|
733 |
}
|
734 |
|
735 |
.darkness {
|