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
<script> | |
window.beforePost= function(){ | |
params.forEach(function(param){ | |
formData[param.key]= param.val; | |
}); | |
}; | |
</script> |
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
<!-- add this code to a Code block. Style with "style" and "class" attributes --> | |
<button | |
onclick="window.location= redirect;" | |
style="" | |
class="button-reset pv3 tc ba b--transparent bg-animate pointer w-100 br2"> | |
Click Me | |
</button> | |
<!-- add this to a page's Custom Code > Below Body --> |
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
<script> | |
function beforePost(){ | |
var referrerId= params.filter(function(p){ | |
return p.key==='referrerId' | |
})[0]||{}; | |
// add a new line for each referrer. | |
if(referrerId.val==='google'){ redirect = "https://google.com" }; | |
}; | |
</script> |
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
import { timestamp, build, files } from '$service-worker'; | |
const name = `cache-${timestamp}`; | |
self.addEventListener('install', (event) => { | |
event.waitUntil(caches.open(name).then((cache) => cache.addAll(['/', ...build, ...files]))); | |
}); | |
self.addEventListener('activate', (event) => { | |
event.waitUntil( |
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
<script> | |
function beforePost(){ | |
window.params.forEach(function (param) { | |
formData[param.key]= param.val; | |
}); | |
}; | |
</script> |
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
// SPDX-License-Identifier: GPL-3.0 | |
pragma solidity >=0.7.0 <0.9.0; | |
/** | |
* @title Storage | |
* @dev Store & retrieve value in a variable | |
*/ | |
contract Storage { | |
uint256 number; | |
/** | |
* @dev Store value in variable |
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
<a href="https://stephanestorm.groovepages.com/ouvrezuncomptegratuit" | |
class="link relative button-reset pa3 db tc ba b--transparent bg-animate pointer w-100 br2 fw8" | |
target="_blank"> | |
Plateforme Marketing Digitale | |
</a> |
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
<details class="pv1 ph2 ph4-ns mw6 center cf tc"> | |
<summary class="bg-blue link relative button-reset pv3 white db tc ba b--transparent bg-animate pointer w-100 br2 fw8"> | |
Details | |
</summary> | |
<ul class="list pl0 ml0 center mw6 ba b--light-silver br3"> | |
<li class="ph3 pv2 bb b--light-silver"> | |
<a href="#">Top Option</a> | |
</li> | |
<li class="ph3 pv2 bb b--light-silver"> | |
<a href="#">Middle Option(s)</a> |
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
//pseudocode, a mix of frontend + backend javascript: | |
//step1 (frontend): | |
const checkout = async () => { | |
try { | |
let resp = await fetch(`/api/checkout`, { | |
method: "POST", | |
headers: { | |
"content-type": "application/json", | |
}, |