これは私が使用するプラグインです:
<script>
window.addEventListener("load", function(){
var p;
window.cookieconsent.initialise({
"palette": {
"popup": {
"background": "rgba(255,150,33,0.9)",
"text": "black"
},
"button": {
"background": "transparent",
"border": "white",
"text": "black"
}
},
"type": "opt-in",
"content": {
message:'The message',
dismiss:'dismiss',
allow:'allow',
link:'Read more',
href:'http://example.com',
},
revokable:true,
onStatusChange: function(status, chosenBefore) {
var type = this.options.type;
var didConsent = this.hasConsented();
if (type == 'opt-in' && didConsent) {
setCookie('xxx','allow',365,'/','');
}
},
cookie: {
name: 'wwwZalarisCC'
},
onRevokeChoice: function(){
}
}, function (popup) {
p = popup;
var output = '';
for (var property in p) {
output += property + ': ' + p[property]+'; ';
}
});
document.getElementById('btn-revokeChoice').onclick = function (e) {
p.revokeChoice();
};
});
</script>
'<>'と、[作成]をクリックしてください: [リンク]ここhttps://cookieconsent.insites.com/documentation/javascript-api/
とは私のスクリプトです関連するJSファイルとHTMLで – mplungjan
とmcve]ここに私のスクリプトです – Tinko