Sujet : Re: Interagir avec le presse-papiers dans une page web
De : loiseauthierry (at) *nospam* free.fr (Thierry Loiseau)
Groupes : fr.comp.lang.javascriptDate : 24. Sep 2024, 11:55:36
Autres entêtes
Organisation : La tête dans les étoiles
Message-ID : <66f29aa8$0$1287$426a34cc@news.free.fr>
References : 1 2 3 4 5
User-Agent : MacSOUP/F-2.8.4 (6da4d6e6d0) (Mac OS X version 10.9.5 (x86))
Thierry Loiseau <
loiseauthierry@free.fr> wrote:
Thierry Loiseau <loiseauthierry@free.fr> wrote:
Je vais le tester. Tu penses donc qu'il n'y a pas besoin de https ni de
manifest.json ?
Il parait que ça marcherait même en local, alors soyons fous, des
copier-coller de <span onclick="c('')" title=""></span> comme par
exemple :
<span onclick="c('+')" title="plus">+</span>
<span onclick="c('-')" title="moins">-</span>
<span onclick="c('±')" title="plus ou moins">±</span>
function c(v,t)
{
navigator.clipboard.writeText(v);
alert(t+' mis dans le \npresse papier : '+v)
}
...
<tr><td >opérations</td><td><span onclick="c('+',this.title)"
title='Caractère "plus"'>+</span> <span
onclick="c(this.innerText,this.title)" title='Caractère
"moins"'></span> <span onclick="c(this.innerText,this.title);"
title='Caractère "plus ou moins"'>±</span>
:)
<http://astrophoto.free.fr/_test-copy.php>
L'alerte est à mon avis appréciable par le client qui veut savoir
immédiatement si son action a été comprise et immédiatement rémunérée...
sinon, bloquer cela par deux simples //
---- 8-< ---
function c(v,t)
{
navigator.clipboard.writeText(v);
// alert(t+' mis dans le \npresse papier : '+v)
}
*** >-8 ----
-- * * __*__ * * * * -----oOOo--- O ---oOOo------- * * http://astrophoto.free.fr * * * -------- oOOo oOOo ---------- *