debug logs and b64 non encodable
This commit is contained in:
@@ -64,7 +64,7 @@ function format(job) {
|
||||
btns.forEach(function(e) {
|
||||
buttons += `
|
||||
<span>
|
||||
<input type="button" onclick="job${e.name}(this);" value="&#${e.icon};" alt="${e.name}" title="${e.name}" job="${btoa(JSON.stringify(job))}"/>
|
||||
<input type="button" onclick="job${e.name}(this);" value="&#${e.icon};" alt="${e.name}" title="${e.name}" job="${btoa(encodeURIComponent(JSON.stringify(job)))}"/>
|
||||
</span>
|
||||
`
|
||||
})
|
||||
@@ -192,7 +192,8 @@ function getJobElement(id) {
|
||||
|
||||
function jobFromInput(input) {
|
||||
var b64 = input.getAttribute("job")
|
||||
var json = atob(b64)
|
||||
var encoded = atob(b64)
|
||||
var json = decodeURIComponent(encoded)
|
||||
return JSON.parse(json)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user