Skip to content

Commit

Permalink
notify in paywall
Browse files Browse the repository at this point in the history
  • Loading branch information
nano2dev committed Feb 1, 2024
1 parent e4b714a commit 9299790
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions latest.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,12 @@
}
}

window.NanoPay.unlock_request = async (title, element, amount, address, elementId) => {
window.NanoPay.unlock_request = async (title, element, amount, address, notify, elementId) => {
window.NanoPay.open({
title,
amount,
address,
notify,
success: (block) => window.NanoPay.unlock_content(element, elementId, block)
})
}
Expand Down Expand Up @@ -143,7 +144,7 @@

window.NanoPay.locked[i] = item.innerHTML

var code = `<div onclick="window.NanoPay.unlock_request('${config.title || 'Unlock'}', '${config.element}', '${config.amount}', '${config.address}', '${articleId}')" class="nano-pay-unlock-button"><img style="" src="https://wall.nano.to/img/xno.svg" alt="">${ config.button || 'Unlock with Nano' }</div></div>`
var code = `<div onclick="window.NanoPay.unlock_request('${config.title || 'Unlock'}', '${config.element}', '${config.amount}', '${config.address}', '${config.notify}', '${articleId}')" class="nano-pay-unlock-button"><img style="" src="https://wall.nano.to/img/xno.svg" alt="">${ config.button || 'Unlock with Nano' }</div></div>`

if (config.free) {
code += `<div class="nano-pay-free-read" onclick="window.NanoPay.unlock_content('${config.element}')"><hr>${ config.free_text ? config.free_text : 'Free Read' }</div>`
Expand Down

0 comments on commit 9299790

Please sign in to comment.