mh2 + better watermarks

This commit is contained in:
Kyle
2021-07-14 12:15:55 -07:00
parent 6242238f54
commit 9b1f48ca56
4 changed files with 42 additions and 4 deletions

View File

@@ -1334,9 +1334,12 @@ function resetWatermark() {
watermarkEdited();
}
//svg cropper
function getSetSymbolWatermark(setCode, targetImage = watermark) {
function getSetSymbolWatermark(url, targetImage = watermark) {
if (!url.includes('http')) {
url = 'https://cdn.jsdelivr.net/npm/keyrune/svg/' + url + '.svg';
}
xhttp = new XMLHttpRequest();
xhttp.open('GET', 'https://raw.githubusercontent.com/andrewgioia/keyrune/4073ac89bb943978c29be504275e6f3160a07255/svg/' + setCode + '.svg', true);
xhttp.open('GET', url, true);
xhttp.overrideMimeType('image/svg+xml');
xhttp.onload = function(event) {
if (this.readyState == 4 && this.status == 200) {