-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Allow API endpoint to be passed in, add more error messages.
- Loading branch information
1 parent
dcdc224
commit ea729e0
Showing
6 changed files
with
116 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<html> | ||
<head> | ||
<!--<style> | ||
@media all { | ||
@page { margin: 0px; } | ||
body { margin-top: 0cm; | ||
margin-left:auto; | ||
} | ||
} | ||
</style>--> | ||
<style> | ||
html, body { | ||
width: fit-content; | ||
height: fit-content; | ||
margin: 0px; | ||
padding: 0px; | ||
} | ||
</style> | ||
|
||
<style id=page_style> | ||
@page { size: 100px 100px ; margin : 0px } | ||
</style> | ||
</head> | ||
<body> | ||
<object type="image/svg+xml" data="SVG_PATH" ></object> | ||
|
||
<script> | ||
window.onload = fixpage; | ||
|
||
function fixpage() { | ||
|
||
renderBlock = document.getElementsByTagName("html")[0]; | ||
renderBlockInfo = window.getComputedStyle(renderBlock) | ||
|
||
// fix chrome page bug | ||
fixHeight = parseInt(renderBlockInfo.height) + 1 + "px" | ||
|
||
pageCss = `@page { size: \${renderBlockInfo.width} \${fixHeight} ; margin:0;}` | ||
document.getElementById("page_style").innerHTML = pageCss | ||
} | ||
</script> | ||
</body> | ||
|
||
|
||
</html> |